diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-09-27 21:12:08 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-09-27 21:47:19 +0800 |
commit | b1618e3dec369ccd44d92e9947c38e38c154f7f1 (patch) | |
tree | 718e4be7285ccb779bb7f46dd517c25e848b96d9 /indra | |
parent | 8723c024fb6e3afad1afcdaaab23c20bf2e825dc (diff) |
Use the more portable glDrawBuffers
Also renamed the draw buffers to avoid risking the previously
defined draw buffers with the same variable name.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llrendertarget.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index af068d5dd6..2674fa1ec6 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -429,8 +429,8 @@ void LLRenderTarget::bindTarget() if (mTex.empty()) { //no color buffer to draw to - GLenum drawbuffers[] = {GL_NONE}; - glDrawBuffers(0, drawbuffers); + GLenum buffers[] = {GL_NONE}; + glDrawBuffers(0, buffers); glReadBuffer(GL_NONE); } else @@ -548,7 +548,8 @@ void LLRenderTarget::flush() sCurResX = gGLViewport[2]; sCurResY = gGLViewport[3]; glReadBuffer(GL_BACK); - glDrawBuffer(GL_BACK); + GLenum drawbuffers[] = {GL_BACK}; + glDrawBuffers(1, drawbuffers); } } |