mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 14:43:47 +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
|
|
@ -39,7 +39,7 @@ GFXGLStateBlock::GFXGLStateBlock(const GFXStateBlockDesc& desc) :
|
|||
mDesc(desc),
|
||||
mCachedHashValue(desc.getHashValue())
|
||||
{
|
||||
if( !gglHasExtension(ARB_sampler_objects) )
|
||||
if( !GFXGL->mCapabilities.samplerObjects )
|
||||
return;
|
||||
|
||||
static Map<GFXSamplerStateDesc, U32> mSamplersMap;
|
||||
|
|
@ -165,7 +165,7 @@ void GFXGLStateBlock::activate(const GFXGLStateBlock* oldState)
|
|||
#undef CHECK_TOGGLE_STATE
|
||||
|
||||
//sampler objects
|
||||
if( gglHasExtension(ARB_sampler_objects) )
|
||||
if( GFXGL->mCapabilities.samplerObjects )
|
||||
{
|
||||
for (U32 i = 0; i < getMin(getOwningDevice()->getNumSamplers(), (U32) TEXTURE_STAGE_COUNT); i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue