Changed BarrierOperation so that it isn't limited to jut working within GraphicsContexts.

This commit is contained in:
Robert Osfield
2007-07-14 09:17:18 +00:00
parent f7ce35c5ee
commit af19e71024
2 changed files with 11 additions and 7 deletions

View File

@@ -58,11 +58,15 @@ void BarrierOperation::release()
Barrier::release();
}
void BarrierOperation::operator () (GraphicsContext*)
void BarrierOperation::operator () (Object* object)
{
if (_preBlockOp==GL_FLUSH) glFlush();
if (_preBlockOp==GL_FINISH) glFinish();
if (_preBlockOp!=NO_OPERATION)
{
GraphicsContext* context = dynamic_cast<GraphicsContext*>(object);
if (_preBlockOp==GL_FLUSH) glFlush();
else if (_preBlockOp==GL_FINISH) glFinish();
}
block();
}