# Candera 3.7

To keep backwards compatibility for any interface change in the public API the old interface has been kept and marked as deprecated. The deprecated interfaces will be removed in future versions. Compiler warnings will be generated when using a deprecated interface through the usage of Candera Macro CANDERA\_DEPRECATED\_3\_7\_0.

# Candera Platform

#### Owner Requirement

OpenGL Offscreen Render Targets (Frame Buffer Objects) are now required to have an owner RenderTarget to ensure that the used EGL context is safe. For this reason RDenderTarget now has the "IsOwnerRequired" function which returns if a parent render target is needed. The concrete RenderTarget implementation needs to implement the function accordingly. If IsOwnerRequired returns true, an Upload of the RenderTarget will only succeed if the owner is set. RenderTarget3D has additionally a protected SetOwner function that classes derived from RenderTarget may call to set their parent render target. This mechanism can of course also be used for non-OpenGL implementations. Widgets and Behaviors need to take care that owners are set correctly.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### GlInclude Header File

From now on, the GlInclude header file only includes Open GL header files if a CGIDEVICE\_OPENGLES\_xx has been defined. E.g. the NullRenderDevice does no longer include them.

<div class="contents" id="bkmrk--0"><div class="contents"><div class="textblock">---

</div></div></div>#### Interface to load / store binary shader programs

Binary [Shader](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_shader.html "The class Shader is an Appearance component representing a graphical processing unit (GPU) program...") Programs or Object can be retrieved from the driver and stored to an arbitrary persistence mechanism (e.g. a file.). This is supported by the RenderDevice and can be used by Device Packages. Therefoe RenderDevice::UploadStoredShaderBinaryProgram and RenderDevice::RetrieveShaderBinaryProgram have been added if the CANDERA\_SHADER\_PROGRAM\_PERSIST\_INTERFACE\_ENABLED flag is defined.

---

# Candera Base

#### Post Processing System

The new [Post Processing System](http://dev.doc.cgistudio.at/APILINK/group___post_processing_system.html) provides an interface to the user to implement their own post processing effects. Such effects are attached to cameras and get callbacks from the system every time the corresponding camera has finished rendering its scene. The effect then processes the camera's render target, and the system routes the render target automatically through the stack of effects.

For ease of use, post processing effects can also be scripted using Lua.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Math numeric stabilization

Standard rotation values like 0, 90, 180, 270 degree should result in stable matrix values. But, due to the calculation of the rotation matrix values the resulting rotated position values have been quite unstable. Therefore, these values are handled separately. Including an optimized handling of rotation value 0 (which no longer leads to sine and cosine calculations). The [Math](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_math.html "The Math class for mathematical helper functions and defined constants.") interface of [Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]") has been extended by NormalizeDegree and DegreeSineAndCosine to implement this optimization.

<div class="contents" id="bkmrk--0"><div class="contents"><div class="textblock">---

</div></div></div>#### Candera::WidgetBase::SetStringId with disposer deprecated

The SetStringId interface with a disposer function of [WidgetBase](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_widget_base.html "Abstract base class for Candera Widgets.") has been deprecated due to optimization of the the StringId memory consumption.

<div class="contents" id="bkmrk--1"><div class="contents"><div class="textblock">---

</div></div></div>#### Touch event extended

Due to extension in the controls the touch event has been extended by a camera. For details please take a look into controls change log. Beside the additional camera parameter of the touch event the GraphicDeviceUnit interface has been extended by a GetSourceId method to enable an improved sorting of touchable behaviours in the controls.

<div class="contents" id="bkmrk--2"><div class="contents"><div class="textblock">---

</div></div></div>#### Glyph Atlas Outline

The glyph atlas has been extended to support glyph outlines.

<div class="contents" id="bkmrk--3"><div class="contents"><div class="textblock">---

</div></div></div>#### ThreadedAssetProviderDispatched Outline

Class ThreadedAssetProviderDispatched was updated to offer access the worker thread. This allows to set the worker thread priority.

---

# Candera Engine 2D

#### Renderer 2D Statistics

Candera's 2D renderer statistics have been extended to keep statistics about uploaded bitmap images, and render camera calls.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Asset References

A scene can now reference assets that are not referenced by scene graph objects, and upload/unload them whenever the scene is uploaded/unloaded.

---

# Candera Engine 3D

#### Renderer 3D Statistics

Candera's 3D renderer statistics now keep statistics about vertex buffers, shaders, cubemaps, direct textures, render camera calls, and render state cache hit/miss rates (if enabled).

The renderer statistics overlay has also been extended to support the new values.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Canvas Text Outline

The canvas text has been extended to support outlines.

<div class="contents" id="bkmrk--0"><div class="contents"><div class="textblock">---

</div></div></div>#### Texel Size Auto Uniform

New auto uniforms have been added, called "u\_TexelSize", "u\_TexelSize1", .. "u\_TexelSize8", which pass a vec2(1.0/(textureWidth\*4), 1.0/(textureHeight\*4)) to the uniform corresponding with the texture at the given unit. The only purpose for this is to support the outline reference shader.

<div class="contents" id="bkmrk--1"><div class="contents"><div class="textblock">---

</div></div></div>#### Asset References

A scene can now reference assets that are not referenced by scene graph objects, and upload/unload them whenever the scene is uploaded/unloaded.

<div class="contents" id="bkmrk--2"><div class="contents"><div class="textblock">---

</div></div></div>#### Renderer Functions

New functions were introduced in the [Renderer](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_renderer.html "The class Renderer represents the unique Candera render interface to the application. Each render call an base of Candera shall be triggered via the Renderer interface.") to support implementation of post processing effects. Render targets can now be retrieved from the [Renderer](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_renderer.html "The class Renderer represents the unique Candera render interface to the application. Each render call an base of Candera shall be triggered via the Renderer interface.") for temporary use, while a Blit function provides a convenient way to apply a shader to a full screen quad.

---

# Candera Transitions

#### Transition reverse improvements

Optimizations on the transition reverse algorithm were done. Reverting an already reversing transition is possible now.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Transition requests

A [Candera::Transitions::Request::End()](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transitions_1_1_request.html#aaef5c1b838b7187b9818eb9743cbc714) might now return a null pointer depending on whether the request was filled with content or not. The framework changed so that it uses lazy object creation now to minimize memory operations.

---

# Text engine

http://dev.doc.cgistudio.at/APILINK/class\_

# Candera Scripting

#### Lua Post Processing Scripts

The post processing system has also been integrated into the Lua script system. [Candera Lua Post Processing](http://dev.doc.cgistudio.at/APILINK/group___lua_post_processing.html) offers an easy way to create post processing effects directly in [Scene](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_scene.html "The class Scene represents a top level scene graph node. Multiple Scenes are allowed. A Scene can not be part of any other Scene. To render a Scene, at least one Camera must be part of this Scene and the Camera must have rendering enabled. A Scene can have more than one Camera. Note: Lights added to a Scene apply for that Scene only and do not affect 3D objects in any other Scene.") Composer using Lua.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Lua Bindings

Candera's Lua bindings have been extended with various functions to facilitate development of post processing effects.

---

# Candera System

#### Component Handle

The ComponentHandle class from the entity component system has been refactored to use FeatStd's GenericHandle.

---