mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-01 05:46:06 -04:00
05/12/2017
--Bug fixes -Fractorium would occasionally freeze after dismissing the final render dialog because some values were not properly re-initialized. --Code changes -Remove VS 2013 build files. -Qualify sqrt with std:: in ColorTriangle.cpp
This commit is contained in:
@ -58,7 +58,7 @@
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="center">Fractorium 1.0.0.3</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" text-decoration: underline; color:#0000ff;">fractorium.com</span></a><span style=" font-size:10pt;"><br/>Lead: Matt Feemster<br/>Contributors: Simon Detheridge, Michel Mastriani</span></p></body></html></string>
|
||||
<string><html><head/><body><p align="center">Fractorium 1.0.0.4</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" text-decoration: underline; color:#0000ff;">fractorium.com</span></a><span style=" font-size:10pt;"><br/>Lead: Matt Feemster<br/>Contributors: Simon Detheridge, Michel Mastriani</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
@ -634,7 +634,6 @@ tuple<size_t, size_t, size_t> FinalRenderEmberController<T>::SyncAndComputeMemor
|
||||
size_t iterCount;
|
||||
pair<size_t, size_t> p(0, 0);
|
||||
size_t strips;
|
||||
bool b = false;
|
||||
uint channels = m_FinalRenderDialog->Ext() == "png" ? 4 : 3;//4 channels for Png, else 3.
|
||||
SyncGuiToEmbers();
|
||||
|
||||
@ -642,13 +641,8 @@ tuple<size_t, size_t, size_t> FinalRenderEmberController<T>::SyncAndComputeMemor
|
||||
{
|
||||
strips = VerifyStrips(m_Ember->m_FinalRasH, m_FinalRenderDialog->Strips(),
|
||||
[&](const string & s) {}, [&](const string & s) {}, [&](const string & s) {});
|
||||
m_Renderer->SetEmber(*m_Ember);
|
||||
m_Renderer->CreateSpatialFilter(b);
|
||||
m_Renderer->CreateTemporalFilter(b);
|
||||
m_Renderer->SetEmber(*m_Ember, eProcessAction::FULL_RENDER, true);
|
||||
m_Renderer->NumChannels(channels);
|
||||
m_Renderer->ComputeBounds();
|
||||
m_Renderer->ComputeQuality();
|
||||
m_Renderer->ComputeCamera();
|
||||
m_FinalPreviewRenderer->Render(UINT_MAX, UINT_MAX);
|
||||
p = m_Renderer->MemoryRequired(strips, true, m_FinalRenderDialog->DoSequence());
|
||||
iterCount = m_Renderer->TotalIterCount(strips);
|
||||
@ -657,13 +651,8 @@ tuple<size_t, size_t, size_t> FinalRenderEmberController<T>::SyncAndComputeMemor
|
||||
{
|
||||
for (auto& renderer : m_Renderers)
|
||||
{
|
||||
renderer->SetEmber(*m_Ember);
|
||||
renderer->CreateSpatialFilter(b);
|
||||
renderer->CreateTemporalFilter(b);
|
||||
renderer->SetEmber(*m_Ember, eProcessAction::FULL_RENDER, true);
|
||||
renderer->NumChannels(channels);
|
||||
renderer->ComputeBounds();
|
||||
renderer->ComputeQuality();
|
||||
renderer->ComputeCamera();
|
||||
}
|
||||
|
||||
m_FinalPreviewRenderer->Render(UINT_MAX, UINT_MAX);
|
||||
|
@ -569,7 +569,9 @@ bool FractoriumEmberController<T>::CreateRenderer(eRendererType renderType, cons
|
||||
m_Renderer->Callback(this);
|
||||
m_Renderer->NumChannels(4);//Always using 4 since the GL texture is RGBA.
|
||||
m_Renderer->ReclaimOnResize(true);
|
||||
m_Renderer->SetEmber(m_Ember);//Give it an initial ember, will be updated many times later.
|
||||
//Give it an initial ember, will be updated many times later.
|
||||
//Even though the bounds are computed when starting the next render. The OpenGL draw calls use these values, which might get called before the render starts.
|
||||
m_Renderer->SetEmber(m_Ember, eProcessAction::FULL_RENDER, true);
|
||||
m_Renderer->EarlyClip(s->EarlyClip());
|
||||
m_Renderer->YAxisUp(s->YAxisUp());
|
||||
m_Renderer->ThreadCount(s->ThreadCount());
|
||||
|
@ -843,7 +843,7 @@ double ColorTriangle::RadiusAt(const QPointF& pos, const QRect& rect) const
|
||||
{
|
||||
double mousexdist = pos.x() - (double) rect.center().x();
|
||||
double mouseydist = pos.y() - (double) rect.center().y();
|
||||
return sqrt(mousexdist * mousexdist + mouseydist * mouseydist);
|
||||
return std::sqrt(mousexdist * mousexdist + mouseydist * mouseydist);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -857,7 +857,7 @@ double ColorTriangle::AngleAt(const QPointF& pos, const QRect& rect) const
|
||||
{
|
||||
double mousexdist = pos.x() - (double) rect.center().x();
|
||||
double mouseydist = pos.y() - (double) rect.center().y();
|
||||
double mouserad = sqrt(mousexdist * mousexdist + mouseydist * mouseydist);
|
||||
double mouserad = std::sqrt(mousexdist * mousexdist + mouseydist * mouseydist);
|
||||
|
||||
if (mouserad == 0.0)
|
||||
return 0.0;
|
||||
@ -885,7 +885,7 @@ inline double qsqr(double a)
|
||||
*/
|
||||
inline double vlen(double x, double y)
|
||||
{
|
||||
return sqrt(qsqr(x) + qsqr(y));
|
||||
return std::sqrt(qsqr(x) + qsqr(y));
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
@ -1162,7 +1162,7 @@ QPointF ColorTriangle::MovePointToTriangle(double x, double y, const Vertex& a,
|
||||
// the a-b vector with this distance and the angle between a-b
|
||||
// and a-(x,y) to determine the point of intersection of the
|
||||
// perpendicular projection from (x,y) onto a-b.
|
||||
double pdist = sqrt(qsqr(x - a.point.x()) + qsqr(y - a.point.y()));
|
||||
double pdist = std::sqrt(qsqr(x - a.point.x()) + qsqr(y - a.point.y()));
|
||||
// the length of all edges is always > 0
|
||||
double p0x = a.point.x() + ((b.point.x() - a.point.x()) / vlen(v2xB, v2yB)) * cos(alphaA) * pdist;
|
||||
double p0y = a.point.y() + ((b.point.y() - a.point.y()) / vlen(v2xB, v2yB)) * cos(alphaA) * pdist;
|
||||
@ -1186,7 +1186,7 @@ QPointF ColorTriangle::MovePointToTriangle(double x, double y, const Vertex& a,
|
||||
else if (angleBetweenAngles(angleP, angleB, angleC))
|
||||
{
|
||||
// If (x,y) is in the b-c area, project onto the b-c vector.
|
||||
double pdist = sqrt(qsqr(x - b.point.x()) + qsqr(y - b.point.y()));
|
||||
double pdist = std::sqrt(qsqr(x - b.point.x()) + qsqr(y - b.point.y()));
|
||||
// the length of all edges is always > 0
|
||||
double p0x = b.point.x() + ((c.point.x() - b.point.x()) / vlen(v2xC, v2yC)) * cos(alphaB) * pdist;
|
||||
double p0y = b.point.y() + ((c.point.y() - b.point.y()) / vlen(v2xC, v2yC)) * cos(alphaB) * pdist;
|
||||
@ -1206,7 +1206,7 @@ QPointF ColorTriangle::MovePointToTriangle(double x, double y, const Vertex& a,
|
||||
else if (angleBetweenAngles(angleP, angleC, angleA))
|
||||
{
|
||||
// If (x,y) is in the c-a area, project onto the c-a vector.
|
||||
double pdist = sqrt(qsqr(x - c.point.x()) + qsqr(y - c.point.y()));
|
||||
double pdist = std::sqrt(qsqr(x - c.point.x()) + qsqr(y - c.point.y()));
|
||||
// the length of all edges is always > 0
|
||||
double p0x = c.point.x() + ((a.point.x() - c.point.x()) / vlen(v2xA, v2yA)) * cos(alphaC) * pdist;
|
||||
double p0y = c.point.y() + ((a.point.y() - c.point.y()) / vlen(v2xA, v2yA)) * cos(alphaC) * pdist;
|
||||
|
Reference in New Issue
Block a user