Added image renderer clip space culling
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-algorithms.cpp
index 3c1cce6..e18e9e2 100644 (file)
@@ -47,13 +47,15 @@ namespace Render
  * @param[in] frameTime The elapsed time between the last two updates.
  * @param[in] viewMatrix The view matrix from the appropriate camera.
  * @param[in] projectionMatrix The projection matrix from the appropriate camera.
+ * @param[in] cullMode True if the renderers should be subjected to clipspace culling
  */
 inline void ProcessRenderList( const RenderList& renderList,
                                Context& context,
                                BufferIndex bufferIndex,
                                float frameTime,
                                const Matrix& viewMatrix,
-                               const Matrix& projectionMatrix )
+                               const Matrix& projectionMatrix,
+                               bool cullMode )
 {
   DALI_PRINT_RENDER_LIST( renderList );
 
@@ -114,7 +116,7 @@ inline void ProcessRenderList( const RenderList& renderList,
     SceneGraph::Renderer* renderer = const_cast< SceneGraph::Renderer* >( item.GetRenderer() );
     const Matrix& modelViewMatrix = item.GetModelViewMatrix();
 
-    renderer->Render( bufferIndex, modelViewMatrix, viewMatrix, projectionMatrix, frameTime );
+    renderer->Render( bufferIndex, modelViewMatrix, viewMatrix, projectionMatrix, frameTime, cullMode );
   }
 }
 
@@ -142,7 +144,7 @@ void ProcessRenderInstruction( const RenderInstruction& instruction,
       if(  renderList &&
           !renderList->IsEmpty() )
       {
-        ProcessRenderList( *renderList, context, bufferIndex, frameTime, *viewMatrix, *projectionMatrix );
+        ProcessRenderList( *renderList, context, bufferIndex, frameTime, *viewMatrix, *projectionMatrix, instruction.mCullMode );
       }
     }
   }