diff options
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-rw-r--r-- | indra/llrender/llrendertarget.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index c72f8fa2ba..f39615a37d 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -256,12 +256,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); @@ -430,7 +432,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 @@ -507,7 +510,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; @@ -550,7 +555,8 @@ void LLRenderTarget::flush() sCurResX = gGLViewport[2]; sCurResY = gGLViewport[3]; glReadBuffer(GL_BACK); - glDrawBuffer(GL_BACK); + GLenum drawbuffers[] = {GL_BACK}; + glDrawBuffers(1, drawbuffers); } } |