0.4.0.7 Beta 07/26/2014

0.4.0.7 Beta 07/26/2014
--User Changes
Color code xforms like Apo does.
Change other aspects of xform color drawing.
Add option to invert the Y axis to both the options final render
dialogs.
Coordinate Y axis setting with preview renders.
Add option to show all xforms when dragging. Previously, only the
current one was shown.
Make final render dialog appear in the middle of the screen.
Immediately draw yellow selection dot on mouse down.

--Bug Fixes
Resize final render dialog vertically if it's taller than the 90% of the
desktop area.
This commit is contained in:
mfeemster 2014-07-26 12:03:51 -07:00
parent ed8850e3db
commit d9d676393c
34 changed files with 394 additions and 187 deletions

View File

@ -6,7 +6,7 @@
<ProductVersion>3.7</ProductVersion>
<ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Fractorium_Beta_0.4.0.6</OutputName>
<OutputName>Fractorium_Beta_0.4.0.7</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductVersion="0.4.0.6" ?>
<?define ProductVersion="0.4.0.7" ?>
<?define ProductName="Fractorium Beta $(var.ProductVersion) ($(var.GpuType))" ?>
<?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?>
<?define Manufacturer="Fractorium"?>
@ -13,7 +13,7 @@
<!--
Change this for every release.
-->
<?define ProductCode="{16DA4191-1391-40D5-BA37-C4BC0ADED012}"?>
<?define ProductCode="{CA02C021-90D4-45F4-84C0-01E18E2474F3}"?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package

View File

@ -1,3 +1,16 @@
0.4.0.7 Beta 07/26/2014
--User Changes
Color code xforms like Apo does.
Change other aspects of xform color drawing.
Add option to invert the Y axis to both the options final render dialogs.
Coordinate Y axis setting with preview renders.
Add option to show all xforms when dragging. Previously, only the current one was shown.
Make final render dialog appear in the middle of the screen.
Immediately draw yellow selection dot on mouse down.
--Bug Fixes
Resize final render dialog vertically if it's taller than the 90% of the desktop area.
0.4.0.6 Beta 07/22/2014
--User Changes
Place certain areas of the UI on scroll panels so they are not obscured on low resolution monitors.

View File

@ -25,7 +25,7 @@ namespace EmberNs
extern void sincos(double x, double *s, double *c);
#endif
#define EMBER_VERSION "0.4.0.6"
#define EMBER_VERSION "0.4.0.7"
#define EPS6 T(1e-6)
#define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.
#define ISAAC_SIZE 4

View File

@ -13,6 +13,7 @@ Renderer<T, bucketT>::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<T, bucketT>::AccumulatorToFinalImage(unsigned char* pixel
parallel_for((unsigned int)0, FinalRasH(), [&] (unsigned int j)
{
Color<bucketT> 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<T, bucketT>::EarlyClip(bool earlyClip)
ChangeVal([&] { m_EarlyClip = earlyClip; }, FILTER_AND_ACCUM);
}
/// <summary>
/// Get whether the positive Y coordinate of the final output image is up.
/// Default: false.
/// </summary>
/// <returns>True if up, else false.</returns>
template <typename T, typename bucketT>
bool Renderer<T, bucketT>::YAxisUp() const { return m_YAxisUp; }
/// <summary>
/// Set whether the positive Y axis of the final output image is up.
/// </summary>
/// <param name="yup">True if the positive y axis is up, else false.</param>
template <typename T, typename bucketT>
void Renderer<T, bucketT>::YAxisUp(bool yup)
{
ChangeVal([&] { m_YAxisUp = yup; }, ACCUM_ONLY);
}
/// <summary>
/// Get whether to insert the palette as a block of colors in the final output image.
/// This is useful for debugging palette issues.

View File

@ -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;

View File

@ -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"

View File

@ -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"

View File

@ -65,7 +65,7 @@ template <typename T> string FinalAccumOpenCLKernelCreator<T>::FinalAccumLateCli
template <typename T>
string FinalAccumOpenCLKernelCreator<T>::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<T>::GammaCorrectionEntryPoint(unsigned int
template <typename T>
string FinalAccumOpenCLKernelCreator<T>::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<T>::GammaCorrectionKernel(unsigned int chan
template <typename T>
string FinalAccumOpenCLKernelCreator<T>::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<T>::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"

View File

@ -1250,6 +1250,7 @@ SpatialFilterCL<T> RendererCL<T>::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;

View File

@ -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"

View File

@ -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"

View File

@ -52,7 +52,7 @@
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Fractorium 0.4.0.6 Beta&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br/&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Matt Feemster&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Fractorium 0.4.0.7 Beta&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br/&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Matt Feemster&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

View File

@ -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()));
}
/// <summary>
@ -118,6 +126,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
/// </summary>
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();
}
/// <summary>
/// Whether the positive Y axis of the final output image is up.
/// </summary>
/// <param name="yup">True if the positive y axis is up, else false.</param>
void FractoriumFinalRenderDialog::OnYAxisUpCheckBoxStateChanged(int state)
{
SetMemory();
}
/// <summary>
/// Whether to use transparency in png images.
/// </summary>

