Added better handling of use of VBO's in compileGLObjects()

This commit is contained in:
Robert Osfield 2009-04-07 10:13:54 +00:00
parent 62886a7b94
commit 6238a31d5c

View File

@ -443,6 +443,17 @@ void Drawable::dirtyBound()
void Drawable::compileGLObjects(RenderInfo& renderInfo) const
{
bool useVertexArrays = _supportsVertexBufferObjects && _useVertexBufferObjects && renderInfo.getState()->isVertexBufferObjectSupported();
if (useVertexArrays)
{
if (_drawCallback.valid())
_drawCallback->drawImplementation(renderInfo,this);
else
drawImplementation(renderInfo);
return;
}
if (!_useDisplayList) return;
// get the contextID (user defined ID of 0 upwards) for the