More Linux work. Convert all casts to new style, away from legacy.

This commit is contained in:
mfeemster 2014-12-06 23:51:44 -08:00
parent 47dd9fe35c
commit 623d417f0f
52 changed files with 946 additions and 880 deletions

View File

@ -98,6 +98,8 @@
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add option="-Wno-unused-function" />
<Add option="-Wold-style-cast" />
<Add directory="/usr/include/libxml2" />
</Compiler>
<Linker>

View File

@ -1,9 +1,9 @@
# depslib dependency file v1.0
1417821052 source:/home/heretic/Dev/fractorium/Source/Ember/Affine2D.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/Ember/Affine2D.cpp
"EmberPch.h"
"Affine2D.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
@ -35,6 +35,7 @@
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/detail/type_int.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
@ -160,22 +161,22 @@
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
1417905955 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
1417921234 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
1417917311 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 source:/home/heretic/Dev/fractorium/Source/Ember/DllMain.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/Ember/DllMain.cpp
"EmberPch.h"
1417813888 source:/home/heretic/Dev/fractorium/Source/Ember/Ember.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/Ember/Ember.cpp
"EmberPch.h"
"EmberDefines.h"
"Isaac.h"
@ -205,17 +206,17 @@
"Timing.h"
"SheepTools.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
1417915457 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
1417908868 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
@ -223,70 +224,70 @@
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
1417907217 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
1417917944 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
1417906341 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
1417908486 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
1417907820 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
1417908258 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
1417909715 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
1417907380 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
1417928702 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
1417918151 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
1417919921 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
1417915259 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
1417921679 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
@ -295,28 +296,28 @@
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417760119 source:/home/heretic/Dev/fractorium/Source/Ember/EmberPch.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/Ember/EmberPch.cpp
"EmberPch.h"
1417813874 source:/home/heretic/Dev/fractorium/Source/Ember/Renderer.cpp
1417922137 source:/home/heretic/Dev/fractorium/Source/Ember/Renderer.cpp
"EmberPch.h"
"Renderer.h"
1417760119 source:/home/heretic/Dev/fractorium/Source/Ember/RendererBase.cpp
1417920290 source:/home/heretic/Dev/fractorium/Source/Ember/RendererBase.cpp
"EmberPch.h"
"RendererBase.h"

View File

@ -1,139 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/Ember/Ember.cpp" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13691" topLine="374" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations05.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="37378" topLine="1097" />
</Cursor>
</File>
<File name="../../Source/Ember/SheepTools.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="26633" topLine="913" />
</Cursor>
</File>
<File name="../../Source/Ember/Timing.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1699" topLine="12" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations01.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3674" topLine="128" />
</Cursor>
</File>
<File name="../../Source/Ember/Iterator.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2509" topLine="39" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberPch.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="314" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/SpatialFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="22861" topLine="816" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations03.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="62259" topLine="1950" />
</Cursor>
</File>
<File name="../../Source/Ember/Ember.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="35507" topLine="1125" />
</Cursor>
</File>
<File name="../../Source/Ember/TemporalFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9058" topLine="269" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberToXml.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20943" topLine="583" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9387" topLine="165" />
</Cursor>
</File>
<File name="../../Source/Ember/Point.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3653" topLine="148" />
<Cursor1 position="3789" topLine="98" />
</Cursor>
</File>
<File name="../../Source/Ember/Xform.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="38604" topLine="1219" />
</Cursor>
</File>
<File name="../../Source/Ember/PaletteList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1381" topLine="37" />
</Cursor>
</File>
<File name="../../Source/Ember/XmlToEmber.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28302" topLine="621" />
</Cursor>
</File>
<File name="../../Source/Ember/Interpolate.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18225" topLine="507" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations04.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="98407" topLine="3204" />
</Cursor>
</File>
<File name="../../Source/Ember/Palette.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8808" topLine="105" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.cpp" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10791" topLine="336" />
</Cursor>
</File>
<File name="../../Source/Ember/Variation.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="46958" topLine="1599" />
</Cursor>
</File>
<File name="../../Source/Ember/CarToRas.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2973" topLine="67" />
</Cursor>
</File>
<File name="../../Source/Ember/RendererBase.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6837" topLine="184" />
</Cursor>
</File>
<File name="../../Source/Ember/VariationList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14159" topLine="419" />
</Cursor>
</File>
<File name="../../Source/Ember/Utils.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24688" topLine="817" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.cpp" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="64477" topLine="1566" />
<Cursor1 position="11593" topLine="422" />
</Cursor>
</File>
<File name="../../Source/Ember/DllMain.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -141,11 +16,121 @@
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/RendererBase.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6894" topLine="183" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations01.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24427" topLine="850" />
</Cursor>
</File>
<File name="../../Source/Ember/SheepTools.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17291" topLine="598" />
</Cursor>
</File>
<File name="../../Source/Ember/VariationsDC.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="22857" topLine="672" />
</Cursor>
</File>
<File name="../../Source/Ember/VariationList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14159" topLine="419" />
</Cursor>
</File>
<File name="../../Source/Ember/Interpolate.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18225" topLine="507" />
</Cursor>
</File>
<File name="../../Source/Ember/Ember.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="39146" topLine="1242" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations03.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="121967" topLine="3845" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberToXml.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21325" topLine="635" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="54173" topLine="1346" />
</Cursor>
</File>
<File name="../../Source/Ember/Utils.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21157" topLine="689" />
</Cursor>
</File>
<File name="../../Source/Ember/TemporalFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9058" topLine="269" />
</Cursor>
</File>
<File name="../../Source/Ember/Isaac.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8233" topLine="210" />
</Cursor>
</File>
<File name="../../Source/Ember/Timing.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3212" topLine="91" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberDefines.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1899" topLine="57" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4461" topLine="77" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberPch.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="314" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/Palette.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14170" topLine="295" />
</Cursor>
</File>
<File name="../../Source/Ember/DensityFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5542" topLine="173" />
</Cursor>
</File>
<File name="../../Source/Ember/XmlToEmber.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17930" topLine="385" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.cpp" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10791" topLine="325" />
</Cursor>
</File>
<File name="../../Source/Ember/CarToRas.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4534" topLine="119" />
</Cursor>
</File>
<File name="../../Source/Ember/RendererBase.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14912" topLine="437" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberPch.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
@ -153,22 +138,47 @@
</File>
<File name="../../Source/Ember/Variations02.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="116327" topLine="3912" />
<Cursor1 position="325" topLine="3" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberDefines.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Point.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2273" topLine="59" />
<Cursor1 position="3621" topLine="148" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Variations05.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2877" topLine="92" />
<Cursor1 position="59509" topLine="1823" />
</Cursor>
</File>
<File name="../../Source/Ember/Isaac.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Iterator.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8062" topLine="258" />
<Cursor1 position="2705" topLine="57" />
</Cursor>
</File>
<File name="../../Source/Ember/Variation.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="23279" topLine="1073" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2877" topLine="81" />
</Cursor>
</File>
<File name="../../Source/Ember/Ember.cpp" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14346" topLine="378" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations04.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="90092" topLine="2971" />
</Cursor>
</File>
<File name="../../Source/Ember/PaletteList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4617" topLine="160" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -76,6 +76,8 @@
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add option="-Wno-unused-function" />
<Add option="-Wold-style-cast" />
<Add directory="/usr/include/libxml2" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCL" />

View File

@ -1,8 +1,8 @@
# depslib dependency file v1.0
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
"EmberCommonPch.h"
1417812217 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
<SDKDDKVer.h>
<windows.h>
<winsock.h>
@ -33,17 +33,17 @@
"SimpleGlob.h"
"SimpleOpt.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
1417915457 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
1417908868 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
@ -51,22 +51,22 @@
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
1417907217 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
1417917944 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
1417917311 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
@ -98,6 +98,7 @@
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/detail/type_int.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
@ -223,64 +224,64 @@
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
1417905955 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
1417921234 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
1417906341 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
1417908486 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
1417907820 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
1417908258 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
1417909715 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
1417907380 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
1417918151 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
1417919921 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
1417928702 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
1417921679 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
@ -289,25 +290,25 @@
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
1417915259 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
1417928136 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
@ -324,38 +325,38 @@
<iterator>
<time.h>
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
1417928227 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417816836 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
1417934059 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
<mbstring.h>
<sys/types.h>
<sys/stat.h>
@ -367,26 +368,26 @@
<crtdbg.h>
<assert.h>
1417817700 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
1417934252 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
<stdlib.h>
<string.h>
<crtdbg.h>
<assert.h>
1417821813 source:/home/heretic/Dev/fractorium/Source/EmberAnimate/EmberAnimate.cpp
1417935223 source:/home/heretic/Dev/fractorium/Source/EmberAnimate/EmberAnimate.cpp
"EmberCommonPch.h"
"EmberAnimate.h"
"JpegUtils.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberAnimate/EmberAnimate.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberAnimate/EmberAnimate.h
"EmberOptions.h"
1417774919 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
1417930466 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
"EmberCommon.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
1417930466 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
"EmberCommonPch.h"
1417775759 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
1417932245 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
"EmberCommonPch.h"

View File

@ -3,7 +3,12 @@
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberAnimate/EmberAnimate.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9928" topLine="290" />
<Cursor1 position="5739" topLine="184" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberCommon.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4835" topLine="143" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -149,6 +149,8 @@
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add option="-Wno-unused-function" />
<Add option="-Wold-style-cast" />
<Add directory="/usr/include/libxml2" />
</Compiler>
<Linker>

View File

@ -1,9 +1,9 @@
# depslib dependency file v1.0
1417814313 source:/home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.cpp
1417928577 source:/home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.cpp
"EmberCLPch.h"
"DEOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
@ -20,13 +20,13 @@
<iterator>
<time.h>
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Timing.h
1417906341 /home/heretic/Dev/fractorium/Source/Ember//Timing.h
"EmberDefines.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember//EmberDefines.h
1417917311 /home/heretic/Dev/fractorium/Source/Ember//EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//EmberPch.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
@ -58,6 +58,7 @@
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/detail/type_int.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
@ -183,7 +184,7 @@
<libxml/parser.h>
<libxml/encoding.h>
1417810944 /home/heretic/Dev/fractorium/Source/Ember//Renderer.h
1417921679 /home/heretic/Dev/fractorium/Source/Ember//Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
@ -192,28 +193,28 @@
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember//RendererBase.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember//Utils.h
1417905955 /home/heretic/Dev/fractorium/Source/Ember//Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Isaac.h
1417921234 /home/heretic/Dev/fractorium/Source/Ember//Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Ember.h
1417915457 /home/heretic/Dev/fractorium/Source/Ember//Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Xform.h
1417908868 /home/heretic/Dev/fractorium/Source/Ember//Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//VariationList.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
@ -221,112 +222,112 @@
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations01.h
1417907217 /home/heretic/Dev/fractorium/Source/Ember//Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variation.h
1417917944 /home/heretic/Dev/fractorium/Source/Ember//Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Point.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417810095 /home/heretic/Dev/fractorium/Source/Ember//Affine2D.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//Affine2D.h
"Utils.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations02.h
1417908486 /home/heretic/Dev/fractorium/Source/Ember//Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations03.h
1417907820 /home/heretic/Dev/fractorium/Source/Ember//Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations04.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember//Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations05.h
1417908258 /home/heretic/Dev/fractorium/Source/Ember//Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//VariationsDC.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Interpolate.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//PaletteList.h
1417909715 /home/heretic/Dev/fractorium/Source/Ember//PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Palette.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember//Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//SpatialFilter.h
1417907380 /home/heretic/Dev/fractorium/Source/Ember//SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//TemporalFilter.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember//TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//DensityFilter.h
1417915259 /home/heretic/Dev/fractorium/Source/Ember//DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Iterator.h
1417928702 /home/heretic/Dev/fractorium/Source/Ember//Iterator.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//CarToRas.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember//CarToRas.h
"Point.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//EmberToXml.h
1417918151 /home/heretic/Dev/fractorium/Source/Ember//EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
1417928227 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCL/DllMain.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberCL/DllMain.cpp
"EmberCLPch.h"
1417814313 source:/home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp
"EmberCLPch.h"
"FinalAccumOpenCLKernelCreator.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417814434 source:/home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.cpp
"EmberCLPch.h"
"IterOpenCLKernelCreator.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417814434 source:/home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.cpp
1417929845 source:/home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.cpp
"EmberCLPch.h"
"OpenCLWrapper.h"
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417829447 source:/home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.cpp
1417926792 source:/home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.cpp
"EmberCLPch.h"
"RendererCL.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
1417928136 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"

View File

@ -1,44 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3552" topLine="53" />
<Cursor1 position="23124" topLine="478" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DEOpenCLKernelCreator.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCL/EmberCLStructs.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2563" topLine="52" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLFunctions.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10375" topLine="385" />
</Cursor>
</File>
<File name="../../Source/EmberCL/OpenCLWrapper.cpp" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="46085" topLine="1300" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DllMain.cpp" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLStructs.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8762" topLine="265" />
</Cursor>
</File>
<File name="../../Source/EmberCL/RendererCL.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="57657" topLine="1443" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DEOpenCLKernelCreator.cpp" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="40101" topLine="851" />
<Cursor1 position="10704" topLine="341" />
</Cursor>
</File>
<File name="../../Source/EmberCL/OpenCLWrapper.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -46,29 +16,59 @@
<Cursor1 position="5054" topLine="127" />
</Cursor>
</File>
<File name="../../Source/EmberCL/RendererCL.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7648" topLine="173" />
</Cursor>
</File>
<File name="../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="23124" topLine="488" />
</Cursor>
</File>
<File name="../../Source/EmberCL/IterOpenCLKernelCreator.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28977" topLine="810" />
</Cursor>
</File>
<File name="../../Source/EmberCL/IterOpenCLKernelCreator.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCL/IterOpenCLKernelCreator.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1445" topLine="29" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLPch.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCL/EmberCLFunctions.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="794" topLine="13" />
<Cursor1 position="7346" topLine="309" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DEOpenCLKernelCreator.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7955" topLine="174" />
</Cursor>
</File>
<File name="../../Source/EmberCL/RendererCL.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="58613" topLine="1449" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLPch.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="794" topLine="2" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DEOpenCLKernelCreator.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2365" topLine="35" />
</Cursor>
</File>
<File name="../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3386" topLine="37" />
</Cursor>
</File>
<File name="../../Source/EmberCL/RendererCL.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1822" topLine="38" />
</Cursor>
</File>
<File name="../../Source/EmberCL/OpenCLWrapper.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="39340" topLine="1173" />
</Cursor>
</File>
<File name="../../Source/EmberCL/IterOpenCLKernelCreator.cpp" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28977" topLine="799" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DllMain.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -76,6 +76,8 @@
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add option="-Wno-unused-function" />
<Add option="-Wold-style-cast" />
<Add directory="/usr/include/libxml2" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCL" />

View File

@ -1,8 +1,8 @@
# depslib dependency file v1.0
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
"EmberCommonPch.h"
1417812217 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
<SDKDDKVer.h>
<windows.h>
<winsock.h>
@ -33,17 +33,17 @@
"SimpleGlob.h"
"SimpleOpt.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
1417915457 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
1417908868 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
@ -51,22 +51,22 @@
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
1417907217 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
1417917944 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
1417917311 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
@ -98,6 +98,7 @@
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/detail/type_int.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
@ -223,64 +224,64 @@
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
1417905955 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
1417921234 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
1417906341 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
1417908486 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
1417907820 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
1417908258 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
1417909715 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
1417907380 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
1417918151 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
1417919921 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
1417928702 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
1417921679 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
@ -289,25 +290,25 @@
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
1417915259 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
1417928136 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
@ -324,38 +325,38 @@
<iterator>
<time.h>
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
1417928227 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417816836 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
1417934059 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
<mbstring.h>
<sys/types.h>
<sys/stat.h>
@ -367,26 +368,26 @@
<crtdbg.h>
<assert.h>
1417817700 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
1417934252 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
<stdlib.h>
<string.h>
<crtdbg.h>
<assert.h>
1417823420 source:/home/heretic/Dev/fractorium/Source/EmberGenome/EmberGenome.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberGenome/EmberGenome.cpp
"EmberCommonPch.h"
"EmberGenome.h"
"JpegUtils.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberGenome/EmberGenome.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberGenome/EmberGenome.h
"EmberOptions.h"
1417774919 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
1417930466 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
"EmberCommon.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
1417930466 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
"EmberCommonPch.h"
1417775759 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
1417932245 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
"EmberCommonPch.h"

View File

@ -1,14 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCommon/EmberCommon.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberGenome/EmberGenome.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberOptions.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
<Cursor1 position="21828" topLine="752" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/JpegUtils.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -21,7 +16,7 @@
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/SimpleOpt.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/EmberCommon.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
@ -31,7 +26,12 @@
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberCommonPch.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/EmberOptions.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/SimpleOpt.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>

View File

@ -136,6 +136,8 @@
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add option="-Wno-unused-function" />
<Add option="-Wold-style-cast" />
<Add directory="/usr/include/libxml2" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCL" />

View File

@ -1,8 +1,8 @@
# depslib dependency file v1.0
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
1417901704 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
"EmberCommonPch.h"
1417812217 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
<SDKDDKVer.h>
<windows.h>
<winsock.h>
@ -33,17 +33,17 @@
"SimpleGlob.h"
"SimpleOpt.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
1417915457 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
1417908868 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
@ -51,22 +51,22 @@
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
1417907217 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
1417917944 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
1417917311 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
@ -98,6 +98,7 @@
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/detail/type_int.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
@ -223,64 +224,64 @@
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
1417905955 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
1417921234 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
1417906341 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
1417908486 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
1417907820 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
1417908258 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
1417909715 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
1417908559 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
1417907380 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
1417918151 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
1417919921 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
1417928702 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
1417921679 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
@ -289,25 +290,25 @@
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
1417901704 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
1417915259 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
1417928136 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
@ -324,38 +325,38 @@
<iterator>
<time.h>
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
1417928227 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
1417905627 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417816836 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
1417934059 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
<mbstring.h>
<sys/types.h>
<sys/stat.h>
@ -367,26 +368,26 @@
<crtdbg.h>
<assert.h>
1417817700 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
1417934252 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
<stdlib.h>
<string.h>
<crtdbg.h>
<assert.h>
1417826935 source:/home/heretic/Dev/fractorium/Source/EmberRender/EmberRender.cpp
1417931774 source:/home/heretic/Dev/fractorium/Source/EmberRender/EmberRender.cpp
"EmberCommonPch.h"
"EmberRender.h"
"JpegUtils.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberRender/EmberRender.h
1417901704 /home/heretic/Dev/fractorium/Source/EmberRender/EmberRender.h
"EmberOptions.h"
1417774919 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
1417930466 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
"EmberCommon.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
1417930466 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
"EmberCommonPch.h"
1417775759 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
1417932245 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
"EmberCommonPch.h"

View File

@ -1,6 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCommon/JpegUtils.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6646" topLine="170" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberOptions.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3660" topLine="147" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberCommonPch.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="546" topLine="0" />
@ -8,27 +18,22 @@
</File>
<File name="../../Source/EmberCommon/SimpleOpt.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="23911" topLine="734" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/SimpleGlob.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28795" topLine="894" />
<Cursor1 position="19841" topLine="580" />
</Cursor>
</File>
<File name="../../Source/EmberRender/EmberRender.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11058" topLine="309" />
<Cursor1 position="11353" topLine="330" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberOptions.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/SimpleGlob.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="32737" topLine="469" />
<Cursor1 position="28888" topLine="905" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/JpegUtils.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/EmberCommon.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10816" topLine="287" />
<Cursor1 position="2710" topLine="73" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_layout_file>
<ActiveProject path="EmberRender.cbp" />
<PreferredTarget name="Release x64" />
</CodeBlocks_workspace_layout_file>

View File

@ -128,10 +128,10 @@ public:
T invSizeW = T(1.0) / carW;
T invSizeH = T(1.0) / carH;
m_PixPerImageUnitW = (T)rasW * invSizeW;
m_PixPerImageUnitW = static_cast<T>(rasW) * invSizeW;
m_RasLlX = m_PixPerImageUnitW * carLlX;
m_PixPerImageUnitH = (T)rasH * invSizeH;
m_PixPerImageUnitH = static_cast<T>(rasH) * invSizeH;
m_RasLlY = m_PixPerImageUnitH * carLlY;
m_OneRow = abs(m_CarUrY - m_CarLlY) / m_RasHeight;
@ -158,8 +158,8 @@ public:
/// <param name="rasY">The converted raster y</param>
inline void Convert(T cartX, T cartY, size_t& rasX, size_t& rasY)
{
rasX = (size_t)(m_PixPerImageUnitW * cartX - m_RasLlX);
rasY = (size_t)(m_RasLlY - (m_PixPerImageUnitH * cartY));
rasX = static_cast<size_t>(m_PixPerImageUnitW * cartX - m_RasLlX);
rasY = static_cast<size_t>(m_RasLlY - (m_PixPerImageUnitH * cartY));
}
/// <summary>
@ -175,7 +175,7 @@ public:
/// <param name="singleBufferIndex">The converted single raster buffer index</param>
inline void Convert(T cartX, T cartY, size_t& singleBufferIndex)
{
singleBufferIndex = (size_t)(m_PixPerImageUnitW * cartX - m_RasLlX) + (m_RasWidth * (size_t)(m_PixPerImageUnitH * cartY - m_RasLlY));
singleBufferIndex = static_cast<size_t>(m_PixPerImageUnitW * cartX - m_RasLlX) + (m_RasWidth * static_cast<size_t>(m_PixPerImageUnitH * cartY - m_RasLlY));
}
/// <summary>
@ -192,7 +192,7 @@ public:
/// <param name="singleBufferIndex">The converted single raster buffer index</param>
inline void Convert(Point<T>& point, size_t& singleBufferIndex)
{
singleBufferIndex = (size_t)(m_PixPerImageUnitW * point.m_X - m_RasLlX) + (m_RasWidth * (size_t)(m_PixPerImageUnitH * point.m_Y - m_RasLlY));
singleBufferIndex = static_cast<size_t>(m_PixPerImageUnitW * point.m_X - m_RasLlX) + (m_RasWidth * static_cast<size_t>(m_PixPerImageUnitH * point.m_Y - m_RasLlY));
}
/// <summary>

View File

@ -128,13 +128,13 @@ public:
if (decFilterCount > 1e7)//Too many filters.
return false;
intFilterCount = (int)ceil(decFilterCount);
intFilterCount = static_cast<int>(ceil(decFilterCount));
//Condense the smaller kernels to save space.
if (intFilterCount > keepThresh)
{
maxIndex = (int)ceil(DE_THRESH + pow(T(intFilterCount - DE_THRESH), m_Curve)) + 1;
m_MaxFilteredCounts = (int)pow(T(maxIndex - DE_THRESH), T(1.0) / m_Curve) + DE_THRESH;
maxIndex = static_cast<int>(ceil(DE_THRESH + pow(T(intFilterCount - DE_THRESH), m_Curve))) + 1;
m_MaxFilteredCounts = static_cast<int>(pow(T(maxIndex - DE_THRESH), T(1.0) / m_Curve)) + DE_THRESH;
}
else
{
@ -143,7 +143,7 @@ public:
}
//Allocate the memory for these filters and the hit/width lookup array.
rowSize = (int)(2 * ceil(finalMaxRad) - 1);
rowSize = static_cast<int>(2 * ceil(finalMaxRad) - 1);
m_FilterWidth = (rowSize - 1) / 2;
m_KernelSize = (m_FilterWidth + 1) * (2 + m_FilterWidth) / 2;
@ -185,7 +185,7 @@ public:
{
for (dek = -m_FilterWidth; dek <= m_FilterWidth; dek++)
{
filterVal = sqrt((T)(dej * dej + dek * dek)) / filterHeight;
filterVal = sqrt(T(dej * dej + dek * dek)) / filterHeight;
//Only populate the coefs within this radius.
if (filterVal <= 1.0)
@ -344,4 +344,4 @@ private:
vector<T> m_Widths;
vector<uint> m_CoefIndices;
};
}
}

View File

@ -370,7 +370,7 @@ public:
Xform<T>* GetXform(size_t i) const
{
if (i < XformCount())
return (Xform<T>*)&m_Xforms[i];
return const_cast<Xform<T>*>(&m_Xforms[i]);
else
return nullptr;
}
@ -384,9 +384,9 @@ public:
Xform<T>* GetTotalXform(size_t i, bool forceFinal = false) const
{
if (i < XformCount())
return (Xform<T>*)&m_Xforms[i];
return const_cast<Xform<T>*>(&m_Xforms[i]);
else if (i == XformCount() || forceFinal)
return (Xform<T>*)&m_FinalXform;
return const_cast<Xform<T>*>(&m_FinalXform);
else
return nullptr;
}
@ -402,7 +402,7 @@ public:
for (size_t i = 0; i < m_Xforms.size(); i++)
if (GetXform(i) == xform)
return (intmax_t)i;
return intmax_t(i);
return index;
}
@ -418,7 +418,7 @@ public:
for (size_t i = 0; i < totalXformCount; i++)
if (GetTotalXform(i) == xform)
return (intmax_t)i;
return intmax_t(i);
return -1;
}
@ -1478,7 +1478,7 @@ public:
//The multiplier in size of the histogram and DE filtering buffers. Must be at least one, preferrably never larger than 4, only useful at 2.
//Xml field: "supersample" or "overample (deprecated)".
size_t m_Supersample;
//When animating, split each pass into this many pieces, each doing a fraction of the total iterations. Each temporal sample
//will render an interpolated instance of the ember that is a fraction of the current ember and the next one.
//When rendering a single image, this field is always set to 1.
@ -1711,7 +1711,7 @@ private:
for (size_t k = 0; k < size; k++)
t += coefs[k] * embers[k].*m;
this->*m = (size_t)Rint(t);
this->*m = size_t(Rint(t));
}
/// <summary>

View File

@ -61,7 +61,10 @@ namespace EmberNs
#define COLORMAP_LENGTH_MINUS_1 255
#define WHITE 255
#define DEFAULT_SBS (1024 * 10)
#define XC (const xmlChar*)
//#define XC(c) ((const xmlChar*)(c))
#define XC(c) (reinterpret_cast<const xmlChar*>(c))
#define CX(c) (reinterpret_cast<char*>(c))
#define CCX(c) (reinterpret_cast<const char*>(c))
#define BadVal(x) (((x) != (x)) || ((x) > 1e10) || ((x) < -1e10))
#define Rint(A) floor((A) + (((A) < 0) ? T(-0.5) : T(0.5)))
#define Vlen(x) (sizeof(x) / sizeof(*x))

View File

@ -231,9 +231,9 @@ public:
{
size_t idx = 8 * i + j;
os << hex << setw(2) << setfill('0') << (int)Rint(ember.m_Palette[idx][0] * 255);
os << hex << setw(2) << setfill('0') << (int)Rint(ember.m_Palette[idx][1] * 255);
os << hex << setw(2) << setfill('0') << (int)Rint(ember.m_Palette[idx][2] * 255);
os << hex << setw(2) << setfill('0') << int(Rint(ember.m_Palette[idx][0] * 255));
os << hex << setw(2) << setfill('0') << int(Rint(ember.m_Palette[idx][1] * 255));
os << hex << setw(2) << setfill('0') << int(Rint(ember.m_Palette[idx][2] * 255));
}
os << endl;
@ -255,14 +255,14 @@ public:
if (IsClose(a, 255.0))
{
if (intPalette)
os << "<color index=\"" << i << "\" rgb=\"" << (int)Rint(r) << " " << (int)Rint(g) << " " << (int)Rint(b) << "\"/>";
os << "<color index=\"" << i << "\" rgb=\"" << int(Rint(r)) << " " << int(Rint(g)) << " " << int(Rint(b)) << "\"/>";
else
os << "<color index=\"" << i << "\" rgb=\"" << std::fixed << std::setprecision(2) << r << " " << g << " " << b << "\"/>";
}
else
{
if (intPalette)
os << " <color index=\"" << i << "\" rgba=\"" << (int)Rint(r) << " " << (int)Rint(g) << " " << (int)Rint(b) << " " << (int)Rint(a) << "\"/>";
os << " <color index=\"" << i << "\" rgba=\"" << int(Rint(r)) << " " << int(Rint(g)) << " " << int(Rint(b)) << " " << int(Rint(a)) << "\"/>";
else
os << " <color index=\"" << i << "\" rgba=\"" << std::fixed << std::setprecision(2) << r << " " << g << " " << b << " " << a << "\"/>";
}
@ -300,13 +300,13 @@ public:
time_t myTime;
string s;
xmlDocPtr commentDoc = nullptr;
xmlDocPtr doc = xmlNewDoc(XC "1.0");
xmlDocPtr doc = xmlNewDoc(XC("1.0"));
xmlNodePtr rootNode = nullptr, node = nullptr, nodeCopy = nullptr;
xmlNodePtr rootComment = nullptr;
ostringstream os;
//Create the root node, called "edit".
rootNode = xmlNewNode(nullptr, XC "edit");
rootNode = xmlNewNode(nullptr, XC("edit"));
xmlDocSetRootElement(doc, rootNode);
//Add the edit attributes.
@ -321,37 +321,37 @@ public:
localt = localtime(&myTime);
strftime(timeString, 128, "%a %b %d %H:%M:%S %z %Y", localt);//XXX use standard time format including timezone.
#endif
xmlNewProp(rootNode, XC "date", XC timeString);
xmlNewProp(rootNode, XC("date"), XC(timeString));
//Nick.
if (nick != "")
xmlNewProp(rootNode, XC "nick", XC nick.c_str());
xmlNewProp(rootNode, XC("nick"), XC(nick.c_str()));
//Url.
if (url != "")
xmlNewProp(rootNode, XC "url", XC url.c_str());
xmlNewProp(rootNode, XC("url"), XC(url.c_str()));
if (id != "")
xmlNewProp(rootNode, XC "id", XC id.c_str());
xmlNewProp(rootNode, XC("id"), XC(id.c_str()));
//Action.
xmlNewProp(rootNode, XC "action", XC action.c_str());
xmlNewProp(rootNode, XC("action"), XC(action.c_str()));
//Sheep info.
if (sheepGen > 0 && sheepId > 0)
{
//Create a child node of the root node called sheep.
node = xmlNewChild(rootNode, nullptr, XC "sheep", nullptr);
node = xmlNewChild(rootNode, nullptr, XC("sheep"), nullptr);
//Create the sheep attributes.
os << sheepGen;
s = os.str();
xmlNewProp(node, XC "generation", XC s.c_str());
xmlNewProp(node, XC("generation"), XC(s.c_str()));
os.str("");
os << sheepId;
s = os.str();
xmlNewProp(node, XC "id", XC s.c_str());
xmlNewProp(node, XC("id"), XC(s.c_str()));
os.str("");
}
@ -368,16 +368,16 @@ public:
node = xmlDocGetRootElement(parent0->m_Edits);
nodeCopy = xmlCopyNode(node, 1);
AddFilenameWithoutAmpersand(nodeCopy, parent0->m_ParentFilename);
xmlNewProp(nodeCopy, XC "index", XC s.c_str());
xmlNewProp(nodeCopy, XC("index"), XC(s.c_str()));
xmlAddChild(rootNode, nodeCopy);
}
else
{
//Insert a (parent has no edit) message.
nodeCopy = xmlNewChild(rootNode, nullptr, XC "edit", nullptr);
nodeCopy = xmlNewChild(rootNode, nullptr, XC("edit"), nullptr);
AddFilenameWithoutAmpersand(nodeCopy, parent0->m_ParentFilename);
xmlNewProp(nodeCopy, XC "index", XC s.c_str());
xmlNewProp(nodeCopy, XC("index"), XC(s.c_str()));
}
os.str("");
@ -394,15 +394,15 @@ public:
node = xmlDocGetRootElement(parent1->m_Edits);
nodeCopy = xmlCopyNode(node, 1);
AddFilenameWithoutAmpersand(nodeCopy, parent1->m_ParentFilename);
xmlNewProp(nodeCopy, XC "index", XC s.c_str());
xmlNewProp(nodeCopy, XC("index"), XC(s.c_str()));
xmlAddChild(rootNode, nodeCopy);
}
else
{
//Insert a (parent has no edit) message.
nodeCopy = xmlNewChild(rootNode, nullptr, XC "edit",nullptr);
nodeCopy = xmlNewChild(rootNode, nullptr, XC("edit"),nullptr);
AddFilenameWithoutAmpersand(nodeCopy, parent1->m_ParentFilename);
xmlNewProp(nodeCopy, XC "index", XC s.c_str());
xmlNewProp(nodeCopy, XC("index"), XC(s.c_str()));
}
os.str("");
@ -419,7 +419,7 @@ public:
{
os << "<comm>" << comment << "</comm>";
s = os.str();
commentDoc = xmlReadMemory(s.c_str(), (int)s.length(), "comment.env", nullptr, XML_PARSE_NONET);
commentDoc = xmlReadMemory(s.c_str(), int(s.length()), "comment.env", nullptr, XML_PARSE_NONET);
os.str("");
//Check for errors.
@ -617,9 +617,9 @@ private:
for (curAtt = attPtr; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(editNode, curAtt->name);
attStr = CX(xmlGetProp(editNode, curAtt->name));
os << " " << curAtt->name << "=\"" << attStr << "\"";
xmlFree((void*)attStr);
xmlFree(reinterpret_cast<void*>(const_cast<char*>(attStr)));
}
//Does this node have children?
@ -695,7 +695,7 @@ private:
}
else if (editNode->type == XML_TEXT_NODE)
{
string s((char*)xmlNodeGetContent(editNode));
string s(reinterpret_cast<char*>(xmlNodeGetContent(editNode)));
os << Trim(s);
}
@ -709,11 +709,11 @@ private:
string filenameWithoutAmpersands = filename;
FindAndReplace<string>(filenameWithoutAmpersands, "&", "&amp;");
xmlNewProp(node, XC "filename", XC filenameWithoutAmpersands.c_str());
xmlNewProp(node, XC("filename"), XC(filenameWithoutAmpersands.c_str()));
}
else
{
xmlNewProp(node, XC "filename", XC filename.c_str());
xmlNewProp(node, XC("filename"), XC(filename.c_str()));
}
}
};

View File

@ -118,7 +118,7 @@ public:
template<typename floatType>
inline floatType Frand(floatType fMin, floatType fMax)
{
floatType f = (floatType)Rand() / (floatType)std::numeric_limits<T>::max();
floatType f = static_cast<floatType>(Rand()) / static_cast<floatType>(std::numeric_limits<T>::max());
return fMin + (f * (fMax - fMin));
}
@ -261,7 +261,7 @@ public:
if (s == nullptr)//Default to using time plus index as the seed if s was nullptr.
{
for (int i = 0; i < N; i++)
m_Rc.randrsl[i] = (T)time(0) + i;
m_Rc.randrsl[i] = static_cast<T>(time(nullptr)) + i;
}
else
{
@ -272,9 +272,9 @@ public:
#ifndef ISAAC_FLAM3_DEBUG
if (a == 0 && b == 0 && c == 0)
{
m_Rc.randa = (T)time(nullptr);
m_Rc.randb = (T)time(nullptr) * (T)time(nullptr);
m_Rc.randc = (T)time(nullptr) * (T)time(nullptr) * (T)time(nullptr);
m_Rc.randa = static_cast<T>(time(nullptr));
m_Rc.randb = static_cast<T>(time(nullptr)) * static_cast<T>(time(nullptr));
m_Rc.randc = static_cast<T>(time(nullptr)) * static_cast<T>(time(nullptr)) * static_cast<T>(time(nullptr));
}
else
#endif
@ -351,9 +351,9 @@ protected:
inline T Ind(T* mm, T x)
{
#ifndef __ISAAC64
return (*(T*)((byte*)(mm) + ((x) & ((N - 1) << 2))));
return (*reinterpret_cast<T*>(reinterpret_cast<byte*>(mm) + ((x) & ((N - 1) << 2))));
#else // __ISAAC64
return (*(T*)((byte*)(mm) + ((x) & ((N - 1) << 3))));
return (*reinterpret_cast<T*>(reinterpret_cast<byte*>(mm) + ((x) & ((N - 1) << 3))));
#endif // __ISAAC64
}

View File

@ -69,7 +69,7 @@ public:
/// Accessors.
/// </summary>
const byte* XformDistributions() const { return m_XformDistributions.empty() ? nullptr : &m_XformDistributions[0]; }
const size_t XformDistributionsSize() const { return m_XformDistributions.size(); }
size_t XformDistributionsSize() const { return m_XformDistributions.size(); }
/// <summary>
/// Virtual empty iteration function that will be overidden in derived iterator classes.
@ -146,7 +146,7 @@ public:
while (tempDensity < currentDensityLimit && j < CHOOSE_XFORM_GRAIN)
{
//printf("offset = %d, xform = %d, running sum = %f\n", j, i, tempDensity);
m_XformDistributions[(distrib * CHOOSE_XFORM_GRAIN) + j] = (byte)i;
m_XformDistributions[(distrib * CHOOSE_XFORM_GRAIN) + j] = byte(i);
tempDensity += densityPerElement;
j++;
}
@ -259,7 +259,7 @@ protected:
/// <returns></returns>
size_t NextXformFromIndex(size_t index, size_t distribOffset = 0)
{
return (size_t)m_XformDistributions[(index % CHOOSE_XFORM_GRAIN) + (CHOOSE_XFORM_GRAIN * distribOffset)];
return size_t(m_XformDistributions[(index % CHOOSE_XFORM_GRAIN) + (CHOOSE_XFORM_GRAIN * distribOffset)]);
}
vector<byte> m_XformDistributions;

View File

@ -88,10 +88,10 @@ public:
for (uint i = 0; i < size; i++)
{
m_Entries[i].a = (T)palette15[i * 4 + 0];
m_Entries[i].r = (T)palette15[i * 4 + 1];
m_Entries[i].g = (T)palette15[i * 4 + 2];
m_Entries[i].b = (T)palette15[i * 4 + 3];
m_Entries[i].a = T(palette15[i * 4 + 0]);
m_Entries[i].r = T(palette15[i * 4 + 1]);
m_Entries[i].g = T(palette15[i * 4 + 2]);
m_Entries[i].b = T(palette15[i * 4 + 3]);
}
}
}
@ -307,7 +307,7 @@ public:
rgb[1] = 0;
rgb[2] = 0;
for (int j = i - (int)blur; j <= i + (int)blur; j++)
for (int j = i - int(blur); j <= i + int(blur); j++)
{
n++;
int k = (256 + j) % 256;
@ -369,9 +369,9 @@ public:
{
for (uint j = 0; j < width; j++)
{
v[(width * 3 * i) + (j * 3)] = (byte)(m_Entries[j][0] * T(255));//Palettes are as [0..1], so convert to [0..255] here since it's for GUI display.
v[(width * 3 * i) + (j * 3) + 1] = (byte)(m_Entries[j][1] * T(255));
v[(width * 3 * i) + (j * 3) + 2] = (byte)(m_Entries[j][2] * T(255));
v[(width * 3 * i) + (j * 3)] = byte(m_Entries[j][0] * T(255));//Palettes are as [0..1], so convert to [0..255] here since it's for GUI display.
v[(width * 3 * i) + (j * 3) + 1] = byte(m_Entries[j][1] * T(255));
v[(width * 3 * i) + (j * 3) + 2] = byte(m_Entries[j][2] * T(255));
}
}
}
@ -545,11 +545,11 @@ public:
//Calculate the max-value color (ranged 0 - 1).
for (rgbi = 0; rgbi < 3; rgbi++)
newRgb[rgbi] = (bucketT)newls * cBuf[rgbi] / bucketT(255.0);
newRgb[rgbi] = bucketT(newls) * cBuf[rgbi] / bucketT(255.0);
//Reduce saturation by the lsratio.
Palette<bucketT>::RgbToHsv(newRgb, newhsv);
newhsv[1] *= (bucketT)lsratio;
newhsv[1] *= bucketT(lsratio);
Palette<bucketT>::HsvToRgb(newhsv, newRgb);
for (rgbi = 0; rgbi < 3; rgbi++)

View File

@ -45,7 +45,7 @@ public:
if (ReadFile(filename.c_str(), buf))
{
xmlDocPtr doc = xmlReadMemory((const char*)buf.data(), (int)buf.size(), filename.c_str(), nullptr, XML_PARSE_NONET);
xmlDocPtr doc = xmlReadMemory(static_cast<const char*>(buf.data()), int(buf.size()), filename.c_str(), nullptr, XML_PARSE_NONET);
if (doc != nullptr)
{
@ -81,7 +81,7 @@ public:
{
if (i == -1)
return &m_Palettes[QTIsaac<ISAAC_SIZE, ISAAC_INT>::GlobalRand->Rand() % Size()];
else if (i < (int)m_Palettes.size())
else if (i < int(m_Palettes.size()))
return &m_Palettes[i];
}
@ -161,7 +161,7 @@ private:
while (attr)
{
val = (char*)xmlGetProp(node, attr->name);
val = reinterpret_cast<char*>(xmlGetProp(node, attr->name));
if (!Compare(attr->name, "data"))
{
@ -172,7 +172,7 @@ private:
do
{
int ret = sscanf_s((char*)&(val[colorIndex]),"00%2x%2x%2x", &r, &g, &b);
int ret = sscanf_s(static_cast<char*>(&(val[colorIndex])),"00%2x%2x%2x", &r, &g, &b);
if (ret != 3)
{
@ -183,7 +183,7 @@ private:
colorIndex += 8;
while (isspace((int)val[colorIndex]))
while (isspace(int(val[colorIndex])))
colorIndex++;
palette[colorCount].r = T(r) / T(255);//Store as normalized colors in the range of 0-1.

View File

@ -124,11 +124,11 @@ void Renderer<T, bucketT>::ComputeBounds()
//If the radius of the density estimation filter is greater than the
//gutter width, have to pad with more. Otherwise, use the same value.
for (size_t i = 0; i < m_Embers.size(); i++)
maxDEFilterWidth = max((size_t)(ceil(m_Embers[i].m_MaxRadDE) * m_Ember.m_Supersample), maxDEFilterWidth);
maxDEFilterWidth = max(size_t(ceil(m_Embers[i].m_MaxRadDE) * m_Ember.m_Supersample), maxDEFilterWidth);
//Need an extra ss = (int)floor(m_Supersample / 2.0) of pixels so that a local iteration count for DE can be determined.//SMOULDER
if (maxDEFilterWidth > 0)
maxDEFilterWidth += (size_t)Floor<T>(m_Ember.m_Supersample / T(2));
maxDEFilterWidth += size_t(Floor<T>(m_Ember.m_Supersample / T(2)));
//To have a fully present set of pixels for the spatial filter, must
//add the DE filter width to the spatial filter width.//SMOULDER
@ -546,7 +546,7 @@ FilterAndAccum:
//to be very dark. Correct it by pretending the number of iters done is the exact quality desired and then scale according to that.
if (forceOutput)
{
T quality = ((T)m_Stats.m_Iters / (T)FinalDimensions()) * (m_Scale * m_Scale);
T quality = (T(m_Stats.m_Iters) / T(FinalDimensions())) * (m_Scale * m_Scale);
m_K2 = (Supersample() * Supersample()) / (area * quality * m_TemporalFilter->SumFilt());
}
else
@ -654,7 +654,7 @@ EmberImageComments Renderer<T, bucketT>::ImageComments(EmberStats& stats, size_t
ss.imbue(std::locale(""));
comments.m_Genome = m_EmberToXml.ToString(m_Ember, "", printEditDepth, false, intPalette, hexPalette);
ss << ((double)stats.m_Badvals / (double)stats.m_Iters);//Percentage of bad values to iters.
ss << (double(stats.m_Badvals) / double(stats.m_Iters));//Percentage of bad values to iters.
comments.m_Badvals = ss.str(); ss.str("");
ss << stats.m_Iters;
comments.m_NumIters = ss.str(); ss.str("");//Total iters.
@ -804,7 +804,7 @@ eRenderStatus Renderer<T, bucketT>::LogScaleDensityFilter()
//Original did a temporary assignment, then *= logScale, then passed the result to bump_no_overflow().
//Combine here into one operation for a slight speedup.
m_AccumulatorBuckets[index] = m_HistBuckets[index] * (bucketT)logScale;
m_AccumulatorBuckets[index] = m_HistBuckets[index] * bucketT(logScale);
}
}
});
@ -833,14 +833,14 @@ eRenderStatus Renderer<T, bucketT>::GaussianDensityFilter()
size_t endRow = m_SuperRasH - (Supersample() - 1);//Original did + which is most likely wrong.
intmax_t startCol = Supersample() - 1;
intmax_t endCol = m_SuperRasW - (Supersample() - 1);
size_t chunkSize = (size_t)ceil(double(endRow - startRow) / double(threads));
size_t chunkSize = size_t(ceil(double(endRow - startRow) / double(threads)));
//parallel_for scales very well, dividing the work almost perfectly among all processors.
parallel_for(size_t(0), threads, [&] (size_t threadIndex)
{
size_t pixelNumber = 0;
int localStartRow = (int)min(startRow + (threadIndex * chunkSize), endRow - 1);
int localEndRow = (int)min(localStartRow + chunkSize, endRow);
int localStartRow = int(min(startRow + (threadIndex * chunkSize), endRow - 1));
int localEndRow = int(min(localStartRow + chunkSize, endRow));
size_t pixelsThisThread = size_t(localEndRow - localStartRow) * m_SuperRasW;
double lastPercent = 0;
glm::detail::tvec4<bucketT, glm::defaultp> logScaleBucket;
@ -876,9 +876,9 @@ eRenderStatus Renderer<T, bucketT>::GaussianDensityFilter()
//when calculating the density for a box centered on the last row or column.
//Clamp here to not run over the edge.
intmax_t densityBoxLeftX = (i - min(i, ss));
intmax_t densityBoxRightX = (i + min(ss, (intmax_t)m_SuperRasW - i - 1));
intmax_t densityBoxRightX = (i + min(ss, intmax_t(m_SuperRasW) - i - 1));
intmax_t densityBoxTopY = (j - min(j, ss));
intmax_t densityBoxBottomY = (j + min(ss, (intmax_t)m_SuperRasH - j - 1));
intmax_t densityBoxBottomY = (j + min(ss, intmax_t(m_SuperRasH) - j - 1));
//Count density in ssxss area.
//Original went one col at a time, which is cache inefficient. Go one row at at time here for a slight speedup.
@ -894,9 +894,9 @@ eRenderStatus Renderer<T, bucketT>::GaussianDensityFilter()
if (filterSelect > m_DensityFilter->MaxFilteredCounts())
filterSelectInt = m_DensityFilter->MaxFilterIndex();
else if (filterSelect <= DE_THRESH)
filterSelectInt = (size_t)ceil(filterSelect) - 1;
filterSelectInt = size_t(ceil(filterSelect)) - 1;
else
filterSelectInt = DE_THRESH + (size_t)Floor<T>(pow(filterSelect - DE_THRESH, m_DensityFilter->Curve()));
filterSelectInt = DE_THRESH + size_t(Floor<T>(pow(filterSelect - DE_THRESH, m_DensityFilter->Curve())));
//If the filter selected below the min specified clamp it to the min.
if (filterSelectInt > m_DensityFilter->MaxFilterIndex())
@ -904,7 +904,7 @@ eRenderStatus Renderer<T, bucketT>::GaussianDensityFilter()
//Only have to calculate the values for ~1/8 of the square.
filterCoefIndex = filterSelectInt * m_DensityFilter->KernelSize();
arrFilterWidth = (intmax_t)ceil(filterWidths[filterSelectInt]) - 1;
arrFilterWidth = intmax_t(ceil(filterWidths[filterSelectInt])) - 1;
for (jj = 0; jj <= arrFilterWidth; jj++)
{
@ -1074,46 +1074,46 @@ eRenderStatus Renderer<T, bucketT>::AccumulatorToFinalImage(byte* pixels, size_t
if (BytesPerChannel() == 2)
{
p16 = (uint16*)(pixels + pixelsRowStart);
p16 = reinterpret_cast<uint16*>(pixels + pixelsRowStart);
if (EarlyClip())
{
p16[0] = (uint16)(Clamp<bucketT>(newBucket.r, 0, 255) * bucketT(256));
p16[1] = (uint16)(Clamp<bucketT>(newBucket.g, 0, 255) * bucketT(256));
p16[2] = (uint16)(Clamp<bucketT>(newBucket.b, 0, 255) * bucketT(256));
p16[0] = uint16(Clamp<bucketT>(newBucket.r, 0, 255) * bucketT(256));
p16[1] = uint16(Clamp<bucketT>(newBucket.g, 0, 255) * bucketT(256));
p16[2] = uint16(Clamp<bucketT>(newBucket.b, 0, 255) * bucketT(256));
if (NumChannels() > 3)
{
if (Transparency())
p16[3] = (byte)(Clamp<bucketT>(newBucket.a, 0, 1) * bucketT(65535.0));
p16[3] = byte(Clamp<bucketT>(newBucket.a, 0, 1) * bucketT(65535.0));
else
p16[3] = 65535;
}
}
else
{
GammaCorrection(*(glm::detail::tvec4<bucketT, glm::defaultp>*)(&newBucket), background, g, linRange, vibrancy, NumChannels() > 3, true, p16);
GammaCorrection(*(reinterpret_cast<glm::detail::tvec4<bucketT, glm::defaultp>*>(&newBucket)), background, g, linRange, vibrancy, NumChannels() > 3, true, p16);
}
}
else
{
if (EarlyClip())
{
pixels[pixelsRowStart] = (byte)Clamp<bucketT>(newBucket.r, 0, 255);
pixels[pixelsRowStart + 1] = (byte)Clamp<bucketT>(newBucket.g, 0, 255);
pixels[pixelsRowStart + 2] = (byte)Clamp<bucketT>(newBucket.b, 0, 255);
pixels[pixelsRowStart] = byte(Clamp<bucketT>(newBucket.r, 0, 255));
pixels[pixelsRowStart + 1] = byte(Clamp<bucketT>(newBucket.g, 0, 255));
pixels[pixelsRowStart + 2] = byte(Clamp<bucketT>(newBucket.b, 0, 255));
if (NumChannels() > 3)
{
if (Transparency())
pixels[pixelsRowStart + 3] = (byte)(Clamp<bucketT>(newBucket.a, 0, 1) * bucketT(255.0));
pixels[pixelsRowStart + 3] = byte(Clamp<bucketT>(newBucket.a, 0, 1) * bucketT(255.0));
else
pixels[pixelsRowStart + 3] = 255;
}
}
else
{
GammaCorrection(*(glm::detail::tvec4<bucketT, glm::defaultp>*)(&newBucket), background, g, linRange, vibrancy, NumChannels() > 3, true, pixels + pixelsRowStart);
GammaCorrection(*(reinterpret_cast<glm::detail::tvec4<bucketT, glm::defaultp>*>(&newBucket)), background, g, linRange, vibrancy, NumChannels() > 3, true, pixels + pixelsRowStart);
}
}
}
@ -1133,9 +1133,9 @@ eRenderStatus Renderer<T, bucketT>::AccumulatorToFinalImage(byte* pixels, size_t
{
byte* p = pixels + (NumChannels() * (i + j * FinalRasW()));
p[0] = (byte)(m_TempEmber.m_Palette[i * 256 / FinalRasW()][0] * WHITE);//The palette is [0..1], output image is [0..255].
p[1] = (byte)(m_TempEmber.m_Palette[i * 256 / FinalRasW()][1] * WHITE);
p[2] = (byte)(m_TempEmber.m_Palette[i * 256 / FinalRasW()][2] * WHITE);
p[0] = byte(m_TempEmber.m_Palette[i * 256 / FinalRasW()][0] * WHITE);//The palette is [0..1], output image is [0..255].
p[1] = byte(m_TempEmber.m_Palette[i * 256 / FinalRasW()][1] * WHITE);
p[2] = byte(m_TempEmber.m_Palette[i * 256 / FinalRasW()][2] * WHITE);
}
}
}
@ -1164,7 +1164,7 @@ EmberStats Renderer<T, bucketT>::Iterate(size_t iterCount, size_t temporalSample
{
//Timing t2(4);
m_IterTimer.Tic();
size_t totalItersPerThread = (size_t)ceil((double)iterCount / (double)m_ThreadsToUse);
size_t totalItersPerThread = size_t(ceil(double(iterCount) / double(m_ThreadsToUse)));
double percent, etaMs;
EmberStats stats;
@ -1232,7 +1232,7 @@ EmberStats Renderer<T, bucketT>::Iterate(size_t iterCount, size_t temporalSample
//This assumes the threads progress at roughly the same speed.
double(m_LastIter + (m_SubBatch[threadIndex] * m_ThreadsToUse)) / double(ItersPerTemporalSample())
) + temporalSample
) / (double)TemporalSamples()
) / double(TemporalSamples())
);
double percentDiff = percent - m_LastIterPercent;
@ -1305,11 +1305,11 @@ template <typename T, typename bucketT> TemporalFilter<T>* Renderer<T, buc
/// Virtual renderer properties overridden from RendererBase, getters only.
/// </summary>
template <typename T, typename bucketT> double Renderer<T, bucketT>::ScaledQuality() const { return (double)m_ScaledQuality; }
template <typename T, typename bucketT> double Renderer<T, bucketT>::LowerLeftX(bool gutter) const { return (double)(gutter ? m_CarToRas.CarLlX() : m_LowerLeftX); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::LowerLeftY(bool gutter) const { return (double)(gutter ? m_CarToRas.CarLlY() : m_LowerLeftY); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::UpperRightX(bool gutter) const { return (double)(gutter ? m_CarToRas.CarUrX() : m_UpperRightX); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::UpperRightY(bool gutter) const { return (double)(gutter ? m_CarToRas.CarUrY() : m_UpperRightY); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::ScaledQuality() const { return double(m_ScaledQuality); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::LowerLeftX(bool gutter) const { return double(gutter ? m_CarToRas.CarLlX() : m_LowerLeftX); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::LowerLeftY(bool gutter) const { return double(gutter ? m_CarToRas.CarLlY() : m_LowerLeftY); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::UpperRightX(bool gutter) const { return double(gutter ? m_CarToRas.CarUrX() : m_UpperRightX); }
template <typename T, typename bucketT> double Renderer<T, bucketT>::UpperRightY(bool gutter) const { return double(gutter ? m_CarToRas.CarUrY() : m_UpperRightY); }
template <typename T, typename bucketT> DensityFilterBase* Renderer<T, bucketT>::GetDensityFilter() { return m_DensityFilter.get(); }
/// <summary>
@ -1357,9 +1357,9 @@ template <typename T, typename bucketT> size_t Renderer<T, bucketT>::FuseCount()
/// Non-virtual iterator wrappers.
/// </summary>
template <typename T, typename bucketT> const byte* Renderer<T, bucketT>::XformDistributions() const { return m_Iterator != nullptr ? m_Iterator->XformDistributions() : nullptr; }
template <typename T, typename bucketT> const size_t Renderer<T, bucketT>::XformDistributionsSize() const { return m_Iterator != nullptr ? m_Iterator->XformDistributionsSize() : 0; }
template <typename T, typename bucketT> Point<T>* Renderer<T, bucketT>::Samples(size_t threadIndex) const { return threadIndex < m_Samples.size() ? (Point<T>*)m_Samples[threadIndex].data() : nullptr; }
template <typename T, typename bucketT> const byte* Renderer<T, bucketT>::XformDistributions() const { return m_Iterator != nullptr ? m_Iterator->XformDistributions() : nullptr; }
template <typename T, typename bucketT> size_t Renderer<T, bucketT>::XformDistributionsSize() const { return m_Iterator != nullptr ? m_Iterator->XformDistributionsSize() : 0; }
template <typename T, typename bucketT> Point<T>* Renderer<T, bucketT>::Samples(size_t threadIndex) const { return threadIndex < m_Samples.size() ? const_cast<Point<T>*>(m_Samples[threadIndex].data()) : nullptr; }
/// <summary>
/// Non-virtual functions that might be needed by a derived class.
@ -1465,8 +1465,8 @@ void Renderer<T, bucketT>::Accumulate(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand, Poin
//Use overloaded addition and multiplication operators in vec4 to perform the accumulation.
if (PaletteMode() == PALETTE_LINEAR)
{
colorIndex = (bucketT)p.m_ColorX * COLORMAP_LENGTH;
intColorIndex = (size_t)colorIndex;
colorIndex = bucketT(p.m_ColorX) * COLORMAP_LENGTH;
intColorIndex = size_t(colorIndex);
if (intColorIndex < 0)
{
@ -1480,22 +1480,22 @@ void Renderer<T, bucketT>::Accumulate(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand, Poin
}
else
{
colorIndexFrac = colorIndex - (bucketT)intColorIndex;//Interpolate between intColorIndex and intColorIndex + 1.
colorIndexFrac = colorIndex - bucketT(intColorIndex);//Interpolate between intColorIndex and intColorIndex + 1.
}
if (p.m_VizAdjusted == 1)
m_HistBuckets[histIndex] += ((dmap[intColorIndex] * (1 - colorIndexFrac)) + (dmap[intColorIndex + 1] * colorIndexFrac));
else
m_HistBuckets[histIndex] += (((dmap[intColorIndex] * (1 - colorIndexFrac)) + (dmap[intColorIndex + 1] * colorIndexFrac)) * (bucketT)p.m_VizAdjusted);
m_HistBuckets[histIndex] += (((dmap[intColorIndex] * (1 - colorIndexFrac)) + (dmap[intColorIndex + 1] * colorIndexFrac)) * bucketT(p.m_VizAdjusted));
}
else if (PaletteMode() == PALETTE_STEP)
{
intColorIndex = Clamp<size_t>((size_t)(p.m_ColorX * COLORMAP_LENGTH), 0, COLORMAP_LENGTH_MINUS_1);
intColorIndex = Clamp<size_t>(size_t(p.m_ColorX * COLORMAP_LENGTH), 0, COLORMAP_LENGTH_MINUS_1);
if (p.m_VizAdjusted == 1)
m_HistBuckets[histIndex] += dmap[intColorIndex];
else
m_HistBuckets[histIndex] += (dmap[intColorIndex] * (bucketT)p.m_VizAdjusted);
m_HistBuckets[histIndex] += (dmap[intColorIndex] * bucketT(p.m_VizAdjusted));
}
}
}
@ -1514,7 +1514,7 @@ void Renderer<T, bucketT>::Accumulate(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand, Poin
template <typename T, typename bucketT>
void Renderer<T, bucketT>::AddToAccum(const glm::detail::tvec4<bucketT, glm::defaultp>& bucket, intmax_t i, intmax_t ii, intmax_t j, intmax_t jj)
{
if (j + jj >= 0 && j + jj < (intmax_t)m_SuperRasH && i + ii >= 0 && i + ii < (intmax_t)m_SuperRasW)
if (j + jj >= 0 && j + jj < intmax_t(m_SuperRasH) && i + ii >= 0 && i + ii < intmax_t(m_SuperRasW))
m_AccumulatorBuckets[(i + ii) + ((j + jj) * m_SuperRasW)] += bucket;
}
@ -1573,17 +1573,17 @@ void Renderer<T, bucketT>::GammaCorrection(glm::detail::tvec4<bucketT, glm::defa
}
if (!scale)
correctedChannels[rgbi] = (accumT)Clamp<T>(a, 0, 255);//Early clip, just assign directly.
correctedChannels[rgbi] = accumT(Clamp<T>(a, 0, 255));//Early clip, just assign directly.
else
correctedChannels[rgbi] = (accumT)(Clamp<T>(a, 0, 255) * scaleVal);//Final accum, multiply by 1 for 8 bpc, or 256 for 16 bpc.
correctedChannels[rgbi] = accumT(Clamp<T>(a, 0, 255) * scaleVal);//Final accum, multiply by 1 for 8 bpc, or 256 for 16 bpc.
}
if (doAlpha)
{
if (!scale)
correctedChannels[3] = (accumT)alpha;//Early clip, just assign alpha directly.
correctedChannels[3] = accumT(alpha);//Early clip, just assign alpha directly.
else if (Transparency())
correctedChannels[3] = (accumT)(alpha * numeric_limits<accumT>::max());//Final accum, 4 channels, using transparency. Scale alpha from 0-1 to 0-255 for 8 bpc or 0-65535 for 16 bpc.
correctedChannels[3] = accumT(alpha * numeric_limits<accumT>::max());//Final accum, 4 channels, using transparency. Scale alpha from 0-1 to 0-255 for 8 bpc or 0-65535 for 16 bpc.
else
correctedChannels[3] = numeric_limits<accumT>::max();//Final accum, 4 channels, but not using transparency. 255 for 8 bpc, 65535 for 16 bpc.
}

View File

@ -139,9 +139,9 @@ public:
virtual size_t FuseCount() const override;
//Non-virtual iterator wrappers.
const byte* XformDistributions() const;
const size_t XformDistributionsSize() const;
Point<T>* Samples(size_t threadIndex) const;
const byte* XformDistributions() const;
size_t XformDistributionsSize() const;
Point<T>* Samples(size_t threadIndex) const;
protected:
//Non-virtual functions that might be needed by a derived class.

View File

@ -280,8 +280,8 @@ size_t RendererBase::FinalBufferSize() const { return FinalRowSize() *
size_t RendererBase::PixelSize() const { return NumChannels() * BytesPerChannel(); }
size_t RendererBase::GutterWidth() const { return m_GutterWidth; }
size_t RendererBase::DensityFilterOffset() const { return m_DensityFilterOffset; }
size_t RendererBase::TotalIterCount(size_t strips) const { return (size_t)((size_t)Round(ScaledQuality()) * FinalRasW() * FinalRasH() * strips); }//Use Round() because there can be some roundoff error when interpolating.
size_t RendererBase::ItersPerTemporalSample() const { return (size_t)ceil(double(TotalIterCount(1)) / double(TemporalSamples())); }//Temporal samples is used with animation, which doesn't support strips, so pass 1.
size_t RendererBase::TotalIterCount(size_t strips) const { return size_t(size_t(Round(ScaledQuality())) * FinalRasW() * FinalRasH() * strips); }//Use Round() because there can be some roundoff error when interpolating.
size_t RendererBase::ItersPerTemporalSample() const { return size_t(ceil(double(TotalIterCount(1)) / double(TemporalSamples()))); }//Temporal samples is used with animation, which doesn't support strips, so pass 1.
eProcessState RendererBase::ProcessState() const { return m_ProcessState; }
eProcessAction RendererBase::ProcessAction() const { return m_ProcessAction; }
EmberStats RendererBase::Stats() const { return m_Stats; }
@ -449,7 +449,7 @@ void RendererBase::ThreadCount(size_t threads, const char* seedString)
if (seedString)
{
memset(seeds, 0, isaacSize * sizeof(ISAAC_INT));
memcpy((char*)seeds, seedString, min(strlen(seedString), isaacSize * sizeof(ISAAC_INT)));
memcpy(reinterpret_cast<char*>(seeds), seedString, min(strlen(seedString), isaacSize * sizeof(ISAAC_INT)));
}
//This is critical for multithreading, otherwise the threads all happen
@ -460,7 +460,7 @@ void RendererBase::ThreadCount(size_t threads, const char* seedString)
if (seedString)
{
ISAAC_INT newSize = (ISAAC_INT)(size + 5 + (t.Toc() + t.EndTime()));
ISAAC_INT newSize = ISAAC_INT(size + 5 + (t.Toc() + t.EndTime()));
#ifdef ISAAC_FLAM3_DEBUG
QTIsaac<ISAAC_SIZE, ISAAC_INT> isaac(0, 0, 0, seeds);
@ -470,18 +470,18 @@ void RendererBase::ThreadCount(size_t threads, const char* seedString)
m_Rand.push_back(isaac);
for (i = 0; i < (isaacSize * sizeof(ISAAC_INT)); i++)
((byte*)seeds)[i]++;
reinterpret_cast<byte*>(seeds)[i]++;
}
else
{
for (i = 0; i < isaacSize; i++)
{
t.Toc();
seeds[i] = (ISAAC_INT)((t.EndTime() * i) + (size + 1));
seeds[i] = ISAAC_INT((t.EndTime() * i) + (size + 1));
}
t.Toc();
ISAAC_INT r = (ISAAC_INT)((size * i) + i + t.EndTime());
ISAAC_INT r = ISAAC_INT((size * i) + i + t.EndTime());
QTIsaac<ISAAC_SIZE, ISAAC_INT> isaac(r, r * 2, r * 3, seeds);
m_Rand.push_back(isaac);
@ -611,4 +611,4 @@ bool RendererBase::Aborted() { return m_Abort; }
bool RendererBase::InRender() { return m_InRender; }
bool RendererBase::InFinalAccum() { return m_InFinalAccum; }
}
}

View File

@ -610,7 +610,7 @@ public:
{
vector<eVariationId> useVars;
Random(ember, useVars, (int)m_Rand.Frand<T>(-2, 2), 0);
Random(ember, useVars, static_cast<int>(m_Rand.Frand<T>(-2, 2)), 0);
}
/// <summary>
@ -747,7 +747,7 @@ public:
if (var != -2)
{
//Pick a random variation and use a random weight from 0-1.
Variation<T>* v = m_VariationList.GetVariationCopy((size_t)(m_Rand.Rand() % varCount), m_Rand.Frand<T>(T(0.001), 1));
Variation<T>* v = m_VariationList.GetVariationCopy(static_cast<size_t>(m_Rand.Rand() % varCount), m_Rand.Frand<T>(T(0.001), 1));
if (v && !xform->AddVariation(v))
delete v;//It already existed and therefore was not added.
@ -782,7 +782,7 @@ public:
if (var != -2)
{
//Pick a random variation and use a random weight from 0-1.
xform->AddVariation(m_VariationList.GetVariationCopy((size_t)(m_Rand.Rand() % varCount), m_Rand.Frand<T>(T(0.001), 1)));
xform->AddVariation(m_VariationList.GetVariationCopy(static_cast<size_t>(m_Rand.Rand() % varCount), m_Rand.Frand<T>(T(0.001), 1)));
}
else
{
@ -869,8 +869,8 @@ public:
//Scale the image so that the total number of pixels is ~10,000.
pixTotal = ember.m_FinalRasW * ember.m_FinalRasH;
scalar = sqrt(T(10000) / pixTotal);
adjustedEmber.m_FinalRasW = (size_t)(ember.m_FinalRasW * scalar);
adjustedEmber.m_FinalRasH = (size_t)(ember.m_FinalRasH * scalar);
adjustedEmber.m_FinalRasW = static_cast<size_t>(ember.m_FinalRasW * scalar);
adjustedEmber.m_FinalRasH = static_cast<size_t>(ember.m_FinalRasH * scalar);
adjustedEmber.m_PixelsPerUnit *= scalar;
adjustedEmber.m_TemporalSamples = 1;
@ -889,7 +889,7 @@ public:
m_Hist.resize(res3);
memset(m_Hist.data(), 0, res3);
p = m_FinalImage.data();
for (i = 0; i < m_Renderer->FinalDimensions(); i++)
@ -1310,7 +1310,7 @@ public:
if (eps > T(0.3))
eps = T(0.3);
lowTarget = (size_t)(samples * eps);
lowTarget = static_cast<size_t>(samples * eps);
highTarget = samples - lowTarget;
min[0] = min[1] = 1e10;

View File

@ -110,7 +110,7 @@ public:
T fw = T(2.0) * m_Support * m_Supersample * m_FilterRadius / m_PixelAspectRatio;
T adjust, ii, jj;
int fwidth = ((int)fw) + 1;
int fwidth = int(fw) + 1;
int i, j;
//Make sure the filter kernel has same parity as oversample.
@ -147,7 +147,7 @@ public:
m_FinalFilterWidth = fwidth;
break;
}
m_FilterRadius += T(0.01);//Values were too small.
} while (1);
}

View File

@ -62,13 +62,13 @@ public:
/// Return the begin time as a double.
/// </summary>
/// <returns></returns>
double BeginTime() { return (double)m_BeginTime.time_since_epoch().count(); }
double BeginTime() { return static_cast<double>(m_BeginTime.time_since_epoch().count()); }
/// <summary>
/// Return the end time as a double.
/// </summary>
/// <returns></returns>
double EndTime() { return (double)m_EndTime.time_since_epoch().count(); }
double EndTime() { return static_cast<double>(m_EndTime.time_since_epoch().count()); }
/// <summary>
/// Return the elapsed time in milliseconds.
@ -103,13 +103,13 @@ public:
double days = x;
if (days >= 1)
ss << (int)days << "d ";
ss << static_cast<int>(days) << "d ";
if (hours >= 1)
ss << (int)hours << "h ";
ss << static_cast<int>(hours) << "h ";
if (mins >= 1)
ss << (int)mins << "m ";
ss << static_cast<int>(mins) << "m ";
ss << std::fixed << std::setprecision(m_Precision) << secs << "s";
return ss.str();

View File

@ -188,11 +188,11 @@ static bool ReadFile(const char* filename, string& buf, bool nullTerminate = tru
{
buf.resize(statBuf.st_size + (nullTerminate ? 1 : 0));//Allocate vector to be the size of the entire file, with an optional additional character for nullptr.
if (buf.size() == (size_t)(statBuf.st_size + 1))//Ensure allocation succeeded.
if (buf.size() == static_cast<size_t>(statBuf.st_size + 1))//Ensure allocation succeeded.
{
size_t bytesRead = fread(&buf[0], 1, statBuf.st_size, f);//Read the entire file at once.
if (bytesRead == (size_t)statBuf.st_size)//Ensure the number of bytes read matched what was requested.
if (bytesRead == (static_cast<size_t>(statBuf.st_size)))//Ensure the number of bytes read matched what was requested.
{
if (nullTerminate)//Optionally nullptr terminate if they want to treat it as a string.
buf[buf.size() - 1] = 0;
@ -229,7 +229,7 @@ static void CopyVec(vector<T>& dest, const vector<U>& source)
dest.resize(source.size());
for (size_t i = 0; i < source.size(); i++)
dest[i] = (T)source[i];//Valid assignment operator between T and U types must be defined somewhere.
dest[i] = static_cast<T>(source[i]);//Valid assignment operator between T and U types must be defined somewhere.
}
/// <summary>
@ -248,7 +248,7 @@ static void CopyVec(vector<T>& dest, const vector<U>& source, std::function<void
for (size_t i = 0; i < source.size(); i++)
{
dest[i] = (T)source[i];//Valid assignment operator between T and U types must be defined somewhere.
dest[i] = static_cast<T>(source[i]);//Valid assignment operator between T and U types must be defined somewhere.
perElementOperation(dest[i]);
}
}
@ -287,7 +287,7 @@ static void ClearVec(vector<T*>& vec, bool arrayDelete = false)
template<typename T>
static inline void Memset(vector<T>& vec, int val = 0)
{
memset((void*)vec.data(), val, SizeOf(vec));
memset(static_cast<void*>(vec.data()), val, SizeOf(vec));
}
/// <summary>
@ -301,11 +301,11 @@ static inline int Floor(T val)
{
if (val >= 0)
{
return (int)val;
return static_cast<int>(val);
}
else
{
int i = (int)val;//Truncate.
int i = static_cast<int>(val);//Truncate.
return i - (i > val);//Convert trunc to floor.
}
}
@ -430,7 +430,7 @@ static inline void ClampGte0Ref(T& val)
template <typename T>
static inline T Round(T r)
{
return (r > 0) ? (T)Floor<T>(r + T(0.5)) : ceil(r - T(0.5));
return (r > 0) ? static_cast<T>(Floor<T>(r + T(0.5))) : ceil(r - T(0.5));
}
/// <summary>
@ -440,8 +440,8 @@ static inline T Round(T r)
/// <returns>The rounded value</returns>
static inline float LRint(float x)
{
int temp = (x >= 0 ? (int)(x + 0.5f) : (int)(x - 0.5f));
return (float)temp;
int temp = (x >= 0 ? static_cast<int>(x + 0.5f) : static_cast<int>(x - 0.5f));
return static_cast<float>(temp);
}
/// <summary>
@ -451,8 +451,8 @@ static inline float LRint(float x)
/// <returns>The rounded value</returns>
static inline double LRint(double x)
{
glm::int64_t temp = (x >= 0 ? (int64_t)(x + 0.5) : (int64_t)(x - 0.5));
return (double)temp;
glm::int64_t temp = (x >= 0 ? static_cast<int64_t>(x + 0.5) : static_cast<int64_t>(x - 0.5));
return static_cast<double>(temp);
}
/// <summary>
@ -468,7 +468,7 @@ static inline T Round6(T r)
if (r < 0)
r -= 1;
return T(1e-6 * (int)(r + T(0.5)));
return static_cast<T>(1e-6 * static_cast<int>(r + T(0.5)));
}
/// <summary>
@ -480,7 +480,7 @@ static inline T Round6(T r)
template <typename T>
static inline T Sign(T v)
{
return (v < 0) ? T(-1) : (v > 0) ? T(1) : T(0);
return (v < 0) ? static_cast<T>(-1) : (v > 0) ? static_cast<T>(1) : static_cast<T>(0);
}
/// <summary>
@ -492,7 +492,7 @@ static inline T Sign(T v)
template <typename T>
static inline T SignNz(T v)
{
return (v < 0) ? T(-1) : T(1);
return (v < 0) ? static_cast<T>(-1) : static_cast<T>(1);
}
/// <summary>
@ -701,7 +701,7 @@ static inline T LogMap(T x)
/// <returns>True if the comparison matched, else false</returns>
static inline bool Compare(const xmlChar* name, const char* val)
{
return xmlStrcmp(name, XC val) != 0;
return xmlStrcmp(name, XC(val)) != 0;
}
/// <summary>
@ -904,7 +904,7 @@ static
#endif
uint Arg<uint>(char* name, uint def)
{
return Arg<int>(name, (int)def);
return Arg<int>(name, static_cast<int>(def));
}
/// <summary>

View File

@ -1085,7 +1085,7 @@ public:
m_AssignType = variation.AssignType();
m_VariationId = variation.VariationId();
m_Weight = T(variation.m_Weight);
m_Xform = typeid(T) == typeid(U) ? (Xform<T>*)variation.ParentXform() : nullptr;
m_Xform = typeid(T) == typeid(U) ? const_cast<Xform<T>*>(reinterpret_cast<const Xform<T>*>(variation.ParentXform())) : nullptr;
m_NeedPrecalcSumSquares = variation.NeedPrecalcSumSquares();
m_NeedPrecalcSqrtSumSquares = variation.NeedPrecalcSqrtSumSquares();
m_NeedPrecalcAngles = variation.NeedPrecalcAngles();
@ -1536,17 +1536,17 @@ public:
case INTEGER :
{
*m_Param = T((int)max(min<T>((T)Floor<T>(val + T(0.5)), m_Max), m_Min));
*m_Param = T(int(max(min<T>(T(Floor<T>(val + T(0.5))), m_Max), m_Min)));
break;
}
case INTEGER_NONZERO :
default:
{
int vi = (int)max(min<T>((T)Floor<T>(val + T(0.5)), m_Max), m_Min);
int vi = int(max(min<T>(T(Floor<T>(val + T(0.5))), m_Max), m_Min));
if (vi == 0)
vi = (int)SignNz<T>(val);
vi = int(SignNz<T>(val));
*m_Param = T(vi);
break;

View File

@ -1149,7 +1149,7 @@ public:
{
m_BlobLow = T(0.2) + T(0.5) * rand.Frand01<T>();
m_BlobHigh = T(0.8) + T(0.4) * rand.Frand01<T>();
m_BlobWaves = (T)(int)(2 + 5 * rand.Frand01<T>());
m_BlobWaves = T(int(2 + 5 * rand.Frand01<T>()));
}
protected:
@ -1293,7 +1293,7 @@ public:
{
T a = helper.m_PrecalcAtanxy;
T r = m_Weight * helper.m_PrecalcSqrtSumSquares;
T t = a + m_Fan2Y - m_Fan2Dx * (int)((a + m_Fan2Y) / m_Fan2Dx);
T t = a + m_Fan2Y - m_Fan2Dx * int((a + m_Fan2Y) / m_Fan2Dx);
if (t > m_Fan2Dx2)
a = a - m_Fan2Dx2;
@ -1390,7 +1390,7 @@ public:
{
T r = helper.m_PrecalcSqrtSumSquares;
r += -2 * m_Rings2Val2 * (int)((r + m_Rings2Val2) / (2 * m_Rings2Val2)) + r * (1 - m_Rings2Val2);
r += -2 * m_Rings2Val2 * int((r + m_Rings2Val2) / (2 * m_Rings2Val2)) + r * (1 - m_Rings2Val2);
helper.Out.x = m_Weight * helper.m_PrecalcSina * r;
helper.Out.y = m_Weight * helper.m_PrecalcCosa * r;
helper.Out.z = m_Weight * helper.In.z;
@ -1689,7 +1689,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T tempr = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand((ISAAC_INT)m_Rn)) / m_Power;
T tempr = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand(ISAAC_INT(m_Rn))) / m_Power;
T r = m_Weight * pow(helper.m_PrecalcSumSquares, m_Cn);
helper.Out.x = r * cos(tempr);
@ -1731,7 +1731,7 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Dist = 1;
m_Power = (T)(int)(5 * rand.Frand01<T>() + 2);
m_Power = T(int(5 * rand.Frand01<T>() + 2));
}
protected:
@ -1769,7 +1769,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
int rnd = (int)(m_Rn * rand.Frand01<T>());
int rnd = int(m_Rn * rand.Frand01<T>());
T tempr, r = m_Weight * pow(helper.m_PrecalcSumSquares, m_Cn);
if ((rnd & 1) == 0)
@ -1851,7 +1851,7 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Dist = 1;
m_Power = (T)(int)(5 * rand.Frand01<T>() + 2);
m_Power = T(int(5 * rand.Frand01<T>() + 2));
}
protected:
@ -2051,7 +2051,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
int sl = (int)(rand.Frand01<T>() * m_Slices + T(0.5));
int sl = int(rand.Frand01<T>() * m_Slices + T(0.5));
T a = m_Rotation + M_2PI * (sl + rand.Frand01<T>() * m_Thickness) / m_Slices;
T r = m_Weight * rand.Frand01<T>();
@ -2187,7 +2187,7 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Sides = (T)(int)(rand.Frand01<T>() * 10 + 3);
m_Sides = T(int(rand.Frand01<T>() * 10 + 3));
m_Power = 3 * rand.Frand01<T>() + 1;
m_Circle = 3 * rand.Frand01<T>();
m_Corners = 2 * rand.Frand01<T>() * m_Circle;
@ -2874,7 +2874,7 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Rnd = rand.Frand01<T>();
m_M = (T)(int)(rand.Frand01<T>() * 6);
m_M = T(int(rand.Frand01<T>() * 6));
m_N1 = rand.Frand01<T>() * 40;
m_N2 = rand.Frand01<T>() * 20;
m_N3 = m_N2;
@ -4985,7 +4985,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T roundx = (T)(int)(helper.In.x >= 0 ? (helper.In.x + T(0.5)) : (helper.In.x - T(0.5)));
T roundx = T(int(helper.In.x >= 0 ? (helper.In.x + T(0.5)) : (helper.In.x - T(0.5))));
T offsetx = helper.In.x - roundx;
helper.Out.x = m_Weight * (offsetx * (1 - m_Space) + roundx);
@ -5053,7 +5053,7 @@ public:
{
T r = helper.m_PrecalcSqrtSumSquares;
T a = helper.m_PrecalcAtanyx + m_Swirl * r;
T c = (T)Floor<T>((m_Count * a + T(M_PI)) * T(M_1_PI) * T(0.5));
T c = T(Floor<T>((m_Count * a + T(M_PI)) * T(M_1_PI) * T(0.5)));
a = a * m_CompFac + c * m_Angle;
r = m_Weight * (r + m_Hole);
@ -5098,7 +5098,7 @@ public:
{
m_Angle = T(M_PI) * rand.Frand01<T>();
m_Hole = T(0.5) * rand.Frand11<T>();
m_Count = (T)Floor<T>(5 * rand.Frand01<T>()) + 1;
m_Count = T(Floor<T>(5 * rand.Frand01<T>())) + 1;
m_Swirl = rand.Frand01<T>();
}
@ -5140,9 +5140,9 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T r = m_Weight * pow(helper.m_PrecalcSumSquares, m_Cn);
int tRand = (int)(m_Rn * rand.Frand01<T>());
int tRand = int(m_Rn * rand.Frand01<T>());
T a = (helper.m_PrecalcAtanyx + M_2PI * tRand) / m_Power;
T c = (T)Floor<T>((m_Count * a + T(M_PI)) * T(M_1_PI) * T(0.5));
T c = T(Floor<T>((m_Count * a + T(M_PI)) * T(M_1_PI) * T(0.5)));
a = a * m_Cf + c * m_Angle;
helper.Out.x = r * cos(a);
@ -5188,9 +5188,9 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Power = (T)(int)(5 * rand.Frand01<T>() + 2);
m_Power = T(int(5 * rand.Frand01<T>() + 2));
m_Dist = 1;
m_Count = (T)(int)(3 * rand.Frand01<T>() + 1);
m_Count = T(int(3 * rand.Frand01<T>() + 1));
m_Angle = T(M_PI) * rand.Frand01<T>();
}
@ -5237,7 +5237,7 @@ public:
{
T r = 1 / Zeps(helper.m_PrecalcSqrtSumSquares);
T a = helper.m_PrecalcAtanyx + m_Swirl * r;
T c = (T)Floor<T>((m_Count * a + T(M_PI)) * T(M_1_PI) * T(0.5));
T c = T(Floor<T>((m_Count * a + T(M_PI)) * T(M_1_PI) * T(0.5)));
T compFac = 1 - m_Angle * m_Count * T(M_1_PI) * T(0.5);
a = a * compFac + c * m_Angle;
@ -5277,7 +5277,7 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Angle = T(M_PI) * rand.Frand01<T>();
m_Count = (T)Floor<T>(5 * rand.Frand01<T>()) + 1;
m_Count = T(Floor<T>(5 * rand.Frand01<T>())) + 1;
m_Hole = T(0.5) * rand.Frand11<T>();
m_Swirl = rand.Frand01<T>();
}
@ -6116,7 +6116,7 @@ public:
{
m_Symmetry = 0;
m_AugerWeight = T(0.5) + rand.Frand01<T>() / 2;
m_Freq = (T)Floor<T>(5 * rand.Frand01<T>()) + 1;
m_Freq = T(Floor<T>(5 * rand.Frand01<T>())) + 1;
m_Scale = rand.Frand01<T>();
}

View File

@ -474,8 +474,8 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T x = (T)Floor<T>(helper.In.x * m_InvSize);
T y = (T)Floor<T>(helper.In.y * m_InvSize);
T x = T(Floor<T>(helper.In.x * m_InvSize));
T y = T(Floor<T>(helper.In.y * m_InvSize));
helper.Out.x = m_V * (x + m_BlurPixelizeScale * (rand.Frand01<T>() - T(0.5)) + T(0.5));
helper.Out.y = m_V * (y + m_BlurPixelizeScale * (rand.Frand01<T>() - T(0.5)) + T(0.5));
@ -1366,8 +1366,8 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T roundX = (T)(int)(helper.In.x >= 0 ? (int)(helper.In.x + T(0.5)) : (int)(helper.In.x - T(0.5)));
T roundY = (T)(int)(helper.In.y >= 0 ? (int)(helper.In.y + T(0.5)) : (int)(helper.In.y - T(0.5)));
T roundX = T(int(helper.In.x >= 0 ? int(helper.In.x + T(0.5)) : int(helper.In.x - T(0.5))));
T roundY = T(int(helper.In.y >= 0 ? int(helper.In.y + T(0.5)) : int(helper.In.y - T(0.5))));
T offsetX = helper.In.x - roundX;
T offsetY = helper.In.y - roundY;
@ -1578,7 +1578,7 @@ public:
T rnx = m_Rnd * rand.Frand01<T>();
T rny = m_Rnd * rand.Frand01<T>();
int isXY = (int)(LRint(helper.In.x * m_Cs) + LRint(helper.In.y * m_Cs));
int isXY = int(LRint(helper.In.x * m_Cs) + LRint(helper.In.y * m_Cs));
if (isXY % 2)
{
@ -3456,7 +3456,7 @@ public:
{
T x = m_A * helper.In.x + m_B * helper.In.y + m_E;
T y = m_C * helper.In.x + m_D * helper.In.y + m_F;
T angle = (atan2(y, x) + M_2PI * rand.Rand((int)m_AbsN)) / m_Power;
T angle = (atan2(y, x) + M_2PI * rand.Rand(int(m_AbsN))) / m_Power;
T sina = sin(angle);
T cosa = cos(angle);
T r = m_Weight * pow(SQR(x) + SQR(y), m_Cn);
@ -3504,7 +3504,7 @@ public:
if (m_Power == 0)
m_Power = 2;
m_AbsN = T((int)abs(m_Power));
m_AbsN = T(int(abs(m_Power)));
m_Cn = m_Dist / m_Power / 2;
}
@ -3837,7 +3837,7 @@ public:
{
T x = (m_IsOdd != 0) ? helper.In.x : m_Vvar * helper.m_PrecalcAtanxy;
T y = (m_IsOdd != 0) ? helper.In.y : m_Vvar2 * log(helper.m_PrecalcSumSquares);
T angle = (atan2(y, x) + M_2PI * rand.Rand((int)m_AbsN)) / m_Nnz;
T angle = (atan2(y, x) + M_2PI * rand.Rand(int(m_AbsN))) / m_Nnz;
T r = m_Weight * pow(SQR(x) + SQR(y), m_Cn) * ((m_IsOdd == 0) ? 1 : m_Parity);
T sina = sin(angle) * r;
T cosa = cos(angle) * r;
@ -3889,7 +3889,7 @@ public:
m_Vvar2 = m_Vvar * T(0.5);
m_AbsN = abs(m_Nnz);
m_Cn = 1 / m_Nnz / 2;
m_IsOdd = T(abs((int)m_Parity) % 2);
m_IsOdd = T(abs(int(m_Parity)) % 2);
}
protected:
@ -5161,7 +5161,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T angle = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand((int)m_AbsN)) / m_Power;
T angle = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand(int(m_AbsN))) / m_Power;
T r = m_Weight * pow(helper.m_PrecalcSumSquares, m_Cn);
T sina = sin(angle);
T cosa = cos(angle);
@ -5218,7 +5218,7 @@ public:
if (m_Power == 0)
m_Power = 2;
m_AbsN = T((int)fabs(m_Power));
m_AbsN = T(int(fabs(m_Power)));
m_Cn = 1 / m_Power / 2;
}
@ -5594,7 +5594,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T a = helper.m_PrecalcAtanyx;
int n = rand.Rand((uint)m_Spread);
int n = rand.Rand(uint(m_Spread));
if (a < 0)
n++;

View File

@ -278,7 +278,7 @@ public:
{
T r = Zeps(pow(helper.m_PrecalcSqrtSumSquares, m_Dist));
int n = Floor<T>(m_Power * rand.Frand01<T>());
T alpha = helper.m_PrecalcAtanyx + n * M_2PI / Zeps<T>((T)Floor<T>(m_Power));
T alpha = helper.m_PrecalcAtanyx + n * M_2PI / Zeps<T>(T(Floor<T>(m_Power)));
T sina = sin(alpha);
T cosa = cos(alpha);
@ -923,17 +923,17 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T f = rand.Frand01<T>() * m_Power * 2;
T angle = (T)(int)(f);
T angle = T(int(f));
f -= angle;
T x = f * m_Length;
T z = sqrt(1 + SQR(x) - 2 * x * cos(m_Alpha));
if (((int)angle) % 2)
angle = M_2PI / m_Power * (((int)angle) / 2) + asin(sin(m_Alpha) * x / z);
if (int(angle) % 2)
angle = M_2PI / m_Power * (int(angle) / 2) + asin(sin(m_Alpha) * x / z);
else
angle = M_2PI / m_Power * (((int)angle) / 2) - asin(sin(m_Alpha) * x / z);
angle = M_2PI / m_Power * (int(angle) / 2) - asin(sin(m_Alpha) * x / z);
z *= sqrt(rand.Frand01<T>());
@ -1186,7 +1186,7 @@ public:
{
T xang = (helper.m_PrecalcAtanyx + T(M_PI)) / m_Alpha;
xang = (xang - (int) xang) * m_Alpha;
xang = (xang - int(xang)) * m_Alpha;
xang = cos((xang < m_Alpha / 2) ? xang : m_Alpha - xang);
T xr = xang > 0 ? m_Radius / xang : 1;
@ -1310,7 +1310,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T xang = (helper.m_PrecalcAtanyx + M_3PI + m_Alpha / 2) / m_Alpha;
T zang = ((xang - (int)xang) * m_Width + (int)xang) * m_Alpha - T(M_PI) - m_Alpha / 2 * m_Width;
T zang = ((xang - int(xang)) * m_Width + int(xang)) * m_Alpha - T(M_PI) - m_Alpha / 2 * m_Width;
helper.Out.x = m_Weight * helper.m_PrecalcSqrtSumSquares * cos(zang);
helper.Out.y = m_Weight * helper.m_PrecalcSqrtSumSquares * sin(zang);
@ -1495,7 +1495,7 @@ public:
T z = helper.In.z / m_AbsN;
T r = m_Weight * pow(helper.m_PrecalcSumSquares + SQR(z), m_Cn);
T tmp = r * helper.m_PrecalcSqrtSumSquares;
T ang = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand((uint)m_AbsN)) / m_N;
T ang = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand(uint(m_AbsN))) / m_N;
helper.Out.x = tmp * cos(ang);
helper.Out.y = tmp * sin(ang);
@ -1574,7 +1574,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
T r = m_Weight * pow(helper.m_PrecalcSumSquares, m_Cn);
T temp = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand((uint)m_AbsN)) / m_N;
T temp = (helper.m_PrecalcAtanyx + M_2PI * rand.Rand(uint(m_AbsN))) / m_N;
helper.Out.x = r * cos(temp);
helper.Out.y = r * sin(temp);
@ -3200,7 +3200,7 @@ public:
if (a >= 0)
{
alt = (int)(a * m_KnPi);
alt = int(a * m_KnPi);
if (alt % 2 == 0)
a = alt * m_PiKn + fmod(m_KaKn + a, m_PiKn);
@ -3209,7 +3209,7 @@ public:
}
else
{
alt = (int)(-a * m_KnPi);
alt = int(-a * m_KnPi);
if (alt % 2 == 1)
a = -(alt * m_PiKn + fmod(-m_KaKn - a, m_PiKn));
@ -3539,7 +3539,7 @@ public:
{
T tau = T(0.5) * (log(Sqr(helper.In.x + 1) + SQR(helper.In.y)) - log(Sqr(helper.In.x - 1) + SQR(helper.In.y)));
T sigma = T(M_PI) - atan2(helper.In.y, helper.In.x + 1) - atan2(helper.In.y, 1 - helper.In.x);
int alt = (int)(sigma * m_CnPi);
int alt = int(sigma * m_CnPi);
if (alt % 2 == 0)
sigma = alt * m_PiCn + fmod(sigma + m_CaCn, m_PiCn);
@ -3857,7 +3857,7 @@ public:
if (helper.In.y > 0)
{
alt = (int)(nu * m_CnPi);
alt = int(nu * m_CnPi);
if (alt % 2 == 0)
nu = alt * m_PiCn + fmod(nu + m_CaCn, m_PiCn);
@ -3866,7 +3866,7 @@ public:
}
else
{
alt = (int)(nu * m_CnPi);
alt = int(nu * m_CnPi);
if (alt % 2 == 0)
nu = alt * m_PiCn + fmod(nu + m_CaCn, m_PiCn);

View File

@ -1533,24 +1533,24 @@ public:
switch (rand.Rand(5))
{
case 0:
a = (rand.Rand((ISAAC_INT)m_Slices) + rand.Frand01<T>() * m_XThickness) / m_Slices;
r = (rand.Rand((ISAAC_INT)m_Slices) + rand.Frand01<T>() * m_YThickness) / m_Slices;
a = (rand.Rand(ISAAC_INT(m_Slices)) + rand.Frand01<T>() * m_XThickness) / m_Slices;
r = (rand.Rand(ISAAC_INT(m_Slices)) + rand.Frand01<T>() * m_YThickness) / m_Slices;
break;
case 1:
a = (rand.Rand((ISAAC_INT)m_Slices) + rand.Frand01<T>()) / m_Slices;
r = (rand.Rand((ISAAC_INT)m_Slices) + m_YThickness) / m_Slices;
a = (rand.Rand(ISAAC_INT(m_Slices)) + rand.Frand01<T>()) / m_Slices;
r = (rand.Rand(ISAAC_INT(m_Slices)) + m_YThickness) / m_Slices;
break;
case 2:
a = (rand.Rand((ISAAC_INT)m_Slices) + m_XThickness) / m_Slices;
r = (rand.Rand((ISAAC_INT)m_Slices) + rand.Frand01<T>()) / m_Slices;
a = (rand.Rand(ISAAC_INT(m_Slices)) + m_XThickness) / m_Slices;
r = (rand.Rand(ISAAC_INT(m_Slices)) + rand.Frand01<T>()) / m_Slices;
break;
case 3:
a = rand.Frand01<T>();
r = (rand.Rand((ISAAC_INT)m_Slices) + m_YThickness + rand.Frand01<T>() * (1 - m_YThickness)) / m_Slices;
r = (rand.Rand(ISAAC_INT(m_Slices)) + m_YThickness + rand.Frand01<T>() * (1 - m_YThickness)) / m_Slices;
break;
case 4:
default:
a = (rand.Rand((ISAAC_INT)m_Slices) + m_XThickness + rand.Frand01<T>() * (1 - m_XThickness)) / m_Slices;
a = (rand.Rand(ISAAC_INT(m_Slices)) + m_XThickness + rand.Frand01<T>() * (1 - m_XThickness)) / m_Slices;
r = rand.Frand01<T>();
break;
}
@ -1713,7 +1713,7 @@ public:
r1 = pow(fabs(pr1), m_N1_1) + m_Spiral * rho1;
r2 = pow(fabs(pr2), m_N1_2);
if ((int)m_Toroidmap == 1)
if (int(m_Toroidmap) == 1)
{
helper.Out.x = m_Weight * cosr * (r1 + r2 * cosp);
helper.Out.y = m_Weight * sinr * (r1 + r2 * cosp);
@ -1908,7 +1908,7 @@ public:
helper.Out.y = helper.In.y * rY;
//Optional 3D calculation.
if ((int)m_ZOn == 1)
if (int(m_ZOn) == 1)
{
rZ = m_Weight / pow(t, m_StretchZ);
helper.Out.z = helper.In.z * rZ;
@ -1992,7 +1992,7 @@ public:
const T c = cos(ang);
const int esc = rad > m_Radius;
const int cr0 = (int)m_Zero;
const int cr0 = int(m_Zero);
if (cr0 && esc)
{
@ -2133,7 +2133,7 @@ public:
const T radiusOut = m_Weight * pow(helper.m_PrecalcSumSquares + z * z, m_Cn);
const T x = m_A * helper.In.x + m_B * helper.In.y + m_E;
const T y = m_C * helper.In.x + m_D * helper.In.y + m_F;
const T tempRand = (T)(int)(rand.Frand01<T>() * m_AbsN);
const T tempRand = T(int(rand.Frand01<T>() * m_AbsN));
const T alpha = (atan2(y, x) + M_2PI * tempRand) / m_Power;
const T gamma = radiusOut * helper.m_PrecalcSqrtSumSquares;
@ -2963,7 +2963,7 @@ public:
T fp2x;
T fp2y;
switch ((int)m_T1)
switch (int(m_T1))
{
case 0:
fp1x = Sine(m_A1, m_B1, m_C1, m_P1, helper.In.x);
@ -2983,7 +2983,7 @@ public:
break;
}
switch ((int)m_T2)
switch (int(m_T2))
{
case 0:
fp2x = Sine(m_A2, m_B2, m_C2, m_P2, helper.In.x);
@ -4115,7 +4115,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
int extended = (int)m_Extended;
int extended = int(m_Extended);
T seed = m_AbsSeed;
T r = -m_Rotation;
T r0 = 0;
@ -4128,8 +4128,8 @@ public:
T niter = 0;
T x = helper.In.x * m_Scale;
T y = helper.In.y * m_Scale;
int intx = (int)Round(x);
int inty = (int)Round(y);
int intx = int(Round(x));
int inty = int(Round(y));
int randiter;
r = x - intx;
@ -4166,11 +4166,11 @@ public:
}
else
{
int xrand = (int)Round(helper.In.x);
int yrand = (int)Round(helper.In.y);
int xrand = int(Round(helper.In.x));
int yrand = int(Round(helper.In.y));
seed = (T)Floor<T>(seed);
niter = (T)abs(xrand + yrand + xrand * yrand);
seed = T(Floor<T>(seed));
niter = T(abs(xrand + yrand + xrand * yrand));
randInt = seed + niter;
randiter = 0;
@ -4557,7 +4557,7 @@ protected:
}
private:
static inline T GdoffsFcip(T a) { return (T)((a < 0) ? -((int)(fabs(a)) + 1) : 0) + ((a > 1) ? ((int)(a)) : 0); }
static inline T GdoffsFcip(T a) { return T((a < 0) ? -(int(fabs(a)) + 1) : 0) + ((a > 1) ? (int(a)) : 0); }
static inline T GdoffsFclp(T a) { return ((a < 0) ? -(fmod(fabs(a), T(1))) : fmod(fabs(a), T(1))); }
static inline T GdoffsFscl(T a) { return GdoffsFclp((a + 1) / 2); }
static inline T GdoffsFosc(T p, T a) { return GdoffsFscl(-1 * cos(p * a * M_2PI)); }
@ -5043,7 +5043,7 @@ public:
{
m_BlobLow = T(0.2) + T(0.5) * rand.Frand01<T>();
m_BlobHigh = T(0.8) + T(0.4) * rand.Frand01<T>();
m_BlobWaves = (T)(int)(2 + 5 * rand.Frand01<T>());
m_BlobWaves = T(int(2 + 5 * rand.Frand01<T>()));
}
protected:

View File

@ -293,7 +293,7 @@ public:
if (++iters > 10)
break;
}
while ((DiscreteNoise2((int)(m + m_Seed), n) > m_Dens) || (u > (T(0.3) + T(0.7) * DiscreteNoise2(m + 10, n + 3)) * m_Sc));
while ((DiscreteNoise2(int(m + m_Seed), n) > m_Dens) || (u > (T(0.3) + T(0.7) * DiscreteNoise2(m + 10, n + 3)) * m_Sc));
helper.Out.x = m_Weight * (x + (m * 2 + 1) * m_Sc);
helper.Out.y = m_Weight * (y + (n * 2 + 1) * m_Sc);
@ -413,7 +413,7 @@ public:
y = uy - (n * 2 + 1) * m_Sc;
u = Hypot(x, y);
if ((DiscreteNoise2((int)(m + m_Seed), n) > m_Dens) || (u > (T(0.3) + T(0.7) * DiscreteNoise2(m + 10, n + 3)) * m_Sc))
if ((DiscreteNoise2(int(m + m_Seed), n) > m_Dens) || (u > (T(0.3) + T(0.7) * DiscreteNoise2(m + 10, n + 3)) * m_Sc))
{
ux = ux;
uy = uy;
@ -565,7 +565,7 @@ private:
if (++iters > 10)
break;
}
while (DiscreteNoise2((int)(m + m_Seed), n) > m_Dens);
while (DiscreteNoise2(int(m + m_Seed), n) > m_Dens);
*ux = x + (m * 2 + 1) * m_Sc;
*vy = y + (n * 2 + 1) * m_Sc;
@ -1551,7 +1551,7 @@ public:
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
int sl = (int)(rand.Frand01<T>() * m_Slices + T(0.5));
int sl = int(rand.Frand01<T>() * m_Slices + T(0.5));
T a = m_Rotation + M_2PI * (sl + rand.Frand01<T>() * m_Thickness) / m_Slices;
T r = m_Weight * rand.Frand01<T>();
@ -1585,7 +1585,7 @@ public:
virtual void Random(QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
{
m_Params[0].Set((int)10 * rand.Frand01<T>());//Slices.
m_Params[0].Set(10 * rand.Frand01<T>());//Slices.
m_Params[1].Set(M_2PI * rand.Frand11<T>());//Rotation.
m_Thickness = rand.Frand01<T>();
}
@ -1835,8 +1835,8 @@ public:
const T xrng = helper.In.x / m_XDistance;
const T yrng = helper.In.y / m_YDistance;
helper.Out.x = m_Xw * ((xrng - (int)xrng) * m_XWidth + (int)xrng + (T(0.5) - xpos) * m_1mX);
helper.Out.y = m_Yw * ((yrng - (int)yrng) * m_YWidth + (int)yrng + (T(0.5) - ypos) * m_1mY);
helper.Out.x = m_Xw * ((xrng - int(xrng)) * m_XWidth + int(xrng) + (T(0.5) - xpos) * m_1mX);
helper.Out.y = m_Yw * ((yrng - int(yrng)) * m_YWidth + int(yrng) + (T(0.5) - ypos) * m_1mY);
helper.Out.z = m_Weight * helper.In.z;
//outPoint.m_X = 0;
//outPoint.m_Y = 0;
@ -2125,7 +2125,7 @@ public:
T sigma, phi, rad, sigmas, sigmac, phis, phic;
T scale, denom;
switch ((int)m_Type)
switch (int(m_Type))
{
case 0://Linear.
helper.Out.x = m_Weight * (helper.In.x + m_MulX * ax * rs);
@ -2282,7 +2282,7 @@ public:
const T distB = m_Invert != 0 ? max<T>(1 - distA, 0) : max<T>(distA, 0);//Original called a macro named min, which internally performed max.
const T dist = max<T>((distB - m_MinDist) * m_RMax, 0);
switch ((int)m_Type)
switch (int(m_Type))
{
case 0://Linear.
{
@ -2477,7 +2477,7 @@ public:
const v4T random(rand.Frand<T>(T(-0.5), T(0.5)), rand.Frand<T>(T(-0.5), T(0.5)), rand.Frand<T>(T(-0.5), T(0.5)), rand.Frand<T>(T(-0.5), T(0.5)));
T radius;
switch ((int)m_BlurShape)
switch (int(m_BlurShape))
{
case 0://Circle.
radius = sqrt(Sqr(helper.In.x - m_CenterX) + Sqr(helper.In.y - m_CenterY) + Sqr(helper.In.z - m_CenterZ));
@ -2490,7 +2490,7 @@ public:
const T dist = max<T>(((m_InvertDistance != 0 ? max<T>(1 - radius, 0) : max<T>(radius, 0)) - m_MinDistance) * m_RMax, 0);
switch ((int)m_BlurType)
switch (int(m_BlurType))
{
case 0://Gaussian.
{
@ -3041,7 +3041,7 @@ public:
if (m_Power == 0)
m_Power = 2;
m_AbsN = T((int)fabs(m_Power));
m_AbsN = T(int(fabs(m_Power)));
m_Cn = m_Dist / m_Power / 2;
}
@ -3092,7 +3092,7 @@ private:
{
T inx = (be - m_Radius + (al - m_Radius) * m_CosC) / m_SinC;
T iny = al - m_Radius;
T angle = (atan2(iny, inx) + M_2PI * (rand.Rand((int)m_AbsN))) / m_Power;
T angle = (atan2(iny, inx) + M_2PI * (rand.Rand(int(m_AbsN)))) / m_Power;
T r = m_Weight * pow(SQR(inx) + SQR(iny), m_Cn);
x = r * cos(angle);

View File

@ -185,7 +185,7 @@ public:
//If this xform was already part of a different ember, then do not assign, else do.
if (!m_ParentEmber && (typeid(T) == typeid(U)))
m_ParentEmber = (Ember<T>*)xform.ParentEmber();
m_ParentEmber = static_cast<Ember<T>*>(xform.ParentEmber());
CopyVec<T, U>(m_Xaos, xform.XaosVec());
CopyVec(m_Motion, xform.m_Motion);

View File

@ -178,7 +178,7 @@ public:
m_FlattenNames.push_back("post_falloff2");
m_FlattenNames.push_back("post_rotate_x");
m_FlattenNames.push_back("post_rotate_y");
m_FlattenNames.push_back("curl3D_cz");
//This is a vector of the param names as they are in the legacy, badly named flam3/Apophysis code.
@ -264,10 +264,10 @@ public:
m_ErrorReport.clear();
//Parse XML string into internal document.
xmlPtr = (const char*)(&buf[0]);
xmlPtr = CX(&buf[0]);
bufSize = strlen(xmlPtr);
embers.reserve(bufSize / 2500);//The Xml text for an ember is around 2500 bytes, but can be much more. Pre-allocate to aovid unnecessary resizing.
doc = xmlReadMemory(xmlPtr, (int)bufSize, filename, "ISO-8859-1", XML_PARSE_NONET);//Forbid network access during read.
doc = xmlReadMemory(xmlPtr, int(bufSize), filename, "ISO-8859-1", XML_PARSE_NONET);//Forbid network access during read.
//t.Toc("xmlReadMemory");
if (doc == nullptr)
@ -281,7 +281,7 @@ public:
//Scan for <flame> nodes, starting with this node.
//t.Tic();
bn = basename((char*)filename);
bn = basename(const_cast<char*>(filename));
ScanForEmberNodes(rootnode, bn, embers);
xmlFreeDoc(doc);
emberSize = embers.size();
@ -349,7 +349,7 @@ public:
if (ReadFile(filename, buf))
{
std::replace(buf.begin(), buf.end(), '&', '+');
return Parse((byte*)buf.data(), filename, embers);
return Parse(reinterpret_cast<byte*>(const_cast<char*>(buf.data())), filename, embers);
}
else
return false;
@ -372,7 +372,7 @@ public:
errno = 0;//Note that this is not thread-safe.
//Convert the string using strtod().
val = (T)strtod(str, &endp);
val = T(strtod(str, &endp));
//Check errno & return string.
if (endp != str + strlen(str))
@ -399,7 +399,7 @@ public:
/// <returns>True if success, else false.</returns>
bool Atoi(const char* str, uint& val)
{
return Atoi(str, (int&)val);
return Atoi(str, reinterpret_cast<int&>(val));
}
/// <summary>
@ -562,7 +562,7 @@ private:
for (curAtt = att; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(emberNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(emberNode, curAtt->name));
//First parse out simple float reads.
if (ParseAndAssignFloat(curAtt->name, attStr, "time", currentEmber.m_Time, ret)) { }
@ -723,7 +723,7 @@ private:
for (curAtt = att; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
a = 255;
//This signifies that a palette is not being retrieved from the palette file, rather it's being parsed directly out of the ember xml.
@ -752,7 +752,7 @@ private:
}
else
{
m_ErrorReport.push_back(string(loc) + " : Unknown color attribute " + string((const char*)curAtt->name));
m_ErrorReport.push_back(string(loc) + " : Unknown color attribute " + string(CCX(curAtt->name)));
}
xmlFree(attStr);
@ -789,7 +789,7 @@ private:
for (curAtt = att; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
if (!Compare(curAtt->name, "count"))
{
@ -804,7 +804,7 @@ private:
}
else
{
m_ErrorReport.push_back(string(loc) + " : Unknown color attribute " + string((const char*)curAtt->name));
m_ErrorReport.push_back(string(loc) + " : Unknown color attribute " + string(CCX(curAtt->name)));
}
xmlFree(attStr);
@ -835,7 +835,7 @@ private:
for (curAtt = att; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
if (!Compare(curAtt->name, "index0"))
{
@ -883,7 +883,7 @@ private:
}
else
{
m_ErrorReport.push_back(string(loc) + " : Unknown palette attribute " + string((const char*)curAtt->name));
m_ErrorReport.push_back(string(loc) + " : Unknown palette attribute " + string(CCX(curAtt->name)));
}
xmlFree(attStr);
@ -903,7 +903,7 @@ private:
else
{
//Read formatted string from contents of tag.
char* palStr = (char*)xmlNodeGetContent(childNode);
char* palStr = CX(xmlNodeGetContent(childNode));
if (!ParseHexColors(palStr, currentEmber, numColors, numBytes))
{
@ -928,7 +928,7 @@ private:
for (curAtt = att; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
if (!Compare(curAtt->name, "kind"))
{
@ -1013,7 +1013,7 @@ private:
else if (!Compare(childNode->name, "edit"))
{
//Create a new XML document with this edit node as the root node.
currentEmber.m_Edits = xmlNewDoc((const xmlChar*)"1.0");
currentEmber.m_Edits = xmlNewDoc(XC("1.0"));
editNode = xmlCopyNode(childNode, 1);
xmlDocSetRootElement(currentEmber.m_Edits, editNode);
}
@ -1058,7 +1058,7 @@ private:
for (curAtt = attPtr; curAtt; curAtt = curAtt->next)
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
//First parse out simple float reads.
if (ParseAndAssignFloat(curAtt->name, attStr, "weight", xform.m_Weight, success)) { }
@ -1196,14 +1196,14 @@ private:
if (!Compare(curAtt->name, "var1"))
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
for (j = 0; j < xform.TotalVariationCount(); j++)
xform.GetVariation(j)->m_Weight = 0;
if (Atof(attStr, temp))
{
uint iTemp = (uint)temp;
uint iTemp = static_cast<uint>(temp);
if (iTemp < xform.TotalVariationCount())
{
@ -1227,7 +1227,7 @@ private:
if (!Compare(curAtt->name, "var"))
{
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = reinterpret_cast<char*>(xmlGetProp(childNode, curAtt->name));
if (Atof(attStr, temp))
{
@ -1252,13 +1252,13 @@ private:
{
for (curAtt = attPtr; curAtt; curAtt = curAtt->next)
{
string s = GetCorrectedParamName(m_BadParamNames, (const char*)curAtt->name);
string s = GetCorrectedParamName(m_BadParamNames, CCX(curAtt->name));
const char* name = s.c_str();
if (parVar->ContainsParam(name))
{
T val = 0;
attStr = (char*)xmlGetProp(childNode, curAtt->name);
attStr = CX(xmlGetProp(childNode, curAtt->name));
if (Atof(attStr, val))
{
@ -1309,7 +1309,7 @@ private:
{
for (size_t i = 0; i < vec.size(); i++)
{
if (!_stricmp(vec[i].first.first.c_str(), (const char*)att->name))//Do case insensitive here.
if (!_stricmp(vec[i].first.first.c_str(), CCX(att->name)))//Do case insensitive here.
{
if (!vec[i].second.empty())
{
@ -1326,7 +1326,7 @@ private:
}
}
return string((const char*)att->name);
return string(CCX(att->name));
}
/// <summary>
@ -1341,7 +1341,7 @@ private:
do
{
if (!_stricmp(name, (const char*)temp->name))
if (!_stricmp(name, CCX(temp->name)))
return true;
} while ((temp = temp->next));
@ -1364,12 +1364,12 @@ private:
uint r, g, b, a;
int ret;
char tmps[2];
int skip = (int)abs(chan);
int skip = static_cast<int>(abs(chan));
bool ok = true;
const char* loc = __FUNCTION__;
//Strip whitespace prior to first color.
while (isspace((int)colstr[colorIndex]))
while (isspace(static_cast<int>(colstr[colorIndex])))
colorIndex++;
do
@ -1394,7 +1394,7 @@ private:
colorIndex += 2 * skip;
while (isspace((int)colstr[colorIndex]))
while (isspace(static_cast<int>(colstr[colorIndex])))
colorIndex++;
ember.m_Palette.m_Entries[colorCount].r = T(r) / T(255);//Hex palette is [0..255], convert to [0..1].
@ -1504,7 +1504,7 @@ private:
if (!Compare(name, str))
{
b &= Atof(attStr, fval);
val = (intT)fval;
val = static_cast<intT>(fval);
ret = true;//Means the strcmp() was right, but doesn't necessarily mean the conversion went ok.
}

View File

@ -190,13 +190,13 @@ bool EmberAnimate(EmberOptions& opt)
embers[i].m_SubBatchSize = opt.SubBatchSize();
embers[i].m_Quality *= T(opt.QualityScale());
embers[i].m_FinalRasW = (uint)((T)embers[i].m_FinalRasW * opt.SizeScale());
embers[i].m_FinalRasH = (uint)((T)embers[i].m_FinalRasH * opt.SizeScale());
embers[i].m_FinalRasW = uint(T(embers[i].m_FinalRasW) * opt.SizeScale());
embers[i].m_FinalRasH = uint(T(embers[i].m_FinalRasH) * opt.SizeScale());
embers[i].m_PixelsPerUnit *= T(opt.SizeScale());
//Cast to double in case the value exceeds 2^32.
double imageMem = (double)channels * (double)embers[i].m_FinalRasW
* (double)embers[i].m_FinalRasH * (double)renderer->BytesPerChannel();
double imageMem = double(channels) * double(embers[i].m_FinalRasW)
* double(embers[i].m_FinalRasH) * double(renderer->BytesPerChannel());
double maxMem = pow(2.0, double((sizeof(void*) * 8) - 1));
if (imageMem > maxMem)//Ensure the max amount of memory for a process isn't exceeded.
@ -233,10 +233,10 @@ bool EmberAnimate(EmberOptions& opt)
if (!opt.Time() && !opt.Frame())
{
if (opt.FirstFrame() == UINT_MAX)
opt.FirstFrame((int)embers[0].m_Time);
opt.FirstFrame(int(embers[0].m_Time));
if (opt.LastFrame() == UINT_MAX)
opt.LastFrame(ClampGte<uint>((uint)embers.back().m_Time - 1, opt.FirstFrame()));
opt.LastFrame(ClampGte<uint>(uint(embers.back().m_Time - 1), opt.FirstFrame()));
}
if (!opt.Out().empty())
@ -303,7 +303,7 @@ bool EmberAnimate(EmberOptions& opt)
comments = renderer->ImageComments(stats, opt.PrintEditDepth(), opt.IntPalette(), opt.HexPalette());
os.str("");
size_t iterCount = renderer->TotalIterCount(1);
os << comments.m_NumIters << " / " << iterCount << " (" << std::fixed << std::setprecision(2) << ((double)stats.m_Iters / (double)iterCount * 100) << "%)";
os << comments.m_NumIters << " / " << iterCount << " (" << std::fixed << std::setprecision(2) << double(stats.m_Iters) / double(iterCount * 100) << "%)";
VerbosePrint("\nIters ran/requested: " + os.str());
VerbosePrint("Bad values: " << stats.m_Badvals);
@ -358,7 +358,7 @@ int _tmain(int argc, _TCHAR* argv[])
#ifdef WIN32
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
#else
putenv((char*)"GPU_MAX_ALLOC_PERCENT=100");
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
#endif
if (!opt.Populate(argc, argv, OPT_USE_ANIMATE))

View File

@ -188,14 +188,14 @@ uint DEOpenCLKernelCreator<T>::MaxDEFilterSize() { return 9; }//The true max wou
template <typename T>
T DEOpenCLKernelCreator<T>::SolveMaxDERad(uint maxBoxSize, T desiredFilterSize, T ss)
{
uint finalFilterSize = (uint)((ceil(desiredFilterSize) * ss) + (ss - 1.0));
uint finalFilterSize = uint((ceil(desiredFilterSize) * ss) + (ss - 1.0));
//Return the desired size if the final size of it will fit.
if (finalFilterSize <= MaxDEFilterSize())
return desiredFilterSize;
//The final size doesn't fit, so scale the original down until it fits.
return (T)floor((MaxDEFilterSize() - (ss - 1.0)) / ss);
return T(floor((MaxDEFilterSize() - (ss - 1.0)) / ss));
}
/// <summary>
@ -207,7 +207,7 @@ T DEOpenCLKernelCreator<T>::SolveMaxDERad(uint maxBoxSize, T desiredFilterSize,
template <typename T>
uint DEOpenCLKernelCreator<T>::SolveMaxBoxSize(uint localMem)
{
return (uint)floor(sqrt(floor((T)localMem / 16.0)));//Divide by 16 because each element is float4.
return uint(floor(sqrt(floor(T(localMem) / 16.0))));//Divide by 16 because each element is float4.
}
/// <summary>

View File

@ -70,7 +70,7 @@ bool OpenCLWrapper::Init(uint platform, uint device, bool shared)
m_Device = m_Devices[m_PlatformIndex][device];
m_DeviceVec.clear();
m_DeviceVec.push_back(m_Device);
m_LocalMemSize = (uint)GetInfo<cl_ulong>(m_PlatformIndex, m_DeviceIndex, CL_DEVICE_LOCAL_MEM_SIZE);
m_LocalMemSize = uint(GetInfo<cl_ulong>(m_PlatformIndex, m_DeviceIndex, CL_DEVICE_LOCAL_MEM_SIZE));
m_Shared = shared;
m_Init = true;//Command queue is ok, it's now ok to begin building and running programs.
}
@ -277,9 +277,9 @@ bool OpenCLWrapper::ReadBuffer(uint bufferIndex, void* data, size_t size)
/// <returns>The index if found, else -1.</returns>
int OpenCLWrapper::FindBufferIndex(const string& name)
{
for (uint i = 0; i < m_Buffers.size(); i++)
for (size_t i = 0; i < m_Buffers.size(); i++)
if (m_Buffers[i].m_Name == name)
return (int)i;
return int(i);
return -1;
}
@ -303,8 +303,8 @@ uint OpenCLWrapper::GetBufferSize(const string& name)
/// <returns>The size of the buffer if found, else 0.</returns>
uint OpenCLWrapper::GetBufferSize(uint bufferIndex)
{
if (m_Init && bufferIndex < m_Buffers.size())
return (uint)m_Buffers[bufferIndex].m_Buffer.getInfo<CL_MEM_SIZE>(nullptr);
if (m_Init && (bufferIndex < m_Buffers.size()))
return uint(m_Buffers[bufferIndex].m_Buffer.getInfo<CL_MEM_SIZE>(nullptr));
return 0;
}
@ -355,7 +355,7 @@ bool OpenCLWrapper::AddAndWriteImage(const string& name, cl_mem_flags flags, con
m_GLImages.push_back(namedImageGL);
if (data)
return WriteImage2D((uint)m_GLImages.size() - 1, true, width, height, row_pitch, data);//OpenGL images/textures require a separate write.
return WriteImage2D(uint(m_GLImages.size() - 1), true, width, height, row_pitch, data);//OpenGL images/textures require a separate write.
else
return true;
}
@ -552,13 +552,13 @@ int OpenCLWrapper::FindImageIndex(const string& name, bool shared)
{
if (shared)
{
for (uint i = 0; i < m_GLImages.size(); i++)
for (size_t i = 0; i < m_GLImages.size(); i++)
if (m_GLImages[i].m_Name == name)
return i;
}
else
{
for (uint i = 0; i < m_Images.size(); i++)
for (size_t i = 0; i < m_Images.size(); i++)
if (m_Images[i].m_Name == name)
return i;
}
@ -608,7 +608,7 @@ uint OpenCLWrapper::GetImageSize(uint imageIndex, bool shared)
}
}
return (uint)size;
return uint(size);
}
/// <summary>
@ -920,9 +920,9 @@ bool OpenCLWrapper::SetImageArg(uint kernelIndex, uint argIndex, bool shared, ui
/// <returns>The index if found, else -1.</returns>
int OpenCLWrapper::FindKernelIndex(const string& name)
{
for (uint i = 0; i < m_Programs.size(); i++)
for (size_t i = 0; i < m_Programs.size(); i++)
if (m_Programs[i].m_Name == name)
return (int)i;
return int(i);
return -1;
}
@ -999,7 +999,7 @@ vector<string> OpenCLWrapper::PlatformNames()
platforms.reserve(m_Platforms.size());
for (uint i = 0; i < m_Platforms.size(); i++)
for (size_t i = 0; i < m_Platforms.size(); i++)
platforms.push_back(PlatformName(i));
return platforms;
@ -1172,7 +1172,7 @@ bool OpenCLWrapper::CreateContext(bool shared)
{
CL_GL_CONTEXT_KHR, (cl_context_properties)wglGetCurrentContext(),
CL_WGL_HDC_KHR, (cl_context_properties)wglGetCurrentDC(),
CL_CONTEXT_PLATFORM, (cl_context_properties)(m_Platforms[m_PlatformIndex])(),
CL_CONTEXT_PLATFORM, reinterpret_cast<cl_context_properties>((m_Platforms[m_PlatformIndex])()),
0
};
@ -1180,9 +1180,9 @@ bool OpenCLWrapper::CreateContext(bool shared)
#else
cl_context_properties props[] =
{
CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
CL_CONTEXT_PLATFORM, (cl_context_properties)(m_Platforms[m_PlatformIndex])(),
CL_GL_CONTEXT_KHR, cl_context_properties(glXGetCurrentContext()),
CL_GLX_DISPLAY_KHR, cl_context_properties(glXGetCurrentDisplay()),
CL_CONTEXT_PLATFORM, reinterpret_cast<cl_context_properties>((m_Platforms[m_PlatformIndex])()),
0
};
@ -1195,7 +1195,7 @@ bool OpenCLWrapper::CreateContext(bool shared)
cl_context_properties props[3] =
{
CL_CONTEXT_PLATFORM,
(cl_context_properties)(m_Platforms[m_PlatformIndex])(),
reinterpret_cast<cl_context_properties>((m_Platforms[m_PlatformIndex])()),
0
};

View File

@ -107,8 +107,8 @@ bool RendererCL<T>::Init(uint platform, uint device, bool shared, GLuint outputT
if (b && !(b = m_Wrapper.AddProgram(m_IterOpenCLKernelCreator.ZeroizeEntryPoint(), zeroizeProgram, m_IterOpenCLKernelCreator.ZeroizeEntryPoint(), m_DoublePrecision))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddProgram(m_DEOpenCLKernelCreator.LogScaleAssignDEEntryPoint(), logAssignProgram, m_DEOpenCLKernelCreator.LogScaleAssignDEEntryPoint(), m_DoublePrecision))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteImage("Palette", CL_MEM_READ_ONLY, m_PaletteFormat, 256, 1, 0, NULL))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SeedsBufferName, (void*)m_Seeds.data(), SizeOf(m_Seeds)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteImage("Palette", CL_MEM_READ_ONLY, m_PaletteFormat, 256, 1, 0, nullptr))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SeedsBufferName, reinterpret_cast<void*>(m_Seeds.data()), SizeOf(m_Seeds)))) { m_ErrorReport.push_back(loc); }
//This is the maximum box dimension for density filtering which consists of (blockSize * blockSize) + (2 * filterWidth).
//These blocks must be square, and ideally, 32x32.
@ -141,7 +141,7 @@ bool RendererCL<T>::SetOutputTexture(GLuint outputTexID)
m_OutputTexID = outputTexID;
EnterResize();
if (!m_Wrapper.AddAndWriteImage(m_FinalImageName, CL_MEM_WRITE_ONLY, m_FinalFormat, FinalRasW(), FinalRasH(), 0, NULL, m_Wrapper.Shared(), m_OutputTexID))
if (!m_Wrapper.AddAndWriteImage(m_FinalImageName, CL_MEM_WRITE_ONLY, m_FinalFormat, FinalRasW(), FinalRasH(), 0, nullptr, m_Wrapper.Shared(), m_OutputTexID))
{
m_ErrorReport.push_back(loc);
success = false;
@ -187,7 +187,7 @@ template <typename T>
bool RendererCL<T>::ReadHist()
{
if (Renderer<T, T>::Alloc())//Allocate the memory to read into.
return m_Wrapper.ReadBuffer(m_HistBufferName, (void*)HistBuckets(), SuperSize() * sizeof(v4T));
return m_Wrapper.ReadBuffer(m_HistBufferName, reinterpret_cast<void*>(HistBuckets()), SuperSize() * sizeof(v4T));
return false;
}
@ -201,7 +201,7 @@ template <typename T>
bool RendererCL<T>::ReadAccum()
{
if (Renderer<T, T>::Alloc())//Allocate the memory to read into.
return m_Wrapper.ReadBuffer(m_AccumBufferName, (void*)AccumulatorBuckets(), SuperSize() * sizeof(v4T));
return m_Wrapper.ReadBuffer(m_AccumBufferName, reinterpret_cast<void*>(AccumulatorBuckets()), SuperSize() * sizeof(v4T));
return false;
}
@ -218,7 +218,7 @@ bool RendererCL<T>::ReadPoints(vector<PointCL<T>>& vec)
vec.resize(IterGridKernelCount());//Allocate the memory to read into.
if (vec.size() >= IterGridKernelCount())
return m_Wrapper.ReadBuffer(m_PointsBufferName, (void*)vec.data(), IterGridKernelCount() * sizeof(PointCL<T>));
return m_Wrapper.ReadBuffer(m_PointsBufferName, reinterpret_cast<void*>(vec.data()), IterGridKernelCount() * sizeof(PointCL<T>));
return false;
}
@ -230,7 +230,7 @@ bool RendererCL<T>::ReadPoints(vector<PointCL<T>>& vec)
template <typename T>
bool RendererCL<T>::ClearHist()
{
return ClearBuffer(m_HistBufferName, (uint)SuperRasW(), (uint)SuperRasH(), sizeof(v4T));
return ClearBuffer(m_HistBufferName, uint(SuperRasW()), uint(SuperRasH()), sizeof(v4T));
}
/// <summary>
@ -240,7 +240,7 @@ bool RendererCL<T>::ClearHist()
template <typename T>
bool RendererCL<T>::ClearAccum()
{
return ClearBuffer(m_AccumBufferName, (uint)SuperRasW(), (uint)SuperRasH(), sizeof(v4T));
return ClearBuffer(m_AccumBufferName, uint(SuperRasW()), uint(SuperRasH()), sizeof(v4T));
}
/// <summary>
@ -252,7 +252,7 @@ bool RendererCL<T>::ClearAccum()
template <typename T>
bool RendererCL<T>::WritePoints(vector<PointCL<T>>& vec)
{
return m_Wrapper.WriteBuffer(m_PointsBufferName, (void*)vec.data(), vec.size() * sizeof(vec[0]));
return m_Wrapper.WriteBuffer(m_PointsBufferName, reinterpret_cast<void*>(vec.data()), SizeOf(vec));
}
#ifdef TEST_CL
@ -422,9 +422,9 @@ bool RendererCL<T>::CreateDEFilter(bool& newAlloc)
const char* loc = __FUNCTION__;
DensityFilter<T>* filter = dynamic_cast<DensityFilter<T>*>(GetDensityFilter());
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DECoefsBufferName, (void*)filter->Coefs(), filter->CoefsSizeBytes()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEWidthsBufferName, (void*)filter->Widths(), filter->WidthsSizeBytes()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DECoefIndicesBufferName, (void*)filter->CoefIndices(), filter->CoefsIndicesSizeBytes()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DECoefsBufferName, reinterpret_cast<void*>(const_cast<T*>(filter->Coefs())), filter->CoefsSizeBytes()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEWidthsBufferName, reinterpret_cast<void*>(const_cast<T*>(filter->Widths())), filter->WidthsSizeBytes()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DECoefIndicesBufferName, reinterpret_cast<void*>(const_cast<uint*>(filter->CoefIndices())), filter->CoefsIndicesSizeBytes()))) { m_ErrorReport.push_back(loc); }
}
}
else
@ -447,7 +447,7 @@ bool RendererCL<T>::CreateSpatialFilter(bool& newAlloc)
if (Renderer<T, T>::CreateSpatialFilter(newAlloc))
{
if (newAlloc)
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SpatialFilterCoefsBufferName, (void*)GetSpatialFilter()->Filter(), GetSpatialFilter()->BufferSizeBytes()))) { m_ErrorReport.push_back(__FUNCTION__); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SpatialFilterCoefsBufferName, reinterpret_cast<void*>(GetSpatialFilter()->Filter()), GetSpatialFilter()->BufferSizeBytes()))) { m_ErrorReport.push_back(__FUNCTION__); }
}
else
@ -507,7 +507,7 @@ bool RendererCL<T>::RandVec(vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>>& randVec)
if (m_Wrapper.Ok())
{
FillSeeds();
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SeedsBufferName, (void*)m_Seeds.data(), SizeOf(m_Seeds)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SeedsBufferName, reinterpret_cast<void*>(m_Seeds.data()), SizeOf(m_Seeds)))) { m_ErrorReport.push_back(loc); }
}
return b;
@ -633,11 +633,11 @@ eRenderStatus RendererCL<T>::GaussianDensityFilter()
/// <summary>
/// Run final accumulation.
/// If pixels is NULL, the output will remain in the OpenCL 2D image.
/// However, if pixels is not NULL, the output will be copied. This is
/// If pixels is nullptr, the output will remain in the OpenCL 2D image.
/// However, if pixels is not nullptr, the output will be copied. This is
/// useful when rendering in OpenCL, but saving the output to a file.
/// </summary>
/// <param name="pixels">The pixels to copy the final image to if not NULL</param>
/// <param name="pixels">The pixels to copy the final image to if not nullptr</param>
/// <param name="finalOffset">Offset in the buffer to store the pixels to</param>
/// <returns>True if success and not aborted, else false.</returns>
template <typename T>
@ -645,7 +645,7 @@ eRenderStatus RendererCL<T>::AccumulatorToFinalImage(byte* pixels, size_t finalO
{
eRenderStatus status = RunFinalAccum();
if (status == RENDER_OK && pixels != NULL && !m_Wrapper.Shared())
if (status == RENDER_OK && pixels != nullptr && !m_Wrapper.Shared())
{
pixels += finalOffset;
@ -769,10 +769,10 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
uint fuse, argIndex;
uint iterCountPerKernel = IterCountPerKernel();
uint iterCountPerBlock = IterCountPerBlock();
uint supersize = (uint)SuperSize();
uint supersize = uint(SuperSize());
int kernelIndex = m_Wrapper.FindKernelIndex(m_IterOpenCLKernelCreator.IterEntryPoint());
size_t fuseFreq = Renderer<T, T>::SubBatchSize() / m_IterCountPerKernel;//Use the base sbs to determine when to fuse.
size_t itersRemaining, localIterCount = 0;
size_t itersRemaining;
double percent, etaMs;
const char* loc = __FUNCTION__;
@ -786,10 +786,10 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
ConvertEmber(m_Ember, m_EmberCL, m_XformsCL);
m_CarToRasCL = ConvertCarToRas(*CoordMap());
if (b && !(b = m_Wrapper.WriteBuffer (m_EmberBufferName, (void*)&m_EmberCL, sizeof(m_EmberCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.WriteBuffer (m_XformsBufferName, (void*)m_XformsCL.data(), sizeof(m_XformsCL[0]) * m_XformsCL.size()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DistBufferName, (void*)XformDistributions(), XformDistributionsSize()))) { m_ErrorReport.push_back(loc); }//Will be resized for xaos.
if (b && !(b = m_Wrapper.WriteBuffer (m_CarToRasBufferName, (void*)&m_CarToRasCL, sizeof(m_CarToRasCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.WriteBuffer (m_EmberBufferName, reinterpret_cast<void*>(&m_EmberCL), sizeof(m_EmberCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.WriteBuffer (m_XformsBufferName, reinterpret_cast<void*>(m_XformsCL.data()), sizeof(m_XformsCL[0]) * m_XformsCL.size()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DistBufferName, reinterpret_cast<void*>(const_cast<byte*>(XformDistributions())), XformDistributionsSize()))) { m_ErrorReport.push_back(loc); }//Will be resized for xaos.
if (b && !(b = m_Wrapper.WriteBuffer (m_CarToRasBufferName, reinterpret_cast<void*>(&m_CarToRasCL), sizeof(m_CarToRasCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteImage("Palette", CL_MEM_READ_ONLY, m_PaletteFormat, m_DmapCL.m_Entries.size(), 1, 0, m_DmapCL.m_Entries.data()))) { m_ErrorReport.push_back(loc); }
@ -805,19 +805,19 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
#else
//fuse = 100;
//fuse = ((m_Calls % fuseFreq) == 0 ? (EarlyClip() ? 100u : 15u) : 0u);
fuse = (uint)((m_Calls % fuseFreq) == 0u ? FuseCount() : 0u);
fuse = uint((m_Calls % fuseFreq) == 0u ? FuseCount() : 0u);
//fuse = ((m_Calls % 4) == 0 ? 100u : 0u);
#endif
itersRemaining = iterCount - itersRan;
uint gridW = (uint)min(ceil((double)itersRemaining / (double)iterCountPerBlock), (double)IterGridBlockWidth());
uint gridH = (uint)min(ceil((double)itersRemaining / ((double)gridW * iterCountPerBlock)), (double)IterGridBlockHeight());
uint gridW = uint(min(ceil(double(itersRemaining) / double(iterCountPerBlock)), double(IterGridBlockWidth())));
uint gridH = uint(min(ceil(double(itersRemaining) / double(gridW * iterCountPerBlock)), double(IterGridBlockHeight())));
uint iterCountThisLaunch = iterCountPerBlock * gridW * gridH;
//Similar to what's done in the base class.
//The number of iters per thread must be adjusted if they've requested less iters than is normally ran in a block (256 * 256).
if (iterCountThisLaunch > iterCount)
{
iterCountPerKernel = (uint)ceil((double)iterCount / (double)(gridW * gridH * IterBlockKernelCount()));
iterCountPerKernel = uint(ceil(double(iterCount) / double(gridW * gridH * IterBlockKernelCount())));
iterCountThisLaunch = iterCountPerKernel * (gridW * gridH * IterBlockKernelCount());
}
@ -861,7 +861,7 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
(
double(m_LastIter + itersRan) / double(ItersPerTemporalSample())
) + temporalSample
) / (double)TemporalSamples()
) / double(TemporalSamples())
);
double percentDiff = percent - m_LastIterPercent;
@ -901,7 +901,6 @@ eRenderStatus RendererCL<T>::RunLogScaleFilter()
bool b = true;
int kernelIndex = m_Wrapper.FindKernelIndex(m_DEOpenCLKernelCreator.LogScaleAssignDEEntryPoint());
const char* loc = __FUNCTION__;
eRenderStatus status = RENDER_OK;
if (kernelIndex != -1)
{
@ -914,7 +913,7 @@ eRenderStatus RendererCL<T>::RunLogScaleFilter()
OpenCLWrapper::MakeEvenGridDims(blockW, blockH, gridW, gridH);
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEFilterParamsBufferName, (void*)&m_DensityFilterCL, sizeof(m_DensityFilterCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEFilterParamsBufferName, reinterpret_cast<void*>(&m_DensityFilterCL), sizeof(m_DensityFilterCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.SetBufferArg(kernelIndex, argIndex++, m_HistBufferName))) { m_ErrorReport.push_back(loc); }//Histogram.
if (b && !(b = m_Wrapper.SetBufferArg(kernelIndex, argIndex++, m_AccumBufferName))) { m_ErrorReport.push_back(loc); }//Accumulator.
@ -977,13 +976,13 @@ eRenderStatus RendererCL<T>::RunDensityFilter()
//that are far enough apart such that their filters do not overlap.
//Do the latter.
//Gap is in terms of blocks. How many blocks must separate two blocks running at the same time.
uint gapW = (uint)ceil((m_DensityFilterCL.m_FilterWidth * 2.0) / (double)blockSizeW);
uint gapW = uint(ceil((m_DensityFilterCL.m_FilterWidth * 2.0) / double(blockSizeW)));
uint chunkSizeW = gapW + 1;
uint gapH = (uint)ceil((m_DensityFilterCL.m_FilterWidth * 2.0) / (double)blockSizeH);
uint gapH = uint(ceil((m_DensityFilterCL.m_FilterWidth * 2.0) / double(blockSizeH)));
uint chunkSizeH = gapH + 1;
double totalChunks = chunkSizeW * chunkSizeH;
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEFilterParamsBufferName, (void*)&m_DensityFilterCL, sizeof(m_DensityFilterCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEFilterParamsBufferName, reinterpret_cast<void*>(&m_DensityFilterCL), sizeof(m_DensityFilterCL)))) { m_ErrorReport.push_back(loc); }
#ifdef ROW_ONLY_DE
blockSizeW = 64;//These *must* both be divisible by 16 or else pixels will go missing.
@ -1079,7 +1078,7 @@ eRenderStatus RendererCL<T>::RunFinalAccum()
//This is needed with or without early clip.
m_SpatialFilterCL = ConvertSpatialFilter();
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SpatialFilterParamsBufferName, (void*)&m_SpatialFilterCL, sizeof(m_SpatialFilterCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_SpatialFilterParamsBufferName, reinterpret_cast<void*>(&m_SpatialFilterCL), sizeof(m_SpatialFilterCL)))) { m_ErrorReport.push_back(loc); }
//Since early clip requires gamma correcting the entire accumulator first,
//it can't be done inside of the normal final accumulation kernel, so
@ -1323,19 +1322,19 @@ DensityFilterCL<T> RendererCL<T>::ConvertDensityFilter()
DensityFilterCL<T> filterCL;
DensityFilter<T>* densityFilter = dynamic_cast<DensityFilter<T>*>(GetDensityFilter());
filterCL.m_Supersample = (uint)Supersample();
filterCL.m_SuperRasW = (uint)SuperRasW();
filterCL.m_SuperRasH = (uint)SuperRasH();
filterCL.m_Supersample = uint(Supersample());
filterCL.m_SuperRasW = uint(SuperRasW());
filterCL.m_SuperRasH = uint(SuperRasH());
filterCL.m_K1 = K1();
filterCL.m_K2 = K2();
if (densityFilter)
{
filterCL.m_Curve = densityFilter->Curve();
filterCL.m_KernelSize = (uint)densityFilter->KernelSize();
filterCL.m_MaxFilterIndex = (uint)densityFilter->MaxFilterIndex();
filterCL.m_MaxFilteredCounts = (uint)densityFilter->MaxFilteredCounts();
filterCL.m_FilterWidth = (uint)densityFilter->FilterWidth();
filterCL.m_KernelSize = uint(densityFilter->KernelSize());
filterCL.m_MaxFilterIndex = uint(densityFilter->MaxFilterIndex());
filterCL.m_MaxFilteredCounts = uint(densityFilter->MaxFilteredCounts());
filterCL.m_FilterWidth = uint(densityFilter->FilterWidth());
}
return filterCL;
@ -1355,17 +1354,17 @@ SpatialFilterCL<T> RendererCL<T>::ConvertSpatialFilter()
this->PrepFinalAccumVals(background, g, linRange, vibrancy);
filterCL.m_SuperRasW = (uint)SuperRasW();
filterCL.m_SuperRasH = (uint)SuperRasH();
filterCL.m_FinalRasW = (uint)FinalRasW();
filterCL.m_FinalRasH = (uint)FinalRasH();
filterCL.m_Supersample = (uint)Supersample();
filterCL.m_FilterWidth = (uint)GetSpatialFilter()->FinalFilterWidth();
filterCL.m_NumChannels = (uint)Renderer<T, T>::NumChannels();
filterCL.m_BytesPerChannel = (uint)BytesPerChannel();
filterCL.m_DensityFilterOffset = (uint)DensityFilterOffset();
filterCL.m_SuperRasW = uint(SuperRasW());
filterCL.m_SuperRasH = uint(SuperRasH());
filterCL.m_FinalRasW = uint(FinalRasW());
filterCL.m_FinalRasH = uint(FinalRasH());
filterCL.m_Supersample = uint(Supersample());
filterCL.m_FilterWidth = uint(GetSpatialFilter()->FinalFilterWidth());
filterCL.m_NumChannels = uint(Renderer<T, T>::NumChannels());
filterCL.m_BytesPerChannel = uint(BytesPerChannel());
filterCL.m_DensityFilterOffset = uint(DensityFilterOffset());
filterCL.m_Transparency = Transparency();
filterCL.m_YAxisUp = (uint)m_YAxisUp;
filterCL.m_YAxisUp = uint(m_YAxisUp);
filterCL.m_Vibrancy = vibrancy;
filterCL.m_HighlightPower = HighlightPower();
filterCL.m_Gamma = g;
@ -1441,7 +1440,7 @@ CarToRasCL<T> RendererCL<T>::ConvertCarToRas(const CarToRas<T>& carToRas)
{
CarToRasCL<T> carToRasCL;
carToRasCL.m_RasWidth = (uint)carToRas.RasWidth();
carToRasCL.m_RasWidth = uint(carToRas.RasWidth());
carToRasCL.m_PixPerImageUnitW = carToRas.PixPerImageUnitW();
carToRasCL.m_RasLlX = carToRas.RasLlX();
carToRasCL.m_PixPerImageUnitH = carToRas.PixPerImageUnitH();

View File

@ -36,7 +36,21 @@ public:
template <typename T>
class EMBERCL_API RendererCL : public Renderer<T, T>, public RendererCLBase
{
using EmberNs::Renderer<T, T>::RendererBase::EmberReport::m_ErrorReport;
using EmberNs::Renderer<T, T>::RendererBase::Abort;
using EmberNs::Renderer<T, T>::RendererBase::EarlyClip;
using EmberNs::Renderer<T, T>::RendererBase::Transparency;
using EmberNs::Renderer<T, T>::RendererBase::EnterResize;
using EmberNs::Renderer<T, T>::RendererBase::LeaveResize;
using EmberNs::Renderer<T, T>::RendererBase::FinalRasW;
using EmberNs::Renderer<T, T>::RendererBase::FinalRasH;
using EmberNs::Renderer<T, T>::RendererBase::SuperRasW;
using EmberNs::Renderer<T, T>::RendererBase::SuperRasH;
using EmberNs::Renderer<T, T>::RendererBase::SuperSize;
using EmberNs::Renderer<T, T>::RendererBase::BytesPerChannel;
using EmberNs::Renderer<T, T>::RendererBase::TemporalSamples;
using EmberNs::Renderer<T, T>::RendererBase::ItersPerTemporalSample;
using EmberNs::Renderer<T, T>::RendererBase::FuseCount;
using EmberNs::Renderer<T, T>::RendererBase::DensityFilterOffset;
using EmberNs::Renderer<T, T>::RendererBase::m_ProgressParameter;
using EmberNs::Renderer<T, T>::RendererBase::m_YAxisUp;
using EmberNs::Renderer<T, T>::RendererBase::m_LockAccum;
@ -50,8 +64,22 @@ using EmberNs::Renderer<T, T>::RendererBase::m_Rand;
using EmberNs::Renderer<T, T>::RendererBase::m_RenderTimer;
using EmberNs::Renderer<T, T>::RendererBase::m_IterTimer;
using EmberNs::Renderer<T, T>::RendererBase::m_ProgressTimer;
using EmberNs::Renderer<T, T>::RendererBase::EmberReport::m_ErrorReport;
using EmberNs::Renderer<T, T>::m_RotMat;
using EmberNs::Renderer<T, T>::m_Ember;
using EmberNs::Renderer<T, T>::CenterX;
using EmberNs::Renderer<T, T>::CenterY;
using EmberNs::Renderer<T, T>::K1;
using EmberNs::Renderer<T, T>::K2;
using EmberNs::Renderer<T, T>::Supersample;
using EmberNs::Renderer<T, T>::HighlightPower;
using EmberNs::Renderer<T, T>::HistBuckets;
using EmberNs::Renderer<T, T>::AccumulatorBuckets;
using EmberNs::Renderer<T, T>::GetDensityFilter;
using EmberNs::Renderer<T, T>::GetSpatialFilter;
using EmberNs::Renderer<T, T>::CoordMap;
using EmberNs::Renderer<T, T>::XformDistributions;
using EmberNs::Renderer<T, T>::XformDistributionsSize;
public:
RendererCL(uint platform = 0, uint device = 0, bool shared = false, GLuint outputTexID = 0);

View File

@ -161,7 +161,7 @@ static uint CalcStrips(double memRequired, double memAvailable, double useMem)
if (memAvailable >= memRequired)
return 1;
strips = (uint)ceil(memRequired / memAvailable);
strips = uint(ceil(memRequired / memAvailable));
return strips;
}
@ -290,7 +290,7 @@ static bool StripsRender(RendererBase* renderer, Ember<T>& ember, vector<byte>&
vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>> randVec;
ember.m_Quality *= strips;
ember.m_FinalRasH = (size_t)ceil(floatStripH);
ember.m_FinalRasH = size_t(ceil(floatStripH));
if (strips > 1)
randVec = renderer->RandVec();
@ -298,7 +298,7 @@ static bool StripsRender(RendererBase* renderer, Ember<T>& ember, vector<byte>&
for (size_t strip = 0; strip < strips; strip++)
{
size_t stripOffset;
if (yAxisUp)
stripOffset = ember.m_FinalRasH * ((strips - strip) - 1) * renderer->FinalRowSize();
else
@ -346,7 +346,7 @@ static bool StripsRender(RendererBase* renderer, Ember<T>& ember, vector<byte>&
allStripsFinished(ember);
}
}
Memset(finalImage);
return success;
@ -370,7 +370,7 @@ static size_t VerifyStrips(size_t height, size_t strips,
{
os << "A strips value of " << strips << " does not divide evenly into a height of " << height << ".";
stripError2(os.str()); os.str("");
strips = NextHighestEvenDiv(height, strips);
if (strips == 1)//No higher divisor, check for a lower one.

View File

@ -159,12 +159,12 @@ public:
EmberOptionEntry(eOptionUse optUsage, eOptionIDs optId, const CharT* arg, T defaultVal, ESOArgType argType, string docString)
{
m_OptionUse = optUsage;
m_Option.nId = (int)optId;
m_Option.nId = int(optId);
m_Option.pszArg = arg;
m_Option.nArgType = argType;
m_DocString = docString;
m_NameWithoutDashes = Trim(string(arg), '-');
m_Val = Arg<T>((char*)m_NameWithoutDashes.c_str(), defaultVal);
m_Val = Arg<T>(const_cast<char*>(m_NameWithoutDashes.c_str()), defaultVal);
}
/// <summary>

View File

@ -70,8 +70,8 @@ static bool WriteJpeg(const char* filename, byte* image, size_t width, size_t he
jpeg_stdio_dest(&info, file);
info.in_color_space = JCS_RGB;
info.input_components = 3;
info.image_width = (JDIMENSION)width;
info.image_height = (JDIMENSION)height;
info.image_width = JDIMENSION(width);
info.image_height = JDIMENSION(height);
jpeg_set_defaults(&info);
jpeg_set_quality(&info, quality, TRUE);
jpeg_start_compress(&info, TRUE);
@ -79,36 +79,36 @@ static bool WriteJpeg(const char* filename, byte* image, size_t width, size_t he
//Write comments to jpeg.
if (enableComments)
{
jpeg_write_marker(&info, JPEG_COM, (byte*)verString, (int)strlen(verString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(verString), strlen(verString));
if (nick != "")
{
snprintf_s(nickString, 64, "flam3_nickname: %s", nick.c_str());
jpeg_write_marker(&info, JPEG_COM, (byte*)nickString, (int)strlen(nickString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(nickString), strlen(nickString));
}
if (url != "")
{
snprintf_s(urlString, 128, "flam3_url: %s", url.c_str());
jpeg_write_marker(&info, JPEG_COM, (byte*)urlString, (int)strlen(urlString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(urlString), strlen(urlString));
}
if (id != "")
{
snprintf_s(idString, 128, "flam3_id: %s", id.c_str());
jpeg_write_marker(&info, JPEG_COM, (byte*)idString, (int)strlen(idString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(idString), strlen(idString));
}
jpeg_write_marker(&info, JPEG_COM, (byte*)bvString, (int)strlen(bvString));
jpeg_write_marker(&info, JPEG_COM, (byte*)niString, (int)strlen(niString));
jpeg_write_marker(&info, JPEG_COM, (byte*)rtString, (int)strlen(rtString));
jpeg_write_marker(&info, JPEG_COM, (byte*)genomeString, (int)strlen(genomeString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(bvString), strlen(bvString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(niString), strlen(niString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(rtString), strlen(rtString));
jpeg_write_marker(&info, JPEG_COM, reinterpret_cast<byte*>(genomeString), strlen(genomeString));
}
for (i = 0; i < height; i++)
{
JSAMPROW row_pointer[1];
row_pointer[0] = (byte*)image + (3 * width * i);
row_pointer[0] = reinterpret_cast<byte*>(image) + (3 * width * i);
jpeg_write_scanlines(&info, row_pointer, 1);
}
@ -150,39 +150,39 @@ static bool WritePng(const char* filename, byte* image, size_t width, size_t hei
vector<byte*> rows(height);
text[0].compression = PNG_TEXT_COMPRESSION_NONE;
text[0].key = (png_charp)"flam3_version";
text[0].text = (png_charp)EmberVersion();
text[0].key = const_cast<png_charp>("flam3_version");
text[0].text = const_cast<png_charp>(EmberVersion());
text[1].compression = PNG_TEXT_COMPRESSION_NONE;
text[1].key = (png_charp)"flam3_nickname";
text[1].text = (png_charp)nick.c_str();
text[1].key = const_cast<png_charp>("flam3_nickname");
text[1].text = const_cast<png_charp>(nick.c_str());
text[2].compression = PNG_TEXT_COMPRESSION_NONE;
text[2].key = (png_charp)"flam3_url";
text[2].text = (png_charp)url.c_str();
text[2].key = const_cast<png_charp>("flam3_url");
text[2].text = const_cast<png_charp>(url.c_str());
text[3].compression = PNG_TEXT_COMPRESSION_NONE;
text[3].key = (png_charp)"flam3_id";
text[3].text = (png_charp)id.c_str();
text[3].key = const_cast<png_charp>("flam3_id");
text[3].text = const_cast<png_charp>(id.c_str());
text[4].compression = PNG_TEXT_COMPRESSION_NONE;
text[4].key = (png_charp)"flam3_error_rate";
text[4].text = (png_charp)comments.m_Badvals.c_str();
text[4].key = const_cast<png_charp>("flam3_error_rate");
text[4].text = const_cast<png_charp>(comments.m_Badvals.c_str());
text[5].compression = PNG_TEXT_COMPRESSION_NONE;
text[5].key = (png_charp)"flam3_samples";
text[5].text = (png_charp)comments.m_NumIters.c_str();
text[5].key = const_cast<png_charp>("flam3_samples");
text[5].text = const_cast<png_charp>(comments.m_NumIters.c_str());
text[6].compression = PNG_TEXT_COMPRESSION_NONE;
text[6].key = (png_charp)"flam3_time";
text[6].text = (png_charp)comments.m_Runtime.c_str();
text[6].key = const_cast<png_charp>("flam3_time");
text[6].text = const_cast<png_charp>(comments.m_Runtime.c_str());
text[7].compression = PNG_TEXT_COMPRESSION_zTXt;
text[7].key = (png_charp)"flam3_genome";
text[7].text = (png_charp)comments.m_Genome.c_str();
text[7].key = const_cast<png_charp>("flam3_genome");
text[7].text = const_cast<png_charp>(comments.m_Genome.c_str());
for (i = 0; i < height; i++)
rows[i] = (byte*)image + i * width * 4 * bytesPerChannel;
rows[i] = image + i * width * 4 * bytesPerChannel;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
info_ptr = png_create_info_struct(png_ptr);
@ -197,7 +197,7 @@ static bool WritePng(const char* filename, byte* image, size_t width, size_t hei
png_init_io(png_ptr, file);
png_set_IHDR(png_ptr, info_ptr, (png_uint_32)width, (png_uint_32)height, 8 * (png_uint_32)bytesPerChannel,
png_set_IHDR(png_ptr, info_ptr, png_uint_32(width), png_uint_32(height), 8 * png_uint_32(bytesPerChannel),
PNG_COLOR_TYPE_RGBA,
PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE,
@ -214,7 +214,7 @@ static bool WritePng(const char* filename, byte* image, size_t width, size_t hei
png_set_swap(png_ptr);
}
png_write_image(png_ptr, (png_bytepp) rows.data());
png_write_image(png_ptr, const_cast<png_bytepp>(rows.data()));
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(file);

View File

@ -214,7 +214,7 @@ class SimpleGlobUtil
{
public:
static const char * strchr(const char *s, char c) {
return (char *) sg_strchr((const SOCHAR_T *)s, c);
return sg_strchr(reinterpret_cast<const SOCHAR_T *>(s), c);
}
static const wchar_t * strchr(const wchar_t *s, wchar_t c) {
return ::wcschr(s, c);
@ -226,7 +226,7 @@ public:
#endif
static const char * strrchr(const char *s, char c) {
return (char *) sg_strrchr((const SOCHAR_T *)s, c);
return sg_strrchr(reinterpret_cast<const SOCHAR_T *>(s), c);
}
static const wchar_t * strrchr(const wchar_t *s, wchar_t c) {
return ::wcsrchr(s, c);
@ -246,7 +246,7 @@ public:
static void strcpy_s(char *dst, size_t n, const char *src) {
(void) n;
sg_strcpy_s((SOCHAR_T *)dst, n, (const SOCHAR_T *)src);
sg_strcpy_s(reinterpret_cast<SOCHAR_T *>(dst), n, reinterpret_cast<const SOCHAR_T *>(src));
}
static void strcpy_s(wchar_t *dst, size_t n, const wchar_t *src) {
# if __STDC_WANT_SECURE_LIB__
@ -263,7 +263,7 @@ public:
#endif
static int strcmp(const char *s1, const char *s2) {
return sg_strcmp((const SOCHAR_T *)s1, (const SOCHAR_T *)s2);
return sg_strcmp(reinterpret_cast<const SOCHAR_T *>(s1), reinterpret_cast<const SOCHAR_T *>(s2));
}
static int strcmp(const wchar_t *s1, const wchar_t *s2) {
return ::wcscmp(s1, s2);
@ -275,7 +275,7 @@ public:
#endif
static int strcasecmp(const char *s1, const char *s2) {
return sg_strcasecmp((const SOCHAR_T *)s1, (const SOCHAR_T *)s2);
return sg_strcasecmp(reinterpret_cast<const SOCHAR_T *>(s1), reinterpret_cast<const SOCHAR_T *>(s2));
}
#if _WIN32
static int strcasecmp(const wchar_t *s1, const wchar_t *s2) {
@ -389,7 +389,7 @@ struct SimpleGlobBase
{
SimpleGlobBase() {
memset(&m_glob, 0, sizeof(m_glob));
m_uiCurr = (size_t)-1;
m_uiCurr = size_t(-1);
}
~SimpleGlobBase() {
@ -446,11 +446,11 @@ struct SimpleGlobBase
void FindDone() {
globfree(&m_glob);
memset(&m_glob, 0, sizeof(m_glob));
m_uiCurr = (size_t)-1;
m_uiCurr = size_t(-1);
}
const char * GetFileNameS(char) const {
SG_ASSERT(m_uiCurr != (size_t)-1);
SG_ASSERT(m_uiCurr != size_t(-1));
return m_glob.gl_pathv[m_uiCurr];
}
@ -467,7 +467,7 @@ struct SimpleGlobBase
#endif
bool IsDirS(char) const {
SG_ASSERT(m_uiCurr != (size_t)-1);
SG_ASSERT(m_uiCurr != size_t(-1));
return m_bIsDir;
}
@ -747,8 +747,8 @@ CSimpleGlobTempl<SOCHAR>::Add(
int nError, nStartLen = m_nArgsLen;
bool bSuccess;
do {
nError = AppendName(this->GetFileNameS((SOCHAR)0), this->IsDirS((SOCHAR)0));
bSuccess = this->FindNextFileS((SOCHAR)0);
nError = AppendName(this->GetFileNameS(SOCHAR(0)), this->IsDirS(SOCHAR(0)));
bSuccess = this->FindNextFileS(SOCHAR(0));
}
while (nError == SG_SUCCESS && bSuccess);
SimpleGlobBase<SOCHAR>::FindDone();
@ -829,7 +829,7 @@ CSimpleGlobTempl<SOCHAR>::AppendName(
}
// add this entry. m_uiBufferLen is offset from beginning of buffer.
m_rgpArgs[m_nArgsLen++] = (SOCHAR*)m_uiBufferLen;
m_rgpArgs[m_nArgsLen++] = reinterpret_cast<SOCHAR*>(m_uiBufferLen);
SimpleGlobUtil::strcpy_s(m_pBuffer + m_uiBufferLen,
m_uiBufferSize - m_uiBufferLen, m_szPathPrefix);
SimpleGlobUtil::strcpy_s(m_pBuffer + m_uiBufferLen + uiPrefixLen,
@ -856,8 +856,8 @@ CSimpleGlobTempl<SOCHAR>::SetArgvArrayType(
if (a_nNewType == POINTERS) {
SG_ASSERT(m_nArgArrayType == OFFSETS);
for (int n = 0; n < m_nArgsLen; ++n) {
m_rgpArgs[n] = (m_rgpArgs[n] == (SOCHAR*)-1) ?
nullptr : m_pBuffer + (size_t) m_rgpArgs[n];
m_rgpArgs[n] = (m_rgpArgs[n] == reinterpret_cast<SOCHAR*>(-1)) ?
nullptr : m_pBuffer + size_t(m_rgpArgs[n]);
}
}
else {
@ -865,7 +865,7 @@ CSimpleGlobTempl<SOCHAR>::SetArgvArrayType(
SG_ASSERT(m_nArgArrayType == POINTERS);
for (int n = 0; n < m_nArgsLen; ++n) {
m_rgpArgs[n] = (m_rgpArgs[n] == nullptr) ?
(SOCHAR*) -1 : (SOCHAR*) (m_rgpArgs[n] - m_pBuffer);
reinterpret_cast<SOCHAR*>(-1) : reinterpret_cast<SOCHAR*>(m_rgpArgs[n] - m_pBuffer);
}
}
m_nArgArrayType = a_nNewType;
@ -887,7 +887,7 @@ CSimpleGlobTempl<SOCHAR>::GrowArgvArray(
void * pNewBuffer = realloc(m_rgpArgs, nNewSize * sizeof(SOCHAR*));
if (!pNewBuffer) return false;
m_nArgsSize = nNewSize;
m_rgpArgs = (SOCHAR**) pNewBuffer;
m_rgpArgs = reinterpret_cast<SOCHAR**>(pNewBuffer);
}
return true;
}
@ -908,7 +908,7 @@ CSimpleGlobTempl<SOCHAR>::GrowStringBuffer(
void * pNewBuffer = realloc(m_pBuffer, uiNewSize * sizeof(SOCHAR));
if (!pNewBuffer) return false;
m_uiBufferSize = uiNewSize;
m_pBuffer = (SOCHAR*) pNewBuffer;
m_pBuffer = reinterpret_cast<SOCHAR*>(pNewBuffer);
}
return true;
}
@ -920,8 +920,8 @@ CSimpleGlobTempl<SOCHAR>::fileSortCompare(
const void *a2
)
{
const SOCHAR * s1 = *(const SOCHAR **)a1;
const SOCHAR * s2 = *(const SOCHAR **)a2;
const SOCHAR * s1 = *(reinterpret_cast<const SOCHAR **>(a1));
const SOCHAR * s2 = *(reinterpret_cast<const SOCHAR **>(a2));
if (s1 && s2) {
return SimpleGlobUtil::strcasecmp(s1, s2);
}

View File

@ -522,7 +522,7 @@ private:
// Find the '=' character within a string.
inline SOCHAR * FindEquals(SOCHAR *s) const {
while (*s && *s != (SOCHAR)'=') ++s;
while (*s && *s != SOCHAR('=')) ++s;
return *s ? s : nullptr;
}
bool IsEqual(SOCHAR a_cLeft, SOCHAR a_cRight, int a_nArgType) const;
@ -576,8 +576,8 @@ CSimpleOptTempl<SOCHAR>::Init(
m_pszOptionText = nullptr;
m_pszOptionArg = nullptr;
m_nNextOption = (a_nFlags & SO_O_USEALL) ? 0 : 1;
m_szShort[0] = (SOCHAR)'-';
m_szShort[2] = (SOCHAR)'\0';
m_szShort[0] = SOCHAR('-');
m_szShort[2] = SOCHAR('\0');
m_nFlags = a_nFlags;
m_pszClump = nullptr;
@ -592,7 +592,7 @@ CSimpleOptTempl<SOCHAR>::Init(
free(m_rgShuffleBuf);
}
if (m_argc > SO_STATICBUF) {
m_rgShuffleBuf = (SOCHAR**) malloc(sizeof(SOCHAR*) * m_argc);
m_rgShuffleBuf = reinterpret_cast<SOCHAR**>(malloc(sizeof(SOCHAR*) * m_argc));
if (!m_rgShuffleBuf) {
return false;
}
@ -646,11 +646,11 @@ CSimpleOptTempl<SOCHAR>::Next()
// find this option in the options table
cFirst = PrepareArg(pszArg);
if (pszArg[0] == (SOCHAR)'-') {
if (pszArg[0] == SOCHAR('-')) {
// find any combined argument string and remove equals sign
m_pszOptionArg = FindEquals(pszArg);
if (m_pszOptionArg) {
*m_pszOptionArg++ = (SOCHAR)'\0';
*m_pszOptionArg++ = SOCHAR('\0');
}
}
nTableIdx = LookupOption(pszArg);
@ -659,9 +659,9 @@ CSimpleOptTempl<SOCHAR>::Next()
// option then we try the alternative forms
if (nTableIdx < 0
&& !m_pszOptionArg
&& pszArg[0] == (SOCHAR)'-'
&& pszArg[0] == SOCHAR('-')
&& pszArg[1]
&& pszArg[1] != (SOCHAR)'-'
&& pszArg[1] != SOCHAR('-')
&& pszArg[2])
{
// test for a short-form with argument if appropriate
@ -694,7 +694,7 @@ CSimpleOptTempl<SOCHAR>::Next()
// and we are not suppressing errors for invalid options then it
// is reported as an error, otherwise it is data.
if (nTableIdx < 0) {
if (!HasFlag(SO_O_NOERR) && pszArg[0] == (SOCHAR)'-') {
if (!HasFlag(SO_O_NOERR) && pszArg[0] == SOCHAR('-')) {
m_pszOptionText = pszArg;
break;
}
@ -702,7 +702,7 @@ CSimpleOptTempl<SOCHAR>::Next()
pszArg[0] = cFirst;
++nOptIdx;
if (m_pszOptionArg) {
*(--m_pszOptionArg) = (SOCHAR)'=';
*(--m_pszOptionArg) = SOCHAR('=');
}
}
}
@ -719,7 +719,7 @@ CSimpleOptTempl<SOCHAR>::Next()
// get the option id
ESOArgType nArgType = SO_NONE;
if (nTableIdx < 0) {
m_nLastError = (ESOError) nTableIdx; // error code
m_nLastError = ESOError(nTableIdx); // error code
}
else {
m_nOptionId = m_rgOptions[nTableIdx].nId;
@ -836,7 +836,7 @@ CSimpleOptTempl<SOCHAR>::NextClumped()
// unknown option
if (nTableIdx < 0) {
m_pszOptionText = m_szShort; // invalid option
m_nLastError = (ESOError) nTableIdx; // error code
m_nLastError = ESOError(nTableIdx); // error code
return false;
}
@ -951,11 +951,11 @@ CSimpleOptTempl<SOCHAR>::CalcMatch(
}
// match and skip leading hyphens
while (*a_pszSource == (SOCHAR)'-' && *a_pszSource == *a_pszTest) {
while (*a_pszSource == SOCHAR('-') && *a_pszSource == *a_pszTest) {
++a_pszSource;
++a_pszTest;
}
if (*a_pszSource == (SOCHAR)'-' || *a_pszTest == (SOCHAR)'-') {
if (*a_pszSource == SOCHAR('-') || *a_pszTest == SOCHAR('-')) {
return 0;
}
@ -1027,7 +1027,7 @@ CSimpleOptTempl<SOCHAR>::MultiArg(
if (!HasFlag(SO_O_NOERR)) {
for (int n = 0; n < a_nCount; ++n) {
SOCHAR ch = PrepareArg(rgpszArg[n]);
if (rgpszArg[n][0] == (SOCHAR)'-') {
if (rgpszArg[n][0] == SOCHAR('-')) {
rgpszArg[n][0] = ch;
m_nLastError = SO_ARG_INVALID_DATA;
return nullptr;

View File

@ -169,10 +169,10 @@ bool EmberGenome(EmberOptions& opt)
while (std::getline(iss, token, ','))
{
if (parser.Atoi((char*)token.c_str(), val))
if (parser.Atoi(token.c_str(), val))
{
if (val < varList.Size())
vars.push_back((eVariationId)val);
vars.push_back(static_cast<eVariationId>(val));
}
}
}
@ -182,10 +182,10 @@ bool EmberGenome(EmberOptions& opt)
while (std::getline(iss, token, ','))
{
if (parser.Atoi((char*)token.c_str(), val))
if (parser.Atoi(token.c_str(), val))
{
if (val < varList.Size())
noVars.push_back((eVariationId)val);
noVars.push_back(static_cast<eVariationId>(val));
}
}
@ -291,7 +291,7 @@ bool EmberGenome(EmberOptions& opt)
if (pTemplate)
tools.ApplyTemplate(embers[i], *pTemplate);
tools.Offset(embers[i], (T)opt.OffsetX(), (T)opt.OffsetY());
tools.Offset(embers[i], T(opt.OffsetX()), T(opt.OffsetY()));
cout << emberToXml.ToString(embers[i], opt.Extras(), opt.PrintEditDepth(), !opt.NoEdits(), false, opt.HexPalette());
}
@ -312,8 +312,8 @@ bool EmberGenome(EmberOptions& opt)
embers[i].DeleteMotionElements();
}
firstFrame = (uint)(opt.FirstFrame() == UINT_MAX ? embers[0].m_Time : opt.FirstFrame());
lastFrame = (uint)(opt.LastFrame() == UINT_MAX ? embers.back().m_Time : opt.LastFrame());
firstFrame = uint(opt.FirstFrame() == UINT_MAX ? embers[0].m_Time : opt.FirstFrame());
lastFrame = uint(opt.LastFrame() == UINT_MAX ? embers.back().m_Time : opt.LastFrame());
if (lastFrame < firstFrame)
lastFrame = firstFrame;
@ -326,7 +326,7 @@ bool EmberGenome(EmberOptions& opt)
for (i = 0; i < embers.size(); i++)
{
if (ftime == (uint)embers[i].m_Time)
if (ftime == uint(embers[i].m_Time))
{
interpolated = embers[i];
exactTimeMatch = true;
@ -340,7 +340,7 @@ bool EmberGenome(EmberOptions& opt)
for (i = 0; i < embers.size(); i++)
{
if (ftime == (uint)(embers[i].m_Time - 1))
if (ftime == uint(embers[i].m_Time - 1))
{
exactTimeMatch = true;
break;
@ -383,7 +383,7 @@ bool EmberGenome(EmberOptions& opt)
{
for (frame = 0; frame < opt.Frames(); frame++)
{
blend = (T)frame / (T)opt.Frames();
blend = T(frame) / T(opt.Frames());
tools.Spin(embers[i], pTemplate, result, frameCount++, blend);//Result is cleared and reassigned each time inside of Spin().
cout << emberToXml.ToString(result, opt.Extras(), opt.PrintEditDepth(), !opt.NoEdits(), false, opt.HexPalette());
}
@ -394,7 +394,7 @@ bool EmberGenome(EmberOptions& opt)
for (frame = 0; frame < opt.Frames(); frame++)
{
seqFlag = (frame == 0 || frame == opt.Frames() - 1);
blend = frame / (T)opt.Frames();
blend = frame / T(opt.Frames());
result.Clear();
tools.SpinInter(&embers[i], pTemplate, result, frameCount++, seqFlag, blend);
cout << emberToXml.ToString(result, opt.Extras(), opt.PrintEditDepth(), !opt.NoEdits(), false, opt.HexPalette());
@ -480,7 +480,7 @@ bool EmberGenome(EmberOptions& opt)
oldX = embers[i].m_CenterX;
oldY = embers[i].m_CenterY;
embers[i].m_FinalRasH = (uint)((T)embers[i].m_FinalRasH / (T)opt.Frames());
embers[i].m_FinalRasH = uint(T(embers[i].m_FinalRasH) / T(opt.Frames()));
embers[i].m_CenterY = embers[i].m_CenterY - ((opt.Frames() - 1) * embers[i].m_FinalRasH) /
(2 * embers[i].m_PixelsPerUnit * pow(T(2.0), embers[i].m_Zoom));
@ -764,7 +764,7 @@ int _tmain(int argc, _TCHAR* argv[])
#ifdef WIN32
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
#else
putenv((char*)"GPU_MAX_ALLOC_PERCENT=100");
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
#endif
if (!opt.Populate(argc, argv, OPT_USE_GENOME))

View File

@ -168,8 +168,8 @@ bool EmberRender(EmberOptions& opt)
embers[i].m_TemporalSamples = 1;//Force temporal samples to 1 for render.
embers[i].m_Quality *= T(opt.QualityScale());
embers[i].m_FinalRasW = (uint)((T)embers[i].m_FinalRasW * opt.SizeScale());
embers[i].m_FinalRasH = (uint)((T)embers[i].m_FinalRasH * opt.SizeScale());
embers[i].m_FinalRasW = uint(T(embers[i].m_FinalRasW) * opt.SizeScale());
embers[i].m_FinalRasH = uint(T(embers[i].m_FinalRasH) * opt.SizeScale());
embers[i].m_PixelsPerUnit *= T(opt.SizeScale());
if (embers[i].m_FinalRasW == 0 || embers[i].m_FinalRasH == 0)
@ -180,8 +180,8 @@ bool EmberRender(EmberOptions& opt)
}
//Cast to double in case the value exceeds 2^32.
double imageMem = (double)renderer->NumChannels() * (double)embers[i].m_FinalRasW
* (double)embers[i].m_FinalRasH * (double)renderer->BytesPerChannel();
double imageMem = double(renderer->NumChannels()) * double(embers[i].m_FinalRasW)
* double(embers[i].m_FinalRasH) * double(renderer->BytesPerChannel());
double maxMem = pow(2.0, double((sizeof(void*) * 8) - 1));
if (imageMem > maxMem)//Ensure the max amount of memory for a process is not exceeded.
@ -201,7 +201,7 @@ bool EmberRender(EmberOptions& opt)
}
else
{
strips = CalcStrips((double)renderer->MemoryRequired(1, true), (double)renderer->MemoryAvailable(), opt.UseMem());
strips = CalcStrips(double(renderer->MemoryRequired(1, true)), double(renderer->MemoryAvailable()), opt.UseMem());
if (strips > 1)
VerbosePrint("Setting strips to " << strips << " with specified memory usage of " << opt.UseMem());
@ -268,7 +268,7 @@ bool EmberRender(EmberOptions& opt)
iterCount = renderer->TotalIterCount(1);
comments = renderer->ImageComments(stats, opt.PrintEditDepth(), opt.IntPalette(), opt.HexPalette());
os.str("");
os << comments.m_NumIters << " / " << iterCount << " (" << std::fixed << std::setprecision(2) << (((double)stats.m_Iters / (double)iterCount) * 100) << "%)";
os << comments.m_NumIters << " / " << iterCount << " (" << std::fixed << std::setprecision(2) << ((double(stats.m_Iters) / double(iterCount)) * 100) << "%)";
VerbosePrint("\nIters ran/requested: " + os.str());
VerbosePrint("Bad values: " << stats.m_Badvals);
@ -304,7 +304,7 @@ bool EmberRender(EmberOptions& opt)
});
if (opt.EmberCL() && opt.DumpKernel())
cout << "Iteration kernel: \n" << ((RendererCL<T>*)renderer.get())->IterKernel() << endl;
cout << "Iteration kernel: \n" << reinterpret_cast<RendererCL<T>*>(renderer.get())->IterKernel() << endl;
VerbosePrint("Done.");
}
@ -331,7 +331,7 @@ int _tmain(int argc, _TCHAR* argv[])
#ifdef WIN32
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
#else
putenv((char*)"GPU_MAX_ALLOC_PERCENT=100");
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
#endif
if (!opt.Populate(argc, argv, OPT_USE_RENDER))