mDepthTestMode( depthTestMode ),
mWriteToColorBuffer( writeToColorBuffer ),
mUpdateAttributesLocation( true ),
- mPremultipledAlphaEnabled( preMultipliedAlphaEnabled )
+ mPremultipledAlphaEnabled( preMultipliedAlphaEnabled ),
+ mBatchingEnabled( false )
{
if( blendingBitmask != 0u )
{
return mWriteToColorBuffer;
}
+void Renderer::SetBatchingEnabled( bool batchingEnabled )
+{
+ mBatchingEnabled = batchingEnabled;
+}
+
void Renderer::Render( Context& context,
SceneGraph::TextureCache& textureCache,
BufferIndex bufferIndex,
const Matrix& viewMatrix,
const Matrix& projectionMatrix,
const Vector3& size,
+ Render::Geometry* externalGeometry,
bool blend )
{
// Get the program to use:
}
SetUniforms( bufferIndex, node, size, *program );
+ Render::Geometry* geometry = externalGeometry ? externalGeometry : mGeometry;
- if( mUpdateAttributesLocation || mGeometry->AttributesChanged() )
+ if( mUpdateAttributesLocation || geometry->AttributesChanged() )
{
- mGeometry->GetAttributeLocationFromProgram( mAttributesLocation, *program, bufferIndex );
+ geometry->GetAttributeLocationFromProgram( mAttributesLocation, *program, bufferIndex );
mUpdateAttributesLocation = false;
}
- mGeometry->UploadAndDraw( context, bufferIndex, mAttributesLocation, mIndexedDrawFirstElement, mIndexedDrawElementsCount );
+ geometry->UploadAndDraw( context, bufferIndex, mAttributesLocation, mIndexedDrawFirstElement, mIndexedDrawElementsCount );
}
}