View File

@ -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);

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>519</width>
<height>801</height>
<height>813</height>
</rect>
</property>
<property name="sizePolicy">
@ -61,7 +61,7 @@
<x>0</x>
<y>0</y>
<width>507</width>
<height>789</height>
<height>801</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@ -82,77 +82,7 @@
</property>
<item>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0">
<item row="1" column="1">
<widget class="QCheckBox" name="FinalRenderDoAllCheckBox">
<property name="toolTip">
<string>Render all open flames instead of just the current one</string>
</property>
<property name="text">
<string>Render All</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="FinalRenderDoSequenceCheckBox">
<property name="toolTip">
<string>Use temporal samples value to achieve motion blur effect between flames</string>
</property>
<property name="text">
<string>Render as Animation Sequence</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="FinalRenderDoublePrecisionCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: use 64-bit double precision numbers (slower, but better image quality).&lt;/p&gt;&lt;p&gt;Unchecked: use 32-bit single precision numbers (faster, but worse image quality).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use Double Precision</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="FinalRenderOpenCLCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use OpenCL to render if your video card supports it.&lt;/p&gt;&lt;p&gt;This is highly recommended as it will dramatically speed up render time.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use OpenCL</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="FinalRenderEarlyClipCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: clip colors and gamma correct after density filtering.&lt;/p&gt;&lt;p&gt;Unchecked: do it after spatial filtering.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Early Clip</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="FinalRenderSaveXmlCheckBox">
<property name="toolTip">
<string>Save an Xml parameter file for each flame rendered</string>
</property>
<property name="text">
<string>Save Xml</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="FinalRenderTransparencyCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use transparency in the final image.&lt;/p&gt;&lt;p&gt;Only supported for Png format.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Transparency</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QGroupBox" name="FinalRenderScaleGroupBox">
<property name="minimumSize">
<size>
@ -212,7 +142,7 @@
</layout>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QGroupBox" name="FinalRenderExtensionGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@ -283,6 +213,26 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="FinalRenderEarlyClipCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: clip colors and gamma correct after density filtering.&lt;/p&gt;&lt;p&gt;Unchecked: do it after spatial filtering.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Early Clip</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="FinalRenderSaveXmlCheckBox">
<property name="toolTip">
<string>Save an Xml parameter file for each flame rendered</string>
</property>
<property name="text">
<string>Save Xml</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="FinalRenderKeepAspectCheckBox">
<property name="toolTip">
@ -296,6 +246,66 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="FinalRenderDoSequenceCheckBox">
<property name="toolTip">
<string>Use temporal samples value to achieve motion blur effect between flames</string>
</property>
<property name="text">
<string>Render as Animation Sequence</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="FinalRenderDoAllCheckBox">
<property name="toolTip">
<string>Render all open flames instead of just the current one</string>
</property>
<property name="text">
<string>Render All</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="FinalRenderYAxisUpCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: Positive Y direction is up.&lt;/p&gt;&lt;p&gt;Unchecked: Positive Y direction is down.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Positive Y Up</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="FinalRenderDoublePrecisionCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: use 64-bit double precision numbers (slower, but better image quality).&lt;/p&gt;&lt;p&gt;Unchecked: use 32-bit single precision numbers (faster, but worse image quality).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use Double Precision</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="FinalRenderOpenCLCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use OpenCL to render if your video card supports it.&lt;/p&gt;&lt;p&gt;This is highly recommended as it will dramatically speed up render time.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use OpenCL</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="FinalRenderTransparencyCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use transparency in the final image.&lt;/p&gt;&lt;p&gt;Only supported for Png format.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Transparency</string>
</property>
</widget>
</item>
</layout>
</item>
<item>

View File

@ -116,6 +116,7 @@ FinalRenderEmberController<T>::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<T>::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<T>::ProgressFunc(Ember<T>& 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<T>::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());
}

View File

@ -20,6 +20,7 @@ class FractoriumFinalRenderDialog;
struct FinalRenderGuiState
{
bool m_EarlyClip;
bool m_YAxisUp;
bool m_AlphaChannel;
bool m_Transparency;
bool m_OpenCL;

View File

@ -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<int>>("QVector<int>");//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();

View File

@ -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;

Binary file not shown.

View File

@ -340,7 +340,7 @@
<enum>QTabWidget::Triangular</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<property name="usesScrollButtons">
<bool>true</bool>
@ -1993,7 +1993,7 @@
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>4</number>
<number>2</number>
</property>
<item>
<widget class="QComboBox" name="CurrentXformCombo">
@ -2005,13 +2005,13 @@
</property>
<property name="minimumSize">
<size>
<width>50</width>
<width>60</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<width>60</width>
<height>16777215</height>
</size>
</property>
@ -2024,6 +2024,15 @@
<property name="maxVisibleItems">
<number>12</number>
</property>
<property name="iconSize">
<size>
<width>9</width>
<height>9</height>
</size>
</property>
<property name="frame">
<bool>true</bool>
</property>
</widget>
</item>
<item>
@ -2036,7 +2045,7 @@
</property>
<property name="minimumSize">
<size>
<width>30</width>
<width>25</width>
<height>0</height>
</size>
</property>
@ -2062,7 +2071,7 @@
</property>
<property name="minimumSize">
<size>
<width>30</width>
<width>25</width>
<height>0</height>
</size>
</property>
@ -2088,7 +2097,7 @@
</property>
<property name="minimumSize">
<size>
<width>30</width>
<width>25</width>
<height>0</height>
</size>
</property>
@ -2114,7 +2123,7 @@
</property>
<property name="minimumSize">
<size>
<width>30</width>
<width>25</width>
<height>0</height>
</size>
</property>
@ -2140,13 +2149,13 @@
</property>
<property name="minimumSize">
<size>
<width>50</width>
<width>58</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<width>58</width>
<height>16777215</height>
</size>
</property>
@ -2730,8 +2739,8 @@ SpinBox
<rect>
<x>0</x>
<y>0</y>
<width>238</width>
<height>752</height>
<width>118</width>
<height>597</height>
</rect>
</property>
<property name="palette">
@ -5615,6 +5624,11 @@ SpinBox
<string>Remove the Flatten variation from each xform</string>
</property>
</action>
<action name="ActionFlip">
<property name="text">
<string>Fl&amp;ip</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>

View File

@ -80,6 +80,8 @@ FractoriumEmberController<T>::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.

View File

@ -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());

View File

@ -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;

View File

@ -478,6 +478,7 @@ bool FractoriumEmberController<T>::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<T>::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.

View File

@ -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); }

View File

@ -7,9 +7,11 @@
/// </summary>
#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);

View File

@ -201,6 +201,7 @@ void FractoriumEmberController<T>::AddFinalXform()
xform.AddVariation(new LinearVariation<T>());//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<T>::IsFinal(Xform<T>* xform)
/// </summary>
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);

View File

