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

@ -158,7 +158,7 @@ public:
const U32 cSizeInMB = 10;
mBufferSize = (cSizeInMB << 20);
if( gglHasExtension(ARB_buffer_storage) )
if( GFXGL->mCapabilities.bufferStorage )
{
const GLbitfield flags = GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT;
glBufferStorage(mBinding, mBufferSize, NULL, flags);
@ -198,7 +198,7 @@ public:
outOffset = mBufferFreePos;
if( gglHasExtension(ARB_buffer_storage) )
if( GFXGL->mCapabilities.bufferStorage )
{
outPtr = (U8*)(mBufferPtr) + mBufferFreePos;
}
@ -227,7 +227,7 @@ public:
void unlock()
{
if( gglHasExtension(ARB_buffer_storage) )
if( GFXGL->mCapabilities.bufferStorage )
{
return;
}