summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-09-28 14:43:52 -0500
committerDave Parks <davep@lindenlab.com>2010-09-28 14:43:52 -0500
commitd43aef498bf305ba88839b653e68b3c1ad889cdd (patch)
treeae4313cbaee7dc2a317e32e6039d31930902fa10 /indra
parent3dff1e8e6fbc2d4288e738c4a27443a9a34e22d0 (diff)
Enable FBO on OSX
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llrendertarget.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index d9520b3bf6..a4de4c35e5 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -390,8 +390,6 @@ void LLRenderTarget::flush(BOOL fetch_depth)
}
else
{
-#if !LL_DARWIN
-
stop_glerror();
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
@@ -435,7 +433,6 @@ void LLRenderTarget::flush(BOOL fetch_depth)
}
}
}
-#endif
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
@@ -444,7 +441,6 @@ void LLRenderTarget::flush(BOOL fetch_depth)
void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, S32 srcX1, S32 srcY1,
S32 dstX0, S32 dstY0, S32 dstX1, S32 dstY1, U32 mask, U32 filter)
{
-#if !LL_DARWIN
gGL.flush();
if (!source.mFBO || !mFBO)
{
@@ -483,14 +479,12 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
stop_glerror();
}
}
-#endif
}
//static
void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0, S32 srcY0, S32 srcX1, S32 srcY1,
S32 dstX0, S32 dstY0, S32 dstX1, S32 dstY1, U32 mask, U32 filter)
{
-#if !LL_DARWIN
if (!source.mFBO)
{
llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl;
@@ -507,7 +501,6 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
stop_glerror();
}
-#endif
}
BOOL LLRenderTarget::isComplete() const
@@ -652,7 +645,6 @@ void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth
void LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
{
-#if !LL_DARWIN
if (color_fmt == 0)
{
return;
@@ -682,23 +674,19 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
{
case GL_FRAMEBUFFER_COMPLETE_EXT:
break;
- case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
- llerrs << "WTF?" << llendl;
- break;
default:
- llerrs << "WTF?" << llendl;
+ llerrs << "WTF? " << std::hex << status << llendl;
+ break;
}
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
mTex.push_back(tex);
-#endif
}
void LLMultisampleBuffer::allocateDepth()
{
-#if !LL_DARWIN
glGenRenderbuffersEXT(1, (GLuint* ) &mDepth);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepth);
if (mStencil)
@@ -709,6 +697,5 @@ void LLMultisampleBuffer::allocateDepth()
{
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, mSamples, GL_DEPTH_COMPONENT16_ARB, mResX, mResY);
}
-#endif
}