Cleaned up Geometry::dirtyGLOjects() and Geometry::releaseGLObjects()
This commit is contained in:
parent
337f24051b
commit
25c60dc675
@ -694,6 +694,28 @@ void Geometry::setUseVertexBufferObjects(bool flag)
|
|||||||
void Geometry::dirtyGLObjects()
|
void Geometry::dirtyGLObjects()
|
||||||
{
|
{
|
||||||
Drawable::dirtyGLObjects();
|
Drawable::dirtyGLObjects();
|
||||||
|
|
||||||
|
ArrayList arrays;
|
||||||
|
if (getArrayList(arrays))
|
||||||
|
{
|
||||||
|
for(ArrayList::iterator itr = arrays.begin();
|
||||||
|
itr != arrays.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
(*itr)->dirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawElementsList drawElements;
|
||||||
|
if (getDrawElementsList(drawElements))
|
||||||
|
{
|
||||||
|
for(DrawElementsList::iterator itr = drawElements.begin();
|
||||||
|
itr != drawElements.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
(*itr)->dirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Geometry::resizeGLObjectBuffers(unsigned int maxSize)
|
void Geometry::resizeGLObjectBuffers(unsigned int maxSize)
|
||||||
@ -727,16 +749,6 @@ void Geometry::releaseGLObjects(State* state) const
|
|||||||
{
|
{
|
||||||
Drawable::releaseGLObjects(state);
|
Drawable::releaseGLObjects(state);
|
||||||
|
|
||||||
if (state)
|
|
||||||
{
|
|
||||||
if (_vertexArrayStateList[state->getContextID()].valid())
|
|
||||||
{
|
|
||||||
_vertexArrayStateList[state->getContextID()]->release();
|
|
||||||
_vertexArrayStateList[state->getContextID()] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else _vertexArrayStateList.clear();
|
|
||||||
|
|
||||||
ArrayList arrays;
|
ArrayList arrays;
|
||||||
if (getArrayList(arrays))
|
if (getArrayList(arrays))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user