summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 6998d892e2..729e8a5f28 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -595,6 +595,7 @@ bool LLGLManager::initGL()
#endif
}
+#if GL_VERSION_1_3
if (mGLVersion >= 2.1f && LLImageGL::sCompressTextures)
{ //use texture compression
glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST);
@@ -603,6 +604,7 @@ bool LLGLManager::initGL()
{ //GL version is < 3.0, always disable texture compression
LLImageGL::sCompressTextures = false;
}
+#endif
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// from being recognized as ATI.
@@ -727,6 +729,7 @@ bool LLGLManager::initGL()
{
mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS);
}
+#if GL_VERSION_1_3
else
{
GLint num_tex_units;
@@ -737,6 +740,7 @@ bool LLGLManager::initGL()
mNumTextureUnits = llmin(mNumTextureUnits, 2);
}
}
+#endif
}
else
{
@@ -1474,12 +1478,14 @@ void log_glerror()
error = glGetError();
while (LL_UNLIKELY(error))
{
+#if GLU_VERSION_1_1
GLubyte const * gl_error_msg = gluErrorString(error);
if (NULL != gl_error_msg)
{
LL_WARNS() << "GL Error: " << error << " GL Error String: " << gl_error_msg << LL_ENDL ;
}
else
+#endif // GLU_VERSION_1_1
{
// gluErrorString returns NULL for some extensions' error codes.
// you'll probably have to grep for the number in glext.h.
@@ -1498,6 +1504,7 @@ void do_assert_glerror()
while (LL_UNLIKELY(error))
{
quit = TRUE;
+#if GLU_VERSION_1_1
GLubyte const * gl_error_msg = gluErrorString(error);
if (NULL != gl_error_msg)
{
@@ -1510,6 +1517,7 @@ void do_assert_glerror()
}
}
else
+#endif // GLU_VERSION_1_1
{
// gluErrorString returns NULL for some extensions' error codes.
// you'll probably have to grep for the number in glext.h.
@@ -1601,6 +1609,7 @@ void LLGLState::restoreGL()
void LLGLState::resetTextureStates()
{
gGL.flush();
+#if GL_VERSION_1_3
GLint maxTextureUnits;
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &maxTextureUnits);
@@ -1610,6 +1619,7 @@ void LLGLState::resetTextureStates()
glClientActiveTexture(GL_TEXTURE0_ARB+j);
j == 0 ? gGL.getTexUnit(j)->enable(LLTexUnit::TT_TEXTURE) : gGL.getTexUnit(j)->disable();
}
+#endif
}
void LLGLState::dumpStates()
@@ -1864,6 +1874,7 @@ LLGLState::LLGLState(LLGLenum state, S32 enabled) :
mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
+#if GL_VERSION_1_1
switch (state)
{
case GL_ALPHA_TEST:
@@ -1880,6 +1891,7 @@ LLGLState::LLGLState(LLGLenum state, S32 enabled) :
mState = 0;
break;
}
+#endif // GL_VERSION_1_1
stop_glerror();
@@ -2339,8 +2351,11 @@ void LLGLSyncFence::wait()
}
LLGLSPipelineSkyBox::LLGLSPipelineSkyBox()
-: mAlphaTest(GL_ALPHA_TEST)
-, mCullFace(GL_CULL_FACE)
+:
+#if GL_VERSION_1_1
+mAlphaTest(GL_ALPHA_TEST),
+#endif
+mCullFace(GL_CULL_FACE)
, mSquashClip()
{
}