mIsClearColorSet( false ),
mIgnoreRenderToFbo( false ),
mFrameBuffer( 0 ),
+ mContext( 0 ),
mCamera( 0 ),
mNextFreeRenderList( 0 )
{
Render::FrameBuffer* mFrameBuffer;
+ Context* mContext; ///< The context holding the GL state of rendering
+
private: // Data
Camera* mCamera; ///< camera that is used
void RenderInstructionProcessor::Prepare( BufferIndex updateBufferIndex,
SortedLayerPointers& sortedLayers,
+ Context& context,
RenderTask& renderTask,
bool cull,
bool hasClippingNodes,
if( isRenderListAdded || instruction.mIsClearColorSet || isRootLayerDirty )
{
+ instruction.mContext = &context;
instructions.PushBack( updateBufferIndex, &instruction );
}
}
namespace Internal
{
+class Context;
+
namespace Render
{
class Geometry;
*
* @param[in] updateBufferIndex The current update buffer index.
* @param[in] sortedLayers The layers containing lists of opaque/transparent renderables.
+ * @param[in] context The context holding the GL state of rendering for the rendering instructions.
* @param[in] renderTask The rendering task information.
* @param[in] cull Whether frustum culling is enabled or not
* @param[in] hasClippingNodes Whether any clipping nodes exist within this layer, to optimize sorting if not
*/
void Prepare( BufferIndex updateBufferIndex,
SortedLayerPointers& sortedLayers,
+ Context& context,
RenderTask& renderTask,
bool cull,
bool hasClippingNodes,
* @param[in] taskContainer The container of render-tasks.
* @param[in] rootNode The root node of the scene-graph.
* @param[in] sortedLayers The layers containing lists of opaque / transparent renderables.
+ * @param[in] context The context holding the GL state of rendering for the rendering instructions.
* @param[out] instructions The instructions for rendering the next frame.
* @param[in] renderInstructionProcessor An instance of the RenderInstructionProcessor used to sort and handle the renderers for each layer.
* @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled (used to measure FPS above 60)
RenderTaskList::RenderTaskContainer& taskContainer,
Layer& rootNode,
SortedLayerPointers& sortedLayers,
+ Context& context,
RenderInstructionContainer& instructions,
RenderInstructionProcessor& renderInstructionProcessor,
bool renderToFboEnabled,
renderInstructionProcessor.Prepare( updateBufferIndex,
sortedLayers,
+ context,
renderTask,
renderTask.GetCullMode(),
hasClippingNodes,
RenderTaskList& renderTasks,
Layer& rootNode,
SortedLayerPointers& sortedLayers,
+ Context& context,
RenderInstructionContainer& instructions,
bool renderToFboEnabled,
bool isRenderingToFbo )
taskContainer,
rootNode,
sortedLayers,
+ context,
instructions,
mRenderInstructionProcessor,
renderToFboEnabled,
taskContainer,
rootNode,
sortedLayers,
+ context,
instructions,
mRenderInstructionProcessor,
renderToFboEnabled,
* @param[in] renderTasks The list of render-tasks.
* @param[in] rootNode The root node of the scene-graph.
* @param[in] sortedLayers The layers containing lists of opaque / transparent renderables.
+ * @param[in] context The context holding the GL state of rendering for the rendering instructions.
* @param[out] instructions The instructions for rendering the next frame.
* @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled (used to measure FPS above 60)
* @param[in] isRenderingToFbo Whether this frame is being rendered into the Frame Buffer Object (used to measure FPS above 60)
RenderTaskList& renderTasks,
Layer& rootNode,
SortedLayerPointers& sortedLayers,
+ Context& context,
RenderInstructionContainer& instructions,
bool renderToFboEnabled,
bool isRenderingToFbo );
*scene->taskList,
*scene->root,
scene->sortedLayerList,
+ *scene->scene->GetContext(),
scene->scene->GetRenderInstructions(),
renderToFboEnabled,
isRenderingToFbo );