Commit 1367d33c authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Small speed up for the color change function (OpenGL_GAL).

parent db74de74
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -73,15 +73,12 @@ VBO_VERTEX* VBO_ITEM::GetVertices()
    if( m_isDirty )
        Finish();

    return m_container->GetVertices( this );
    return m_container->GetVertices( m_offset );
}


void VBO_ITEM::ChangeColor( const COLOR4D& aColor )
{
    if( m_isDirty )
        Finish();

    VBO_VERTEX* vertexPtr = GetVertices();

    for( unsigned int i = 0; i < m_size; ++i )
+10 −0
Original line number Diff line number Diff line
@@ -112,6 +112,16 @@ public:
     */
    VBO_VERTEX* GetVertices( const VBO_ITEM* aVboItem ) const;

    /**
     * Function GetVertices()
     * Returns vertices stored at the specific offset.
     * @aOffest is the specific offset.
     */
    inline VBO_VERTEX* GetVertices( unsigned int aOffset ) const
    {
        return &m_vertices[aOffset];
    }

    /**
     * Function GetSize()
     * Returns amount of vertices currently stored in the container.