diff --git a/Builds/MSVC/VS2010/FractoriumInstaller/FractoriumInstaller.wixproj b/Builds/MSVC/VS2010/FractoriumInstaller/FractoriumInstaller.wixproj
index a9d1cf3..e8c2ec5 100644
--- a/Builds/MSVC/VS2010/FractoriumInstaller/FractoriumInstaller.wixproj
+++ b/Builds/MSVC/VS2010/FractoriumInstaller/FractoriumInstaller.wixproj
@@ -6,7 +6,7 @@
3.7
{c8096c47-e358-438c-a520-146d46b0637d}
2.0
- Fractorium_Beta_0.4.0.6
+ Fractorium_Beta_0.4.0.7
Package
$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets
$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
diff --git a/Builds/MSVC/VS2010/FractoriumInstaller/Product.wxs b/Builds/MSVC/VS2010/FractoriumInstaller/Product.wxs
index 959ef86..7ced111 100644
--- a/Builds/MSVC/VS2010/FractoriumInstaller/Product.wxs
+++ b/Builds/MSVC/VS2010/FractoriumInstaller/Product.wxs
@@ -1,6 +1,6 @@
-
+
@@ -13,7 +13,7 @@
-
+
::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.
#define ISAAC_SIZE 4
diff --git a/Source/Ember/Renderer.cpp b/Source/Ember/Renderer.cpp
index a92dc18..dc962b8 100644
--- a/Source/Ember/Renderer.cpp
+++ b/Source/Ember/Renderer.cpp
@@ -13,6 +13,7 @@ Renderer::Renderer()
m_Abort = false;
m_LockAccum = false;
m_EarlyClip = false;
+ m_YAxisUp = false;
m_InsertPalette = false;
m_ReclaimOnResize = false;
m_SubBatchSize = 1024 * 10;
@@ -1451,7 +1452,7 @@ eRenderStatus Renderer::AccumulatorToFinalImage(unsigned char* pixel
parallel_for((unsigned int)0, FinalRasH(), [&] (unsigned int j)
{
Color newBucket;
- int pixelsRowStart = j * FinalRowSize();//Pull out of inner loop for optimization.
+ int pixelsRowStart = (m_YAxisUp ? ((FinalRasH() - j) - 1) : j) * FinalRowSize();//Pull out of inner loop for optimization.
unsigned int y = m_DensityFilterOffset + (j * Supersample());//Start at the beginning row of each super sample block.
unsigned short* p16;
@@ -1755,6 +1756,24 @@ void Renderer::EarlyClip(bool earlyClip)
ChangeVal([&] { m_EarlyClip = earlyClip; }, FILTER_AND_ACCUM);
}
+///
+/// Get whether the positive Y coordinate of the final output image is up.
+/// Default: false.
+///
+/// True if up, else false.
+template
+bool Renderer::YAxisUp() const { return m_YAxisUp; }
+
+///
+/// Set whether the positive Y axis of the final output image is up.
+///
+/// True if the positive y axis is up, else false.
+template
+void Renderer::YAxisUp(bool yup)
+{
+ ChangeVal([&] { m_YAxisUp = yup; }, ACCUM_ONLY);
+}
+
///
/// Get whether to insert the palette as a block of colors in the final output image.
/// This is useful for debugging palette issues.
diff --git a/Source/Ember/Renderer.h b/Source/Ember/Renderer.h
index 77c25fc..c22e88f 100644
--- a/Source/Ember/Renderer.h
+++ b/Source/Ember/Renderer.h
@@ -111,6 +111,8 @@ public:
virtual void ReclaimOnResize(bool reclaimOnResize) { }
virtual bool EarlyClip() const { return false; }
virtual void EarlyClip(bool earlyClip) { }
+ virtual bool YAxisUp() const { return false; }
+ virtual void YAxisUp(bool yup) { }
virtual void ThreadCount(unsigned int threads, const char* seedString = NULL) { }
virtual void Transparency(bool transparency) { }
virtual void InteractiveFilter(eInteractiveFilter filter) { }
@@ -221,6 +223,9 @@ public:
virtual bool EarlyClip() const;
virtual void EarlyClip(bool earlyClip);
+ virtual bool YAxisUp() const;
+ virtual void YAxisUp(bool yup);
+
inline bool InsertPalette() const;
void InsertPalette(bool insertPalette);
@@ -335,6 +340,7 @@ private:
protected:
bool m_EarlyClip;
+ bool m_YAxisUp;
bool m_Transparency;
unsigned int m_SuperRasW;
unsigned int m_SuperRasH;
diff --git a/Source/EmberAnimate/EmberAnimate.rc b/Source/EmberAnimate/EmberAnimate.rc
index e81789c..b7bbd84 100644
--- a/Source/EmberAnimate/EmberAnimate.rc
+++ b/Source/EmberAnimate/EmberAnimate.rc
@@ -49,8 +49,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,4,0,6
- PRODUCTVERSION 0,4,0,6
+ FILEVERSION 0,4,0,7
+ PRODUCTVERSION 0,4,0,7
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -67,12 +67,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Renders fractal flames as animations with motion blur"
- VALUE "FileVersion", "0.4.0.6"
+ VALUE "FileVersion", "0.4.0.7"
VALUE "InternalName", "EmberAnimate.rc"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3"
VALUE "OriginalFilename", "EmberAnimate.rc"
VALUE "ProductName", "Ember Animate"
- VALUE "ProductVersion", "0.4.0.6"
+ VALUE "ProductVersion", "0.4.0.7"
END
END
BLOCK "VarFileInfo"
diff --git a/Source/EmberCL/EmberCLStructs.h b/Source/EmberCL/EmberCLStructs.h
index 49a2a2f..26328d4 100644
--- a/Source/EmberCL/EmberCLStructs.h
+++ b/Source/EmberCL/EmberCLStructs.h
@@ -313,6 +313,7 @@ struct ALIGN SpatialFilterCL
unsigned int m_BytesPerChannel;
unsigned int m_DensityFilterOffset;
unsigned int m_Transparency;
+ unsigned int m_YAxisUp;
T m_Vibrancy;
T m_HighlightPower;
T m_Gamma;
@@ -337,6 +338,7 @@ static const char* SpatialFilterCLStructString =
" uint m_BytesPerChannel;\n"
" uint m_DensityFilterOffset;\n"
" uint m_Transparency;\n"
+" uint m_YAxisUp;\n"
" real_t m_Vibrancy;\n"
" real_t m_HighlightPower;\n"
" real_t m_Gamma;\n"
diff --git a/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp b/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp
index 5866fd6..f785c66 100644
--- a/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp
+++ b/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp
@@ -65,7 +65,7 @@ template string FinalAccumOpenCLKernelCreator::FinalAccumLateCli
template
string FinalAccumOpenCLKernelCreator::GammaCorrectionEntryPoint(unsigned int channels, bool transparency)
{
- bool alphaCalc = (channels > 3 && transparency);
+ bool alphaCalc = ((channels > 3) && transparency);
return alphaCalc ? m_GammaCorrectionWithAlphaCalcEntryPoint : m_GammaCorrectionWithoutAlphaCalcEntryPoint;
}
@@ -78,7 +78,7 @@ string FinalAccumOpenCLKernelCreator::GammaCorrectionEntryPoint(unsigned int
template
string FinalAccumOpenCLKernelCreator::GammaCorrectionKernel(unsigned int channels, bool transparency)
{
- bool alphaCalc = (channels > 3 && transparency);
+ bool alphaCalc = ((channels > 3) && transparency);
return alphaCalc ? m_GammaCorrectionWithAlphaCalcKernel : m_GammaCorrectionWithoutAlphaCalcKernel;
}
@@ -94,7 +94,7 @@ string FinalAccumOpenCLKernelCreator::GammaCorrectionKernel(unsigned int chan
template
string FinalAccumOpenCLKernelCreator::FinalAccumEntryPoint(bool earlyClip, unsigned int channels, bool transparency, T& alphaBase, T& alphaScale)
{
- bool alphaCalc = (channels > 3 && transparency);
+ bool alphaCalc = ((channels > 3) && transparency);
bool alphaAccum = channels > 3;
if (alphaAccum)
@@ -241,10 +241,9 @@ string FinalAccumOpenCLKernelCreator::CreateFinalAccumKernelString(bool early
"\n"
" unsigned int accumX = spatialFilter->m_DensityFilterOffset + (GLOBAL_ID_X * spatialFilter->m_Supersample);\n"
" unsigned int accumY = spatialFilter->m_DensityFilterOffset + (GLOBAL_ID_Y * spatialFilter->m_Supersample);\n"
-
" int2 finalCoord;\n"
" finalCoord.x = GLOBAL_ID_X;\n"
- " finalCoord.y = GLOBAL_ID_Y;\n"
+ " finalCoord.y = (int)((spatialFilter->m_YAxisUp == 1) ? ((spatialFilter->m_FinalRasH - GLOBAL_ID_Y) - 1) : GLOBAL_ID_Y);\n"
" float4floats finalColor;\n"
" real_t alpha, ls;\n"
" int ii, jj;\n"
diff --git a/Source/EmberCL/RendererCL.cpp b/Source/EmberCL/RendererCL.cpp
index 4e14109..800ee13 100644
--- a/Source/EmberCL/RendererCL.cpp
+++ b/Source/EmberCL/RendererCL.cpp
@@ -1250,6 +1250,7 @@ SpatialFilterCL RendererCL::ConvertSpatialFilter()
filterCL.m_BytesPerChannel = BytesPerChannel();
filterCL.m_DensityFilterOffset = DensityFilterOffset();
filterCL.m_Transparency = Transparency();
+ filterCL.m_YAxisUp = (unsigned int)m_YAxisUp;
filterCL.m_Vibrancy = vibrancy;
filterCL.m_HighlightPower = HighlightPower();
filterCL.m_Gamma = g;
diff --git a/Source/EmberGenome/EmberGenome.rc b/Source/EmberGenome/EmberGenome.rc
index b8b10bf..9938fe1 100644
--- a/Source/EmberGenome/EmberGenome.rc
+++ b/Source/EmberGenome/EmberGenome.rc
@@ -49,8 +49,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,4,0,6
- PRODUCTVERSION 0,4,0,6
+ FILEVERSION 0,4,0,7
+ PRODUCTVERSION 0,4,0,7
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -67,12 +67,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Manipulates fractal flames parameter files"
- VALUE "FileVersion", "0.4.0.6"
+ VALUE "FileVersion", "0.4.0.7"
VALUE "InternalName", "EmberGenome.rc"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3"
VALUE "OriginalFilename", "EmberGenome.rc"
VALUE "ProductName", "Ember Genome"
- VALUE "ProductVersion", "0.4.0.6"
+ VALUE "ProductVersion", "0.4.0.7"
END
END
BLOCK "VarFileInfo"
diff --git a/Source/EmberRender/EmberRender.rc b/Source/EmberRender/EmberRender.rc
index e76496c..a15adc8 100644
--- a/Source/EmberRender/EmberRender.rc
+++ b/Source/EmberRender/EmberRender.rc
@@ -49,8 +49,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,4,0,6
- PRODUCTVERSION 0,4,0,6
+ FILEVERSION 0,4,0,7
+ PRODUCTVERSION 0,4,0,7
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -67,12 +67,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Open Source"
VALUE "FileDescription", "Renders fractal flames as single images"
- VALUE "FileVersion", "0.4.0.6"
+ VALUE "FileVersion", "0.4.0.7"
VALUE "InternalName", "EmberRender.rc"
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2013, GPL v3"
VALUE "OriginalFilename", "EmberRender.rc"
VALUE "ProductName", "Ember Render"
- VALUE "ProductVersion", "0.4.0.6"
+ VALUE "ProductVersion", "0.4.0.7"
END
END
BLOCK "VarFileInfo"
diff --git a/Source/Fractorium/AboutDialog.ui b/Source/Fractorium/AboutDialog.ui
index c3faee0..95933a5 100644
--- a/Source/Fractorium/AboutDialog.ui
+++ b/Source/Fractorium/AboutDialog.ui
@@ -52,7 +52,7 @@
- <html><head/><body><p align="center"><br/><span style=" font-size:12pt;">Fractorium 0.4.0.6 Beta</span></p><p align="center"><span style=" font-size:10pt;"><br/>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"><span style=" font-size:10pt;">Matt Feemster</span></p></body></html>
+ <html><head/><body><p align="center"><br/><span style=" font-size:12pt;">Fractorium 0.4.0.7 Beta</span></p><p align="center"><span style=" font-size:10pt;"><br/>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"><span style=" font-size:10pt;">Matt Feemster</span></p></body></html>
Qt::RichText
diff --git a/Source/Fractorium/FinalRenderDialog.cpp b/Source/Fractorium/FinalRenderDialog.cpp
index f4ad550..bf0f4d9 100644
--- a/Source/Fractorium/FinalRenderDialog.cpp
+++ b/Source/Fractorium/FinalRenderDialog.cpp
@@ -25,6 +25,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
m_Settings = settings;
ui.FinalRenderThreadCountSpin->setRange(1, Timing::ProcessorCount());
connect(ui.FinalRenderEarlyClipCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnEarlyClipCheckBoxStateChanged(int)), Qt::QueuedConnection);
+ connect(ui.FinalRenderYAxisUpCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnYAxisUpCheckBoxStateChanged(int)), Qt::QueuedConnection);
connect(ui.FinalRenderTransparencyCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnTransparencyCheckBoxStateChanged(int)), Qt::QueuedConnection);
connect(ui.FinalRenderOpenCLCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnOpenCLCheckBoxStateChanged(int)), Qt::QueuedConnection);
connect(ui.FinalRenderDoublePrecisionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnDoublePrecisionCheckBoxStateChanged(int)), Qt::QueuedConnection);
@@ -87,6 +88,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
}
ui.FinalRenderEarlyClipCheckBox->setChecked( m_Settings->FinalEarlyClip());
+ ui.FinalRenderYAxisUpCheckBox->setChecked( m_Settings->FinalYAxisUp());
ui.FinalRenderTransparencyCheckBox->setChecked( m_Settings->FinalTransparency());
ui.FinalRenderDoublePrecisionCheckBox->setChecked(m_Settings->FinalDouble());
ui.FinalRenderSaveXmlCheckBox->setChecked( m_Settings->FinalSaveXml());
@@ -111,6 +113,12 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
//Explicitly call these to enable/disable the appropriate controls.
OnOpenCLCheckBoxStateChanged(ui.FinalRenderOpenCLCheckBox->isChecked());
OnDoAllCheckBoxStateChanged(ui.FinalRenderDoAllCheckBox->isChecked());
+
+ QSize s = size();
+ int desktopHeight = qApp->desktop()->availableGeometry().height();
+
+ s.setHeight(min(s.height(), (int)((double)desktopHeight * 0.90)));
+ setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, s, qApp->desktop()->availableGeometry()));
}
///
@@ -118,6 +126,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
///
bool FractoriumFinalRenderDialog::EarlyClip() { return ui.FinalRenderEarlyClipCheckBox->isChecked(); }
+bool FractoriumFinalRenderDialog::YAxisUp() { return ui.FinalRenderYAxisUpCheckBox->isChecked(); }
bool FractoriumFinalRenderDialog::Transparency() { return ui.FinalRenderTransparencyCheckBox->isChecked(); }
bool FractoriumFinalRenderDialog::OpenCL() { return ui.FinalRenderOpenCLCheckBox->isChecked(); }
bool FractoriumFinalRenderDialog::Double() { return ui.FinalRenderDoublePrecisionCheckBox->isChecked(); }
@@ -149,6 +158,7 @@ FinalRenderGuiState FractoriumFinalRenderDialog::State()
FinalRenderGuiState state;
state.m_EarlyClip = EarlyClip();
+ state.m_YAxisUp = YAxisUp();
state.m_Transparency = Transparency();
state.m_OpenCL = OpenCL();
state.m_Double = Double();
@@ -223,6 +233,15 @@ void FractoriumFinalRenderDialog::OnEarlyClipCheckBoxStateChanged(int state)
SetMemory();
}
+///
+/// Whether the positive Y axis of the final output image is up.
+///
+/// True if the positive y axis is up, else false.
+void FractoriumFinalRenderDialog::OnYAxisUpCheckBoxStateChanged(int state)
+{
+ SetMemory();
+}
+
///
/// Whether to use transparency in png images.
///
diff --git a/Source/Fractorium/FinalRenderDialog.h b/Source/Fractorium/FinalRenderDialog.h
index 299592d..d188b7f 100644
--- a/Source/Fractorium/FinalRenderDialog.h
+++ b/Source/Fractorium/FinalRenderDialog.h
@@ -45,6 +45,7 @@ class FractoriumFinalRenderDialog : public QDialog
public:
FractoriumFinalRenderDialog(FractoriumSettings* settings, QWidget* parent, Qt::WindowFlags f = 0);
bool EarlyClip();
+ bool YAxisUp();
bool Transparency();
bool OpenCL();
bool Double();
@@ -72,6 +73,7 @@ public:
public Q_SLOTS:
void MoveCursorToEnd();
void OnEarlyClipCheckBoxStateChanged(int state);
+ void OnYAxisUpCheckBoxStateChanged(int state);
void OnTransparencyCheckBoxStateChanged(int state);
void OnOpenCLCheckBoxStateChanged(int state);
void OnDoublePrecisionCheckBoxStateChanged(int state);
diff --git a/Source/Fractorium/FinalRenderDialog.ui b/Source/Fractorium/FinalRenderDialog.ui
index 2d35c28..db9da53 100644
--- a/Source/Fractorium/FinalRenderDialog.ui
+++ b/Source/Fractorium/FinalRenderDialog.ui
@@ -7,7 +7,7 @@
0
0
519
- 801
+ 813
@@ -61,7 +61,7 @@
0
0
507
- 789
+ 801
@@ -82,77 +82,7 @@
-
-
-
-
-
- Render all open flames instead of just the current one
-
-
- Render All
-
-
-
- -
-
-
- Use temporal samples value to achieve motion blur effect between flames
-
-
- Render as Animation Sequence
-
-
-
- -
-
-
- <html><head/><body><p>Checked: use 64-bit double precision numbers (slower, but better image quality).</p><p>Unchecked: use 32-bit single precision numbers (faster, but worse image quality).</p></body></html>
-
-
- Use Double Precision
-
-
-
- -
-
-
- <html><head/><body><p>Use OpenCL to render if your video card supports it.</p><p>This is highly recommended as it will dramatically speed up render time.</p></body></html>
-
-
- Use OpenCL
-
-
-
- -
-
-
- <html><head/><body><p>Checked: clip colors and gamma correct after density filtering.</p><p>Unchecked: do it after spatial filtering.</p></body></html>
-
-
- Early Clip
-
-
-
- -
-
-
- Save an Xml parameter file for each flame rendered
-
-
- Save Xml
-
-
-
- -
-
-
- <html><head/><body><p>Use transparency in the final image.</p><p>Only supported for Png format.</p></body></html>
-
-
- Transparency
-
-
-
- -
+
-
@@ -212,7 +142,7 @@
- -
+
-
@@ -283,6 +213,26 @@
+ -
+
+
+ <html><head/><body><p>Checked: clip colors and gamma correct after density filtering.</p><p>Unchecked: do it after spatial filtering.</p></body></html>
+
+
+ Early Clip
+
+
+
+ -
+
+
+ Save an Xml parameter file for each flame rendered
+
+
+ Save Xml
+
+
+
-
@@ -296,6 +246,66 @@
+ -
+
+
+ Use temporal samples value to achieve motion blur effect between flames
+
+
+ Render as Animation Sequence
+
+
+
+ -
+
+
+ Render all open flames instead of just the current one
+
+
+ Render All
+
+
+
+ -
+
+
+ <html><head/><body><p>Checked: Positive Y direction is up.</p><p>Unchecked: Positive Y direction is down.</p></body></html>
+
+
+ Positive Y Up
+
+
+
+ -
+
+
+ <html><head/><body><p>Checked: use 64-bit double precision numbers (slower, but better image quality).</p><p>Unchecked: use 32-bit single precision numbers (faster, but worse image quality).</p></body></html>
+
+
+ Use Double Precision
+
+
+
+ -
+
+
+ <html><head/><body><p>Use OpenCL to render if your video card supports it.</p><p>This is highly recommended as it will dramatically speed up render time.</p></body></html>
+
+
+ Use OpenCL
+
+
+
+ -
+
+
+ <html><head/><body><p>Use transparency in the final image.</p><p>Only supported for Png format.</p></body></html>
+
+
+ Transparency
+
+
+
-
diff --git a/Source/Fractorium/FinalRenderEmberController.cpp b/Source/Fractorium/FinalRenderEmberController.cpp
index 55fb19b..2ca9564 100644
--- a/Source/Fractorium/FinalRenderEmberController.cpp
+++ b/Source/Fractorium/FinalRenderEmberController.cpp
@@ -116,6 +116,7 @@ FinalRenderEmberController::FinalRenderEmberController(FractoriumFinalRenderD
QApplication::processEvents();
m_PreviewRenderer->EarlyClip(m_FinalRender->EarlyClip());
+ m_PreviewRenderer->YAxisUp(m_FinalRender->YAxisUp());
m_PreviewRenderer->Transparency(m_FinalRender->Transparency());
m_PreviewRenderer->SetEmber(m_PreviewEmber);
@@ -158,6 +159,7 @@ FinalRenderEmberController::FinalRenderEmberController(FractoriumFinalRenderD
QMetaObject::invokeMethod(m_FinalRender->ui.FinalRenderTextOutput, "setText", Qt::QueuedConnection, Q_ARG(QString, "Begin rendering..."));
m_Renderer->EarlyClip(m_GuiState.m_EarlyClip);
+ m_Renderer->YAxisUp(m_GuiState.m_YAxisUp);
m_Renderer->ThreadCount(m_GuiState.m_ThreadCount);
m_Renderer->Transparency(m_GuiState.m_Transparency);
@@ -312,6 +314,7 @@ int FinalRenderEmberController::ProgressFunc(Ember& ember, void* foo, doub
//Save whatever options were specified on the GUI to the settings.
m_Settings->FinalEarlyClip(m_GuiState.m_EarlyClip);
+ m_Settings->FinalYAxisUp(m_GuiState.m_YAxisUp);
m_Settings->FinalTransparency(m_GuiState.m_Transparency);
m_Settings->FinalOpenCL(m_GuiState.m_OpenCL);
m_Settings->FinalDouble(m_GuiState.m_Double);
@@ -463,6 +466,7 @@ bool FinalRenderEmberController::CreateRenderer(eRendererType renderType, uns
m_Renderer->NumChannels(channels);
m_Renderer->ReclaimOnResize(false);
m_Renderer->EarlyClip(m_FinalRender->EarlyClip());
+ m_Renderer->YAxisUp(m_FinalRender->YAxisUp());
m_Renderer->ThreadCount(m_FinalRender->ThreadCount());
m_Renderer->Transparency(m_FinalRender->Transparency());
}
diff --git a/Source/Fractorium/FinalRenderEmberController.h b/Source/Fractorium/FinalRenderEmberController.h
index f5a0218..82ef798 100644
--- a/Source/Fractorium/FinalRenderEmberController.h
+++ b/Source/Fractorium/FinalRenderEmberController.h
@@ -20,6 +20,7 @@ class FractoriumFinalRenderDialog;
struct FinalRenderGuiState
{
bool m_EarlyClip;
+ bool m_YAxisUp;
bool m_AlphaChannel;
bool m_Transparency;
bool m_OpenCL;
diff --git a/Source/Fractorium/Fractorium.cpp b/Source/Fractorium/Fractorium.cpp
index 3429e53..285bd4a 100644
--- a/Source/Fractorium/Fractorium.cpp
+++ b/Source/Fractorium/Fractorium.cpp
@@ -10,8 +10,8 @@
Fractorium::Fractorium(QWidget* parent)
: QMainWindow(parent)
{
- int spinHeight = 20;
- size_t i, j;
+ int spinHeight = 20, iconSize = 9;
+ size_t i = 0;
Timing t;
ui.setupUi(this);
qRegisterMetaType>("QVector");//For previews.
@@ -34,6 +34,37 @@ Fractorium::Fractorium(QWidget* parent)
m_OptionsDialog->setSizeGripEnabled(false);
connect(m_ColorDialog, SIGNAL(colorSelected(const QColor&)), this, SLOT(OnColorSelected(const QColor&)), Qt::QueuedConnection);
+ m_XformComboColors[i++] = QColor(0XFF, 0X00, 0X00);
+ m_XformComboColors[i++] = QColor(0XCC, 0XCC, 0X00);
+ m_XformComboColors[i++] = QColor(0X00, 0XCC, 0X00);
+ m_XformComboColors[i++] = QColor(0X00, 0XCC, 0XCC);
+ m_XformComboColors[i++] = QColor(0X40, 0X40, 0XFF);
+
+ m_XformComboColors[i++] = QColor(0XCC, 0X00, 0XCC);
+ m_XformComboColors[i++] = QColor(0XCC, 0X80, 0X00);
+ m_XformComboColors[i++] = QColor(0X80, 0X00, 0X4F);
+ m_XformComboColors[i++] = QColor(0X80, 0X80, 0X22);
+ m_XformComboColors[i++] = QColor(0X60, 0X80, 0X60);
+
+ m_XformComboColors[i++] = QColor(0X50, 0X80, 0X80);
+ m_XformComboColors[i++] = QColor(0X4F, 0X4F, 0X80);
+ m_XformComboColors[i++] = QColor(0X80, 0X50, 0X80);
+ m_XformComboColors[i++] = QColor(0X80, 0X60, 0X22);
+ m_FinalXformComboColor = QColor(0x7F, 0x7F, 0x7F);
+
+ for (i = 0; i < XFORM_COLOR_COUNT; i++)
+ {
+ QPixmap pixmap(iconSize, iconSize);
+
+ pixmap.fill(m_XformComboColors[i]);
+ m_XformComboIcons[i] = QIcon(pixmap);
+ }
+
+ QPixmap pixmap(iconSize, iconSize);
+
+ pixmap.fill(m_FinalXformComboColor);
+ m_FinalXformComboIcon = QIcon(pixmap);
+
InitToolbarUI();
InitParamsUI();
InitXformsUI();
diff --git a/Source/Fractorium/Fractorium.h b/Source/Fractorium/Fractorium.h
index 982ebd9..c2dc2a8 100644
--- a/Source/Fractorium/Fractorium.h
+++ b/Source/Fractorium/Fractorium.h
@@ -117,6 +117,7 @@ public slots:
void OnActionFinalRender(bool checked);
void OnFinalRenderClose(int result);
void OnActionOptions(bool checked);
+
void OnActionAbout(bool checked);//Help.
//Toolbar.
@@ -388,6 +389,8 @@ private:
char m_HString[16];
char m_DEString[16];
char m_CoordinateString[128];
+ QColor m_XformComboColors[XFORM_COLOR_COUNT], m_FinalXformComboColor;
+ QIcon m_XformComboIcons[XFORM_COLOR_COUNT], m_FinalXformComboIcon;
int m_FontSize;
int m_VarSortMode;
diff --git a/Source/Fractorium/Fractorium.rc b/Source/Fractorium/Fractorium.rc
index 8911044..cbc6af5 100644
Binary files a/Source/Fractorium/Fractorium.rc and b/Source/Fractorium/Fractorium.rc differ
diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui
index 564b366..8806d71 100644
--- a/Source/Fractorium/Fractorium.ui
+++ b/Source/Fractorium/Fractorium.ui
@@ -340,7 +340,7 @@
QTabWidget::Triangular
- 0
+ 2
true
@@ -1993,7 +1993,7 @@
-
- 4
+ 2
-
@@ -2005,13 +2005,13 @@
- 50
+ 60
22
- 40
+ 60
16777215
@@ -2024,6 +2024,15 @@
12
+
+
+ 9
+ 9
+
+
+
+ true
+
-
@@ -2036,7 +2045,7 @@
- 30
+ 25
0
@@ -2062,7 +2071,7 @@
- 30
+ 25
0
@@ -2088,7 +2097,7 @@
- 30
+ 25
0
@@ -2114,7 +2123,7 @@
- 30
+ 25
0
@@ -2140,13 +2149,13 @@
- 50
+ 58
0
- 60
+ 58
16777215
@@ -2730,8 +2739,8 @@ SpinBox
0
0
- 238
- 752
+ 118
+ 597
@@ -5615,6 +5624,11 @@ SpinBox
Remove the Flatten variation from each xform
+
+
+ Fl&ip
+
+
diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp
index a8c2b97..bdfefad 100644
--- a/Source/Fractorium/FractoriumEmberController.cpp
+++ b/Source/Fractorium/FractoriumEmberController.cpp
@@ -80,6 +80,8 @@ FractoriumEmberController::FractoriumEmberController(Fractorium* fractorium)
m_PreviewRenderer->Callback(NULL);
m_PreviewRenderer->NumChannels(4);
m_PreviewRenderer->ReclaimOnResize(true);
+ m_PreviewRenderer->EarlyClip(m_Fractorium->m_Settings->EarlyClip());
+ m_PreviewRenderer->YAxisUp(m_Fractorium->m_Settings->YAxisUp());
m_PreviewRenderer->SetEmber(m_Ember);//Give it an initial ember, will be updated many times later.
//m_PreviewRenderer->ThreadCount(1);//For debugging.
diff --git a/Source/Fractorium/FractoriumInfo.cpp b/Source/Fractorium/FractoriumInfo.cpp
index fad2927..8e283c5 100644
--- a/Source/Fractorium/FractoriumInfo.cpp
+++ b/Source/Fractorium/FractoriumInfo.cpp
@@ -12,8 +12,8 @@ void Fractorium::UpdateHistogramBounds()
{
sprintf_s(m_ULString, 32, "UL: %3.3f, %3.3f", r->LowerLeftX(), r->UpperRightY());//These bounds include gutter padding.
sprintf_s(m_URString, 32, "UR: %3.3f, %3.3f", -r->LowerLeftX(), r->UpperRightY());
- sprintf_s(m_LRString, 32, "LR: %3.3f, %3.3f", -r->LowerLeftX(), -r->UpperRightY());
- sprintf_s(m_LLString, 32, "LL: %3.3f, %3.3f", r->LowerLeftX(), -r->UpperRightY());
+ sprintf_s(m_LRString, 32, "LR: %3.3f, %3.3f", -r->LowerLeftX(), r->LowerLeftY());
+ sprintf_s(m_LLString, 32, "LL: %3.3f, %3.3f", r->LowerLeftX(), r->LowerLeftY());
sprintf_s(m_WString, 16, "W: %4d" , r->SuperRasW());
sprintf_s(m_HString, 16, "H: %4d" , r->SuperRasH());
diff --git a/Source/Fractorium/FractoriumPch.h b/Source/Fractorium/FractoriumPch.h
index 9fc1d72..df82582 100644
--- a/Source/Fractorium/FractoriumPch.h
+++ b/Source/Fractorium/FractoriumPch.h
@@ -39,6 +39,8 @@
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
+#define XFORM_COLOR_COUNT 14
+
using namespace std;
using namespace EmberNs;
using namespace EmberCLns;
\ No newline at end of file
diff --git a/Source/Fractorium/FractoriumRender.cpp b/Source/Fractorium/FractoriumRender.cpp
index 19cda2f..505bba8 100644
--- a/Source/Fractorium/FractoriumRender.cpp
+++ b/Source/Fractorium/FractoriumRender.cpp
@@ -478,6 +478,7 @@ bool FractoriumEmberController::CreateRenderer(eRendererType renderType, unsi
m_Renderer->ReclaimOnResize(true);
m_Renderer->SetEmber(m_Ember);//Give it an initial ember, will be updated many times later.
m_Renderer->EarlyClip(s->EarlyClip());
+ m_Renderer->YAxisUp(s->YAxisUp());
m_Renderer->ThreadCount(s->ThreadCount());
m_Renderer->Transparency(s->Transparency());
@@ -486,6 +487,15 @@ bool FractoriumEmberController::CreateRenderer(eRendererType renderType, unsi
else
m_Renderer->InteractiveFilter(s->OpenCLDEFilter() ? FILTER_DE : FILTER_LOG);
+ if ((m_Renderer->EarlyClip() != m_PreviewRenderer->EarlyClip()) ||
+ (m_Renderer->YAxisUp() != m_PreviewRenderer->YAxisUp()))
+ {
+ StopPreviewRender();
+ m_PreviewRenderer->EarlyClip(m_Renderer->EarlyClip());
+ m_PreviewRenderer->YAxisUp(m_Renderer->YAxisUp());
+ RenderPreviews();
+ }
+
m_FailedRenders = 0;
m_RenderElapsedTimer.Tic();
//Leave rendering in a stopped state. The caller is responsible for restarting the render loop again.
diff --git a/Source/Fractorium/FractoriumSettings.cpp b/Source/Fractorium/FractoriumSettings.cpp
index 8f1fe42..4cb8a94 100644
--- a/Source/Fractorium/FractoriumSettings.cpp
+++ b/Source/Fractorium/FractoriumSettings.cpp
@@ -54,7 +54,7 @@ void FractoriumSettings::EnsureDefaults()
FinalThreadCount(Timing::ProcessorCount());
if (CpuSubBatch() < 1)
- CpuSubBatch(10);
+ CpuSubBatch(1);
if (OpenCLSubBatch() < 1)
OpenCLSubBatch(1);
@@ -99,15 +99,21 @@ void FractoriumSettings::EnsureDefaults()
bool FractoriumSettings::EarlyClip() { return value(EARLYCLIP).toBool(); }
void FractoriumSettings::EarlyClip(bool b) { setValue(EARLYCLIP, b); }
-
+
+bool FractoriumSettings::YAxisUp() { return value(YAXISUP).toBool(); }
+void FractoriumSettings::YAxisUp(bool b) { setValue(YAXISUP, b); }
+
bool FractoriumSettings::Transparency() { return value(TRANSPARENCY).toBool(); }
void FractoriumSettings::Transparency(bool b) { setValue(TRANSPARENCY, b); }
+bool FractoriumSettings::OpenCL() { return value(OPENCL).toBool(); }
+void FractoriumSettings::OpenCL(bool b) { setValue(OPENCL, b); }
+
bool FractoriumSettings::Double() { return value(DOUBLEPRECISION).toBool(); }
void FractoriumSettings::Double(bool b) { setValue(DOUBLEPRECISION, b); }
-bool FractoriumSettings::OpenCL() { return value(OPENCL).toBool(); }
-void FractoriumSettings::OpenCL(bool b) { setValue(OPENCL, b); }
+bool FractoriumSettings::ShowAllXforms() { return value(SHOWALLXFORMS).toBool(); }
+void FractoriumSettings::ShowAllXforms(bool b) { setValue(SHOWALLXFORMS, b); }
unsigned int FractoriumSettings::PlatformIndex() { return value(PLATFORMINDEX).toUInt(); }
void FractoriumSettings::PlatformIndex(unsigned int i) { setValue(PLATFORMINDEX, i); }
@@ -136,7 +142,10 @@ void FractoriumSettings::OpenCLSubBatch(unsigned int b) { setValue(OPENCLSUBB
bool FractoriumSettings::FinalEarlyClip() { return value(FINALEARLYCLIP).toBool(); }
void FractoriumSettings::FinalEarlyClip(bool b) { setValue(FINALEARLYCLIP, b); }
-
+
+bool FractoriumSettings::FinalYAxisUp() { return value(FINALYAXISUP).toBool(); }
+void FractoriumSettings::FinalYAxisUp(bool b) { setValue(FINALYAXISUP, b); }
+
bool FractoriumSettings::FinalTransparency() { return value(FINALTRANSPARENCY).toBool(); }
void FractoriumSettings::FinalTransparency(bool b) { setValue(FINALTRANSPARENCY, b); }
diff --git a/Source/Fractorium/FractoriumSettings.h b/Source/Fractorium/FractoriumSettings.h
index bc263fc..cb7dfa5 100644
--- a/Source/Fractorium/FractoriumSettings.h
+++ b/Source/Fractorium/FractoriumSettings.h
@@ -7,9 +7,11 @@
///
#define EARLYCLIP "render/earlyclip"
+#define YAXISUP "render/yaxisup"
#define TRANSPARENCY "render/transparency"
#define OPENCL "render/opencl"
#define DOUBLEPRECISION "render/dp64"
+#define SHOWALLXFORMS "render/dragshowallxforms"
#define PLATFORMINDEX "render/platformindex"
#define DEVICEINDEX "render/deviceindex"
#define THREADCOUNT "render/threadcount"
@@ -19,6 +21,7 @@
#define OPENCLSUBBATCH "render/openclsubbatch"
#define FINALEARLYCLIP "finalrender/earlyclip"
+#define FINALYAXISUP "finalrender/finalyaxisup"
#define FINALTRANSPARENCY "finalrender/transparency"
#define FINALOPENCL "finalrender/opencl"
#define FINALDOUBLEPRECISION "finalrender/dp64"
@@ -69,6 +72,9 @@ public:
bool EarlyClip();
void EarlyClip(bool b);
+
+ bool YAxisUp();
+ void YAxisUp(bool b);
bool Transparency();
void Transparency(bool b);
@@ -79,6 +85,9 @@ public:
bool Double();
void Double(bool b);
+ bool ShowAllXforms();
+ void ShowAllXforms(bool b);
+
unsigned int PlatformIndex();
void PlatformIndex(unsigned int b);
@@ -102,6 +111,9 @@ public:
bool FinalEarlyClip();
void FinalEarlyClip(bool b);
+
+ bool FinalYAxisUp();
+ void FinalYAxisUp(bool b);
bool FinalTransparency();
void FinalTransparency(bool b);
diff --git a/Source/Fractorium/FractoriumXforms.cpp b/Source/Fractorium/FractoriumXforms.cpp
index 689bb95..9419d8e 100644
--- a/Source/Fractorium/FractoriumXforms.cpp
+++ b/Source/Fractorium/FractoriumXforms.cpp
@@ -201,6 +201,7 @@ void FractoriumEmberController::AddFinalXform()
xform.AddVariation(new LinearVariation());//Just a placeholder so other parts of the code don't see it as being empty.
m_Ember.SetFinalXform(xform);
combo->addItem("Final");
+ combo->setItemIcon(combo->count() - 1, m_Fractorium->m_FinalXformComboIcon);
combo->setCurrentIndex(combo->count() - 1);//Set index to the last item.
UpdateRender();
}
@@ -325,17 +326,23 @@ bool FractoriumEmberController::IsFinal(Xform* xform)
///
void Fractorium::FillXforms()
{
- int spinHeight = 20;
+ int i = 0, spinHeight = 20;
QComboBox* combo = ui.CurrentXformCombo;
combo->blockSignals(true);
combo->clear();
- for (int i = 0; i < m_Controller->XformCount(); i++)
+ for (i = 0; i < m_Controller->XformCount(); i++)
+ {
combo->addItem(QString::number(i + 1));
+ combo->setItemIcon(i, m_XformComboIcons[i % XFORM_COLOR_COUNT]);
+ }
if (m_Controller->UseFinalXform())
+ {
combo->addItem("Final");
+ combo->setItemIcon(i, m_FinalXformComboIcon);
+ }
combo->blockSignals(false);
combo->setCurrentIndex(0);
diff --git a/Source/Fractorium/GLWidget.cpp b/Source/Fractorium/GLWidget.cpp
index dc6828b..bad50bd 100644
--- a/Source/Fractorium/GLWidget.cpp
+++ b/Source/Fractorium/GLWidget.cpp
@@ -275,6 +275,7 @@ void GLEmberController::DrawAffines(bool pre, bool post)
{
QueryVMP();//Resolves to float or double specialization function depending on T.
Ember* ember = m_FractoriumEmberController->CurrentEmber();
+ bool dragging = m_DragState == DragDragging;
//Draw grid if control key is pressed.
if ((m_DragModifier & DragModControl) == DragModControl)
@@ -282,27 +283,21 @@ void GLEmberController::DrawAffines(bool pre, bool post)
m_GL->glLineWidth(1.0f);
m_GL->DrawGrid();
}
+
//When dragging, only draw the selected xform's affine and hide all others.
- if (m_DragState == DragDragging)
+ if (!m_Fractorium->m_Settings->ShowAllXforms() && dragging)
{
if (m_SelectedXform)
DrawAffine(m_SelectedXform, m_AffineType == AffinePre, true);
-
- m_GL->glPointSize(6.0f);//Draw large yellow dot on select or drag.
- m_GL->glBegin(GL_POINTS);
- m_GL->glColor4f(1.0f, 1.0f, 0.5f, 1.0f);
- m_GL->glVertex2f(m_DragHandlePos.x, m_DragHandlePos.y);
- m_GL->glEnd();
- m_GL->glPointSize(1.0f);//Restore point size.
}
- else//Not dragging, just hovering/mouse move.
+ else//Show all while dragging, or not dragging just hovering/mouse move.
{
if (pre && m_Fractorium->DrawAllPre())//Draw all pre affine if specified.
{
for (unsigned int i = 0; i < ember->TotalXformCount(); i++)
{
Xform* xform = ember->GetTotalXform(i);
- bool selected = m_HoverXform == xform;
+ bool selected = dragging ? (m_SelectedXform == xform) : (m_HoverXform == xform);
DrawAffine(xform, true, selected);
}
@@ -317,7 +312,7 @@ void GLEmberController::DrawAffines(bool pre, bool post)
for (unsigned int i = 0; i < ember->TotalXformCount(); i++)
{
Xform* xform = ember->GetTotalXform(i);
- bool selected = m_HoverXform == xform;
+ bool selected = dragging ? (m_SelectedXform == xform) : (m_HoverXform == xform);
DrawAffine(xform, false, selected);
}
@@ -326,17 +321,25 @@ void GLEmberController::DrawAffines(bool pre, bool post)
{
DrawAffine(m_HoverXform, false, true);
}
+ }
- //Draw large turquoise dot on hover if they are hovering over the selected xform.
- if (m_HoverType != HoverNone && m_HoverXform == m_SelectedXform)
- {
- m_GL->glPointSize(6.0f);
- m_GL->glBegin(GL_POINTS);
- m_GL->glColor4f(0.5f, 1.0f, 1.0f, 1.0f);
- m_GL->glVertex2f(m_HoverHandlePos.x, m_HoverHandlePos.y);
- m_GL->glEnd();
- m_GL->glPointSize(1.0f);
- }
+ if (dragging)//Draw large yellow dot on select or drag.
+ {
+ m_GL->glPointSize(6.0f);
+ m_GL->glBegin(GL_POINTS);
+ m_GL->glColor4f(1.0f, 1.0f, 0.5f, 1.0f);
+ m_GL->glVertex2f(m_DragHandlePos.x, m_DragHandlePos.y);
+ m_GL->glEnd();
+ m_GL->glPointSize(1.0f);//Restore point size.
+ }
+ else if (m_HoverType != HoverNone && m_HoverXform == m_SelectedXform)//Draw large turquoise dot on hover if they are hovering over the selected xform.
+ {
+ m_GL->glPointSize(6.0f);
+ m_GL->glBegin(GL_POINTS);
+ m_GL->glColor4f(0.5f, 1.0f, 1.0f, 1.0f);
+ m_GL->glVertex2f(m_HoverHandlePos.x, m_HoverHandlePos.y);
+ m_GL->glEnd();
+ m_GL->glPointSize(1.0f);
}
}
@@ -473,6 +476,13 @@ void GLEmberController::MousePress(QMouseEvent* e)
//The user has selected an xform by clicking on it, so update the main GUI by selecting this xform in the combo box.
m_Fractorium->CurrentXform(xformIndex);
+
+ //Update selected xform dot.
+ bool pre = m_Fractorium->ui.PreAffineGroupBox->isChecked();
+ bool post = m_Fractorium->ui.PostAffineGroupBox->isChecked();
+
+ DrawAffines(pre, post);
+ m_GL->update();
}
else//Nothing was selected.
{
@@ -937,6 +947,7 @@ void GLEmberController::DrawAffine(Xform* xform, bool pre, bool selected)
{
Ember* ember = m_FractoriumEmberController->CurrentEmber();
bool final = ember->IsFinalXform(xform);
+ int index = ember->GetXformIndex(xform);
size_t size = ember->m_Palette.m_Entries.size();
v4T color = ember->m_Palette.m_Entries[Clamp(xform->m_ColorX * size, 0, size - 1)];
Affine2D* affine = pre ? &xform->m_Affine : &xform->m_Post;
@@ -950,10 +961,10 @@ void GLEmberController::DrawAffine(Xform* xform, bool pre, bool selected)
m_GL->glLoadIdentity();
MultMatrix(mat);
m_GL->glLineWidth(3.0f);//One 3px wide, colored black, except green on x axis for post affine.
- m_GL->DrawAffineHelper(selected, pre, final, true);
+ m_GL->DrawAffineHelper(index, selected, pre, final, true);
m_GL->glLineWidth(1.0f);//Again 1px wide, colored white, to give a white middle with black outline effect.
- m_GL->DrawAffineHelper(selected, pre, final, false);
+ m_GL->DrawAffineHelper(index, selected, pre, final, false);
m_GL->glPointSize(5.0f);//Three black points, one in the center and two on the circle. Drawn big 5px first to give a black outline.
m_GL->glBegin(GL_POINTS);
@@ -984,25 +995,27 @@ void GLEmberController::DrawAffine(Xform* xform, bool pre, bool selected)
/// Draw the axes, and optionally the surrounding circle
/// of an affine transform.
///
+///
/// True if selected (draw enclosing circle), else false (only draw axes).
-void GLWidget::DrawAffineHelper(bool selected, bool pre, bool final, bool background)
+///
+///
+///
+void GLWidget::DrawAffineHelper(int index, bool selected, bool pre, bool final, bool background)
{
float px = 1.0f;
float py = 0.0f;
+ QColor col = final ? m_Fractorium->m_FinalXformComboColor : m_Fractorium->m_XformComboColors[index % XFORM_COLOR_COUNT];
glBegin(GL_LINES);
//Circle part.
if (!background)
{
- if (pre)
- glColor4f(1.0f, 1.0f, 1.0f, 1.0f);//Draw pre affine transform with white.
- else
- glColor4f(0.0f, 0.75f, 0.0f, 1.0f);//Draw post affine transform with green.
+ glColor4f(col.redF(), col.greenF(), col.blueF(), 1.0f);//Draw pre affine transform with white.
}
else
{
- glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+ glColor4f(0.0f, 0.0f, 0.0f, 1.0f);//Draw pre affine transform outline with white.
}
if (selected)
@@ -1023,19 +1036,17 @@ void GLWidget::DrawAffineHelper(bool selected, bool pre, bool final, bool backgr
//Lines from center to circle.
if (!background)
{
- if (final)
- glColor4f(1.0f, 0.0f, 0.0f, 1.0f);//Draw final xforms with red.
- else
- glColor4f(1.0f, 1.0f, 1.0f, 1.0f);//Draw normal xforms with white.
+ glColor4f(col.redF(), col.greenF(), col.blueF(), 1.0f);
}
else
{
- if (!pre)
- glColor4f(0.0f, 0.75f, 0.0f, 1.0f);//Draw post affine transform with green outline.
+ if (pre)
+ glColor4f(0.0f, 0.0f, 0.0f, 1.0f);//Draw pre affine transform outline with white.
+ else
+ glColor4f(0.0f, 0.75f, 0.0f, 1.0f);//Draw post affine transform outline with green.
}
//The lines from the center to the circle.
-
glVertex2f(0.0f, 0.0f);//X axis.
glVertex2f(1.0f, 0.0f);
diff --git a/Source/Fractorium/GLWidget.h b/Source/Fractorium/GLWidget.h
index a48a694..182bb2a 100644
--- a/Source/Fractorium/GLWidget.h
+++ b/Source/Fractorium/GLWidget.h
@@ -62,7 +62,7 @@ private:
void SetViewport();
void DrawGrid();
void DrawUnitSquare();
- void DrawAffineHelper(bool selected, bool pre, bool final, bool background);
+ void DrawAffineHelper(int index, bool selected, bool pre, bool final, bool background);
GLEmberControllerBase* GLController();
bool m_Init;
diff --git a/Source/Fractorium/OptionsDialog.cpp b/Source/Fractorium/OptionsDialog.cpp
index 61739b9..976fbf2 100644
--- a/Source/Fractorium/OptionsDialog.cpp
+++ b/Source/Fractorium/OptionsDialog.cpp
@@ -71,10 +71,12 @@ FractoriumOptionsDialog::FractoriumOptionsDialog(FractoriumSettings* settings, Q
ui.OpenCLCheckBox->setEnabled(false);
}
- ui.EarlyClipCheckBox->setChecked( m_Settings->EarlyClip());
- ui.TransparencyCheckBox->setChecked(m_Settings->Transparency());
- ui.DoublePrecisionCheckBox->setChecked( m_Settings->Double());
- ui.ThreadCountSpin->setValue( m_Settings->ThreadCount());
+ ui.EarlyClipCheckBox->setChecked( m_Settings->EarlyClip());
+ ui.YAxisUpCheckBox->setChecked( m_Settings->YAxisUp());
+ ui.TransparencyCheckBox->setChecked( m_Settings->Transparency());
+ ui.DoublePrecisionCheckBox->setChecked(m_Settings->Double());
+ ui.ShowAllXformsCheckBox->setChecked( m_Settings->ShowAllXforms());
+ ui.ThreadCountSpin->setValue( m_Settings->ThreadCount());
if (m_Settings->CpuDEFilter())
ui.CpuFilteringDERadioButton->setChecked(true);
@@ -103,9 +105,11 @@ FractoriumOptionsDialog::FractoriumOptionsDialog(FractoriumSettings* settings, Q
///
bool FractoriumOptionsDialog::EarlyClip() { return ui.EarlyClipCheckBox->isChecked(); }
+bool FractoriumOptionsDialog::YAxisUp() { return ui.YAxisUpCheckBox->isChecked(); }
bool FractoriumOptionsDialog::Transparency() { return ui.TransparencyCheckBox->isChecked(); }
bool FractoriumOptionsDialog::OpenCL() { return ui.OpenCLCheckBox->isChecked(); }
bool FractoriumOptionsDialog::Double() { return ui.DoublePrecisionCheckBox->isChecked(); }
+bool FractoriumOptionsDialog::ShowAllXforms() { return ui.ShowAllXformsCheckBox->isChecked(); }
unsigned int FractoriumOptionsDialog::PlatformIndex() { return ui.PlatformCombo->currentIndex(); }
unsigned int FractoriumOptionsDialog::DeviceIndex() { return ui.DeviceCombo->currentIndex(); }
unsigned int FractoriumOptionsDialog::ThreadCount() { return ui.ThreadCountSpin->value(); }
@@ -149,9 +153,11 @@ void FractoriumOptionsDialog::accept()
{
//Interactive rendering.
m_Settings->EarlyClip(EarlyClip());
+ m_Settings->YAxisUp(YAxisUp());
m_Settings->Transparency(Transparency());
m_Settings->OpenCL(OpenCL());
m_Settings->Double(Double());
+ m_Settings->ShowAllXforms(ShowAllXforms());
m_Settings->PlatformIndex(PlatformIndex());
m_Settings->DeviceIndex(DeviceIndex());
m_Settings->ThreadCount(ThreadCount());
@@ -183,9 +189,11 @@ void FractoriumOptionsDialog::reject()
{
//Interactive rendering.
ui.EarlyClipCheckBox->setChecked(m_Settings->EarlyClip());
+ ui.YAxisUpCheckBox->setChecked(m_Settings->YAxisUp());
ui.TransparencyCheckBox->setChecked(m_Settings->Transparency());
ui.OpenCLCheckBox->setChecked(m_Settings->OpenCL());
ui.DoublePrecisionCheckBox->setChecked(m_Settings->Double());
+ ui.ShowAllXformsCheckBox->setChecked(m_Settings->ShowAllXforms());
ui.PlatformCombo->setCurrentIndex(m_Settings->PlatformIndex());
ui.DeviceCombo->setCurrentIndex(m_Settings->DeviceIndex());
ui.ThreadCountSpin->setValue(m_Settings->ThreadCount());
diff --git a/Source/Fractorium/OptionsDialog.h b/Source/Fractorium/OptionsDialog.h
index 405c470..7308612 100644
--- a/Source/Fractorium/OptionsDialog.h
+++ b/Source/Fractorium/OptionsDialog.h
@@ -34,10 +34,12 @@ public slots:
private:
bool EarlyClip();
+ bool YAxisUp();
bool AlphaChannel();
bool Transparency();
bool OpenCL();
bool Double();
+ bool ShowAllXforms();
unsigned int PlatformIndex();
unsigned int DeviceIndex();
unsigned int ThreadCount();
diff --git a/Source/Fractorium/OptionsDialog.ui b/Source/Fractorium/OptionsDialog.ui
index 5f5563f..d56b0df 100644
--- a/Source/Fractorium/OptionsDialog.ui
+++ b/Source/Fractorium/OptionsDialog.ui
@@ -6,8 +6,8 @@
0
0
- 286
- 388
+ 300
+ 411
@@ -18,14 +18,14 @@
- 286
- 388
+ 300
+ 411
- 286
- 388
+ 300
+ 411
@@ -39,7 +39,7 @@
6
- 6
+ 4
6
@@ -94,7 +94,7 @@
- -
+
-
<html><head/><body><p>Use transparency in the final image.</p><p>This will not make a difference in the editor, but will when saving as .png and opening in other programs.</p></body></html>
@@ -104,23 +104,13 @@
- -
-
-
- <html><head/><body><p>Use OpenCL to render if your video card supports it.</p><p>This is highly recommended as it will give fluid, real-time interactive editing.</p></body></html>
-
-
- Use OpenCL
-
-
-
- -
+
-
- -
+
-
- -
+
-
<html><head/><body><p>The number of threads to use with CPU rendering.</p><p>Decrease for more responsive editing, increase for better performance.</p></body></html>
@@ -136,7 +126,7 @@
- -
+
-
CPU Filtering
@@ -183,7 +173,7 @@
- -
+
-
OpenCL Filtering
@@ -227,7 +217,7 @@
- -
+
-
The number of 10,000 iteration chunks ran per thread on the CPU
@@ -244,7 +234,7 @@ in interactive mode for each mouse movement
- -
+
-
The number of ~8M iteration chunks ran using OpenCL
@@ -261,7 +251,27 @@ in interactive mode for each mouse movement
- -
+
-
+
+
+ <html><head/><body><p>Checked: Positive Y direction is up.</p><p>Unchecked: Positive Y direction is down.</p></body></html>
+
+
+ Positive Y Up
+
+
+
+ -
+
+
+ <html><head/><body><p>Use OpenCL to render if your video card supports it.</p><p>This is highly recommended as it will give fluid, real-time interactive editing.</p></body></html>
+
+
+ Use OpenCL
+
+
+
+ -
<html><head/><body><p>Checked: use 64-bit double precision numbers (slower, but better image quality).</p><p>Unchecked: use 32-bit single precision numbers (faster, but worse image quality).</p></body></html>
@@ -271,6 +281,16 @@ in interactive mode for each mouse movement
+ -
+
+
+ <html><head/><body><p>Checked: show all xforms while dragging.</p><p>Unchecked: only show current xform while dragging.</p></body></html>
+
+
+ Show All Xforms
+
+
+