Minor OpenGL GAL code changes

This commit is contained in:
Maciej Suminski 2016-08-08 14:17:40 +02:00
parent 7bc8cb56e0
commit 9f5f0ab31b
3 changed files with 6 additions and 8 deletions

View File

@ -136,8 +136,9 @@ void GPU_CACHED_MANAGER::DrawAll()
{
wxASSERT( m_isDrawing );
m_indicesSize = m_container->GetSize();
for( unsigned int i = 0; i < m_indicesSize; *m_indicesPtr++ = i++ );
m_indicesSize = m_container->GetSize();
}

View File

@ -1615,8 +1615,8 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData )
OPENGL_GAL::TessParams* param = static_cast<OPENGL_GAL::TessParams*>( aData );
VERTEX_MANAGER* vboManager = param->vboManager;
if( vboManager )
vboManager->Vertex( vertex[0], vertex[1], vertex[2] );
assert( vboManager );
vboManager->Vertex( vertex[0], vertex[1], vertex[2] );
}

View File

@ -239,12 +239,9 @@ void VERTEX_MANAGER::BeginDrawing() const
void VERTEX_MANAGER::DrawItem( const VERTEX_ITEM& aItem ) const
{
int size = aItem.GetSize();
int offset = aItem.GetOffset();
if( size > 0 )
{
int offset = aItem.GetOffset();
m_gpu->DrawIndices( offset, size );
}
m_gpu->DrawIndices( offset, size );
}