# Minimize Render State Changes

Minimize render state changes within a single frame. A render state change often comes with a performance penalty, as a render state change can require complete rendering pipeline to be flushed.

Following subchapters explain how render state settings and changes can be minimized when using [Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]").

#### <a class="anchor" id="bkmrk-"></a>Enable Candera Render State Caching

Enabling this [Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]") feature in the CMake build system configuration means that redundant render state settings are not propagated to graphic device driver.  
Another benefit is that render state queries are not processed by graphic device driver, either.

#### <a class="anchor" id="bkmrk--0"></a>Render Objects with same Rendering State

Render objects together that use the same rendering state, e.g.:

<div class="contents" id="bkmrk-objects-using-the-sa"><div class="contents"><div class="textblock">- Objects using the same texture (avoids flushing the texture cache)
- Objects using the same shader program (avoids changing shader programs)
- Objects using similar render modes

</div></div></div>Use the [Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]") render order concept to take influence on the sequence of render operations according to custom criteria. For further details refer to <span style="color: rgb(230, 126, 35);">[Tutorials](https://doc316en.candera.eu/books/candera)</span> CGI Studio Application Development Tutorial

#### <a class="anchor" id="bkmrk--1"></a>Scoping

If using scopes, scene graph nodes can form conceptual groups independent of the scene graph hierarchy, according to arbitrary