@@ -636,8 +636,8 @@ void MaterialSystem::GenerateWorldCommandBuffer() {
636636
637637 culledCommandsBuffer.BufferStorage ( surfaceCommandsCount * INDIRECT_COMMAND_SIZE * MAX_VIEWFRAMES, 1 , nullptr );
638638 culledCommandsBuffer.MapAll ();
639- GLIndirectBuffer:: GLIndirectCommand* culledCommands = ( GLIndirectBuffer:: GLIndirectCommand* ) culledCommandsBuffer.GetData ();
640- memset ( culledCommands, 0 , surfaceCommandsCount * sizeof ( GLIndirectBuffer:: GLIndirectCommand ) * MAX_VIEWFRAMES );
639+ GLIndirectCommand* culledCommands = ( GLIndirectCommand* ) culledCommandsBuffer.GetData ();
640+ memset ( culledCommands, 0 , surfaceCommandsCount * sizeof ( GLIndirectCommand ) * MAX_VIEWFRAMES );
641641 culledCommandsBuffer.FlushAll ();
642642
643643 surfaceBatchesUBO.BufferData ( MAX_SURFACE_COMMAND_BATCHES * SURFACE_COMMAND_BATCH_SIZE, nullptr , GL_STATIC_DRAW );
@@ -2100,9 +2100,9 @@ void MaterialSystem::RenderMaterials( const shaderSort_t fromSort, const shaderS
21002100
21012101void MaterialSystem::RenderIndirect ( const Material& material, const uint32_t viewID, const GLenum mode = GL_TRIANGLES ) {
21022102 glMultiDrawElementsIndirectCountARB ( mode, GL_UNSIGNED_INT,
2103- BUFFER_OFFSET ( material.surfaceCommandBatchOffset * SURFACE_COMMANDS_PER_BATCH * sizeof ( GLIndirectBuffer:: GLIndirectCommand )
2103+ BUFFER_OFFSET ( material.surfaceCommandBatchOffset * SURFACE_COMMANDS_PER_BATCH * sizeof ( GLIndirectCommand )
21042104 + ( surfaceCommandsCount * ( MAX_VIEWS * currentFrame + viewID )
2105- * sizeof ( GLIndirectBuffer:: GLIndirectCommand ) ) ),
2105+ * sizeof ( GLIndirectCommand ) ) ),
21062106 material.globalID * sizeof ( uint32_t )
21072107 + ( MAX_COMMAND_COUNTERS * ( MAX_VIEWS * currentFrame + viewID ) ) * sizeof ( uint32_t ),
21082108 material.drawCommands .size (), 0 );
0 commit comments