summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-rw-r--r--indra/llrender/llrendertarget.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 38bc5ff331..0e4aa2ee7a 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -255,12 +255,14 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
stop_glerror();
}
+#if GL_VERSION_3_1
if (mUsage != LLTexUnit::TT_RECT_TEXTURE)
{
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
stop_glerror();
}
else
+#endif
{
// ATI doesn't support mirrored repeat for rectangular textures.
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
@@ -429,7 +431,8 @@ void LLRenderTarget::bindTarget()
if (mTex.empty())
{ //no color buffer to draw to
- glDrawBuffer(GL_NONE);
+ GLenum buffers[] = {GL_NONE};
+ glDrawBuffers(0, buffers);
glReadBuffer(GL_NONE);
}
else
@@ -499,7 +502,9 @@ void LLRenderTarget::bindTexture(U32 index, S32 channel, LLTexUnit::eTextureFilt
{
case GL_SRGB:
case GL_SRGB8:
+#if GL_VERSION_2_1
case GL_SRGB_ALPHA:
+#endif
case GL_SRGB8_ALPHA8:
isSRGB = true;
break;
@@ -542,7 +547,8 @@ void LLRenderTarget::flush()
sCurResX = gGLViewport[2];
sCurResY = gGLViewport[3];
glReadBuffer(GL_BACK);
- glDrawBuffer(GL_BACK);
+ GLenum drawbuffers[] = {GL_BACK};
+ glDrawBuffers(1, drawbuffers);
}
}