@ -275,6 +275,7 @@ void GLEmberController<T>::DrawAffines(bool pre, bool post)
{
QueryVMP();//Resolves to float or double specialization function depending on T.
Ember<T>* 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<T>::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<T>* 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<T>::DrawAffines(bool pre, bool post)
for (unsigned int i = 0; i < ember->TotalXformCount(); i++)
{
Xform<T>* 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<T>::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<T>::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<T>::DrawAffine(Xform<T>* xform, bool pre, bool selected)
{
Ember<T>* 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<T>(xform->m_ColorX * size, 0, size - 1)];
Affine2D<T>* affine = pre ? &xform->m_Affine : &xform->m_Post;
@ -950,10 +961,10 @@ void GLEmberController<T>::DrawAffine(Xform<T>* 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<T>::DrawAffine(Xform<T>* xform, bool pre, bool selected)
/// Draw the axes, and optionally the surrounding circle
/// of an affine transform.
/// </summary>
/// <param name="index"></param>
/// <param name="selected">True if selected (draw enclosing circle), else false (only draw axes).</param>
void GLWidget::DrawAffineHelper(bool selected, bool pre, bool final, bool background)
/// <param name="pre"></param>
/// <param name="final"></param>
/// <param name="background"></param>
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);

View File

@ -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;

View File

@ -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
/// </summary>
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());

View File

@ -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();

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>286</width>
<height>388</height>
<width>300</width>
<height>411</height>
</rect>
</property>
<property name="sizePolicy">
@ -18,14 +18,14 @@
</property>
<property name="minimumSize">
<size>
<width>286</width>
<height>388</height>
<width>300</width>
<height>411</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>286</width>
<height>388</height>
<width>300</width>
<height>411</height>
</size>
</property>
<property name="windowTitle">
@ -39,7 +39,7 @@
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
<number>4</number>
</property>
<property name="bottomMargin">
<number>6</number>
@ -94,7 +94,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QCheckBox" name="TransparencyCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use transparency in the final image.&lt;/p&gt;&lt;p&gt;This will not make a difference in the editor, but will when saving as .png and opening in other programs.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -104,23 +104,13 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="OpenCLCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use OpenCL to render if your video card supports it.&lt;/p&gt;&lt;p&gt;This is highly recommended as it will give fluid, real-time interactive editing.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use OpenCL</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="5" column="0" colspan="2">
<widget class="QComboBox" name="PlatformCombo"/>
</item>
<item row="5" column="0" colspan="2">
<item row="6" column="0" colspan="2">
<widget class="QComboBox" name="DeviceCombo"/>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QSpinBox" name="ThreadCountSpin">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The number of threads to use with CPU rendering.&lt;/p&gt;&lt;p&gt;Decrease for more responsive editing, increase for better performance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -136,7 +126,7 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QGroupBox" name="InteraciveCpuFilteringGroupBox">
<property name="title">
<string>CPU Filtering</string>
@ -183,7 +173,7 @@
</layout>
</widget>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QGroupBox" name="InteraciveGpuFilteringGroupBox">
<property name="title">
<string>OpenCL Filtering</string>
@ -227,7 +217,7 @@
</layout>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QSpinBox" name="CpuSubBatchSpin">
<property name="toolTip">
<string>The number of 10,000 iteration chunks ran per thread on the CPU
@ -244,7 +234,7 @@ in interactive mode for each mouse movement</string>
</property>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QSpinBox" name="OpenCLSubBatchSpin">
<property name="toolTip">
<string>The number of ~8M iteration chunks ran using OpenCL
@ -261,7 +251,27 @@ in interactive mode for each mouse movement</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="1" column="0">
<widget class="QCheckBox" name="YAxisUpCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: Positive Y direction is up.&lt;/p&gt;&lt;p&gt;Unchecked: Positive Y direction is down.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Positive Y Up</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="OpenCLCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use OpenCL to render if your video card supports it.&lt;/p&gt;&lt;p&gt;This is highly recommended as it will give fluid, real-time interactive editing.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use OpenCL</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="DoublePrecisionCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: use 64-bit double precision numbers (slower, but better image quality).&lt;/p&gt;&lt;p&gt;Unchecked: use 32-bit single precision numbers (faster, but worse image quality).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -271,6 +281,16 @@ in interactive mode for each mouse movement</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="ShowAllXformsCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Checked: show all xforms while dragging.&lt;/p&gt;&lt;p&gt;Unchecked: only show current xform while dragging.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Show All Xforms</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="OptionsXmlSavingTab">