mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 02:36:43 +00:00
Don't check the extension string every frame
This commit is contained in:
parent
c60388afb6
commit
913bbe347b
1 changed files with 5 additions and 1 deletions
|
@ -426,8 +426,12 @@ class DepthClampCallback : public osg::Drawable::DrawCallback
|
||||||
public:
|
public:
|
||||||
virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const
|
virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const
|
||||||
{
|
{
|
||||||
if (!osg::isGLExtensionOrVersionSupported(renderInfo.getState()->getContextID(), "GL_ARB_depth_clamp", 3.3))
|
static bool supported = osg::isGLExtensionOrVersionSupported(renderInfo.getState()->getContextID(), "GL_ARB_depth_clamp", 3.3);
|
||||||
|
if (!supported)
|
||||||
|
{
|
||||||
drawable->drawImplementation(renderInfo);
|
drawable->drawImplementation(renderInfo);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
glEnable(GL_DEPTH_CLAMP);
|
glEnable(GL_DEPTH_CLAMP);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue