cache OpenGL extensions that are not part of the 3.3 core profile, and that run more than initialization setup.

This commit is contained in:
Jeff Hutchinson 2016-05-06 21:50:11 -04:00
parent a216b4515b
commit f9b2aa397f
12 changed files with 58 additions and 20 deletions

View file

@ -78,7 +78,7 @@ void GFXGLVertexBuffer::lock( U32 vertexStart, U32 vertexEnd, void **vertexPtr )
if( mBufferType == GFXBufferTypeVolatile )
{
AssertFatal(vertexStart == 0, "");
if( gglHasExtension(ARB_vertex_attrib_binding) )
if( GFXGL->mCapabilities.vertexAttributeBinding )
{
getCircularVolatileVertexBuffer()->lock( mNumVerts * mVertexSize, 0, mBufferOffset, *vertexPtr );
}
@ -136,7 +136,7 @@ void GFXGLVertexBuffer::prepare()
void GFXGLVertexBuffer::prepare(U32 stream, U32 divisor)
{
if( gglHasExtension(ARB_vertex_attrib_binding) )
if( GFXGL->mCapabilities.vertexAttributeBinding )
{
glBindVertexBuffer( stream, mBuffer, mBufferOffset, mVertexSize );
glVertexBindingDivisor( stream, divisor );