Newer
Older
David Parks
committed
{
#ifdef GL_ARB_sync
if (mSync)
{
while (glClientWaitSync(mSync, 0, FENCE_WAIT_TIME_NANOSECONDS) == GL_TIMEOUT_EXPIRED)
{ //track the number of times we've waited here
static S32 waits = 0;
waits++;
}
}
#endif
}
LLGLSPipelineSkyBox::LLGLSPipelineSkyBox()
: mAlphaTest(GL_ALPHA_TEST)
, mCullFace(GL_CULL_FACE)
, mSquashClip()
{
if (!LLGLSLShader::sNoFixedFunction)
{
glDisable(GL_LIGHTING);
glDisable(GL_FOG);
glDisable(GL_CLIP_PLANE0);
}
}
David Parks
committed
LLGLSPipelineSkyBox::~LLGLSPipelineSkyBox()
{
if (!LLGLSLShader::sNoFixedFunction)
{
glEnable(GL_LIGHTING);
glEnable(GL_FOG);
glEnable(GL_CLIP_PLANE0);
}
}
David Parks
committed
LLGLSPipelineDepthTestSkyBox::LLGLSPipelineDepthTestSkyBox(bool depth_test, bool depth_write)
: LLGLSPipelineSkyBox()
, mDepth(depth_test ? GL_TRUE : GL_FALSE, depth_write ? GL_TRUE : GL_FALSE, GL_LEQUAL)
{
}
LLGLSPipelineBlendSkyBox::LLGLSPipelineBlendSkyBox(bool depth_test, bool depth_write)
: LLGLSPipelineDepthTestSkyBox(depth_test, depth_write)
, mBlend(GL_BLEND)
{
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
Graham Linden
committed
#if LL_WINDOWS
// Expose desired use of high-performance graphics processor to Optimus driver
extern "C"
{
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}