Modified SetOffset (VBO_ITEM/OpenGL GAL) function.

This commit is contained in:
Maciej Suminski 2013-05-14 10:41:05 +02:00
parent a6c8beb73b
commit 1b1216e53d
1 changed files with 11 additions and 1 deletions

View File

@ -142,8 +142,18 @@ int VBO_ITEM::GetSize() const
void VBO_ITEM::SetOffset( int aOffset )
{
if( m_offset == aOffset )
return;
int delta = aOffset - m_offset;
// Change offset for all the stored indices
for( int i = 0; i < m_size; ++i )
{
m_indices += delta;
}
m_offset = aOffset;
// TODO change offset for all the vertices?
}