Small speed up for the color change function (OpenGL_GAL).
This commit is contained in:
parent
db74de74f5
commit
1367d33cd8
|
@ -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 )
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue