Commit 1b1216e5 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Modified SetOffset (VBO_ITEM/OpenGL GAL) function.

parent a6c8beb7
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
@@ -142,8 +142,18 @@ int VBO_ITEM::GetSize() const


void VBO_ITEM::SetOffset( int aOffset )
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;
    m_offset = aOffset;
    // TODO change offset for all the vertices?
}
}