mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
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:
parent
a216b4515b
commit
f9b2aa397f
12 changed files with 58 additions and 20 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue