Skip to content
Snippets Groups Projects
Commit 45396901 authored by Karl Stiefvater (qarl)'s avatar Karl Stiefvater (qarl)
Browse files

revert mac build to 10.4u sdk. remove FBO code from llrendertarget.cpp with #ifdefs.

parent f3b6bc0d
No related branches found
No related tags found
No related merge requests found
...@@ -81,13 +81,13 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ...@@ -81,13 +81,13 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# otherwise CMAKE_OSX_SYSROOT will be overridden here. We can't just check # otherwise CMAKE_OSX_SYSROOT will be overridden here. We can't just check
# for it being unset, as it gets set to the system default :( # for it being unset, as it gets set to the system default :(
# Default to building against the 10.5 SDK if no deployment target is # Default to building against the 10.4u SDK if no deployment target is
# specified. # specified.
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET) if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html
# see http://public.kitware.com/Bug/view.php?id=9959 + poppy # see http://public.kitware.com/Bug/view.php?id=9959 + poppy
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4u)
endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET) endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# GCC 4.2 is incompatible with the MacOSX 10.4 SDK # GCC 4.2 is incompatible with the MacOSX 10.4 SDK
......
...@@ -390,6 +390,8 @@ void LLRenderTarget::flush(BOOL fetch_depth) ...@@ -390,6 +390,8 @@ void LLRenderTarget::flush(BOOL fetch_depth)
} }
else else
{ {
#if !LL_DARWIN
stop_glerror(); stop_glerror();
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
...@@ -433,6 +435,7 @@ void LLRenderTarget::flush(BOOL fetch_depth) ...@@ -433,6 +435,7 @@ void LLRenderTarget::flush(BOOL fetch_depth)
} }
} }
} }
#endif
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
} }
...@@ -441,6 +444,7 @@ void LLRenderTarget::flush(BOOL fetch_depth) ...@@ -441,6 +444,7 @@ void LLRenderTarget::flush(BOOL fetch_depth)
void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, S32 srcX1, S32 srcY1, 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) S32 dstX0, S32 dstY0, S32 dstX1, S32 dstY1, U32 mask, U32 filter)
{ {
#if !LL_DARWIN
gGL.flush(); gGL.flush();
if (!source.mFBO || !mFBO) if (!source.mFBO || !mFBO)
{ {
...@@ -479,12 +483,14 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, ...@@ -479,12 +483,14 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
stop_glerror(); stop_glerror();
} }
} }
#endif
} }
//static //static
void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0, S32 srcY0, S32 srcX1, S32 srcY1, 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) S32 dstX0, S32 dstY0, S32 dstX1, S32 dstY1, U32 mask, U32 filter)
{ {
#if !LL_DARWIN
if (!source.mFBO) if (!source.mFBO)
{ {
llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl; llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl;
...@@ -501,6 +507,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0 ...@@ -501,6 +507,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
stop_glerror(); stop_glerror();
} }
#endif
} }
BOOL LLRenderTarget::isComplete() const BOOL LLRenderTarget::isComplete() const
...@@ -645,6 +652,7 @@ void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth ...@@ -645,6 +652,7 @@ void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth
void LLMultisampleBuffer::addColorAttachment(U32 color_fmt) void LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
{ {
#if !LL_DARWIN
if (color_fmt == 0) if (color_fmt == 0)
{ {
return; return;
...@@ -685,10 +693,12 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt) ...@@ -685,10 +693,12 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
} }
mTex.push_back(tex); mTex.push_back(tex);
#endif
} }
void LLMultisampleBuffer::allocateDepth() void LLMultisampleBuffer::allocateDepth()
{ {
#if !LL_DARWIN
glGenRenderbuffersEXT(1, (GLuint* ) &mDepth); glGenRenderbuffersEXT(1, (GLuint* ) &mDepth);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepth); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepth);
if (mStencil) if (mStencil)
...@@ -699,5 +709,6 @@ void LLMultisampleBuffer::allocateDepth() ...@@ -699,5 +709,6 @@ void LLMultisampleBuffer::allocateDepth()
{ {
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, mSamples, GL_DEPTH_COMPONENT16_ARB, mResX, mResY); glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, mSamples, GL_DEPTH_COMPONENT16_ARB, mResX, mResY);
} }
#endif
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment