# Candera Device

#### Automatic Context Resource Pools

Context resource pools are created automatically, and assigned automatically to Device objects. If all objects attached to a display share a context resource pool, the display is associated to the context resource pool. Otherwise, the display has a null context resource pool. The interface for replacing context resource pools on the display is deprecated. So is the interface for manually creating context resource pools.

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

</div></div></div>#### Layout Rectangle of Effects

[Effect2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_effect2_d.html "Base class for all 2D effects which can be added to a 2D RenderNode.") has an interface to compute the layout rectangle. Layout rectangle is the same as bounding rectangle for non-text effects. For text effects the layout rectangle is given by CursorTextMeasureContext, and bounding rectangle is given by GlyphTextMeasureContext. ActualHight parameter of [TextBrush](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_brush.html "Output alpha only glyph data. A color may be specified, which is applied to the color channels...") has been removed. Text is now always constant aligned. Applications need to compensate for this parameter by moving the pivot of the node by the offset of the bounding rectangle.

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

</div></div></div>#### RenderTarget Auto Clearing

Added auto clear flag (RenderTarget::SetAutoClearEnabled and RenderTarget::IsAutoClearEnabled) to Candera::RenderTarget2D / Candera::RenderTarget3D. This flag, unlike the auto swap, does not alter the clear setting of the Camera/Camera2D, but assures that the RenderTarget is cleared automatically before the first camera renders.

Further changes in detail:

<div class="contents" id="bkmrk-candera%3A%3Acamera2dlis"><div class="contents"><div class="textblock">- [Candera::Camera2DListener](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_camera2_d_listener.html "A Camera2DListener defines hooks that are called before or after a Camera2D is rendered. In order to register a Camera2DListener to a Camera2D simply derive from Camera2DListener and override pure virtual functions with custom code.") has been enhanced by new methods [Candera::Camera2DListener::OnRenderTargetChanged()](http://dev.doc.cgistudio.at/APILINK/group___core2_d.html#gaf6590ca54d3067f7e6061a653a0f21f2) and [Candera::Camera2DListener::OnCameraRenderStrategyChanged()](http://dev.doc.cgistudio.at/APILINK/group___core2_d.html#ga7fd7e7e1813429203692a747434ba7a1).
- [Candera::CameraListener](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_camera_listener.html "A CameraListener defines hooks that are called before or after a Camera is rendered. In order to register a CameraListener to a Camera simply derive from CameraListener and override pure virtual functions with custom code.") has been enhanced by new methods [Candera::CameraListener::OnRenderTargetChanged()](http://dev.doc.cgistudio.at/APILINK/group___core3_d.html#ga1aaf10414b78117d5b911de03c83585b) and [Candera::CameraListener::OnCameraRenderStrategyChanged()](http://dev.doc.cgistudio.at/APILINK/group___core3_d.html#gaaaaea22d60af3f1fcf72d9f121ae9304).
- [ClearMode](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_clear_mode.html "Describes how a viewport is cleared. The color buffer may be cleared using a given color...") is always enabled for [Candera::Camera](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_camera.html "A Camera provides Modelview and Projection matrices. Camera is a Transformable.* The eye point is set...").
- Candera::SharedClearMode and Candera::SharedClearMode2D have been introduced.

<dl class="see"><dt>**See also:**</dt><dd><span style="color: rgb(230, 126, 35);">[Render Buffer Swapping and Clearing](https://doc316en.candera.eu/link/536#bkmrk-render-buffer-swappi)</span></dd></dl>---

</div></div></div>#### Warping Orientation

The orientation of the display to use during warping can be set on the Display.

<div class="contents" id="bkmrk-see-also%3A-display%3A%3As"><div class="contents"><div class="textblock"><dl class="see"><dt>**See also:**</dt><dd>Display::SetWarpOrientation</dd></dl>---

</div></div></div>#### Warping Image Bounds

In previous versions the warped image was not restricted to bitmap image bounds. The function Display::SetWarpImageBounds() has to be invoked before function Display::SetWarpMatrix() is called.

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

</div></div></div>#### GraphicDeviceUnit Name

A name may be attached to a Graphic Device Unit.

<div class="contents" id="bkmrk-see-also%3A-graphicdev"><div class="textblock"><dl class="see"><dt>**See also:**</dt><dd>GraphicDeviceUnit::SetName()</dd></dl></div></div>---