Is MacGL really so special?
This commit is contained in:
@@ -45,11 +45,7 @@
|
||||
#endif
|
||||
|
||||
#define LL_OCTREE_PARANOIA_CHECK 0
|
||||
#if LL_DARWIN
|
||||
#define LL_OCTREE_MAX_CAPACITY 32
|
||||
#else
|
||||
#define LL_OCTREE_MAX_CAPACITY 128
|
||||
#endif
|
||||
|
||||
template <class T> class LLOctreeNode;
|
||||
|
||||
|
||||
@@ -616,9 +616,7 @@ void LLGLManager::initExtensions()
|
||||
mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts);
|
||||
mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts);
|
||||
mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
|
||||
#if !LL_DARWIN
|
||||
mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts);
|
||||
#endif
|
||||
mHasShaderObjects = ExtensionExists("GL_ARB_shader_objects", gGLHExts.mSysExts) && ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts);
|
||||
mHasVertexShader = ExtensionExists("GL_ARB_vertex_program", gGLHExts.mSysExts) && ExtensionExists("GL_ARB_vertex_shader", gGLHExts.mSysExts)
|
||||
&& ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts);
|
||||
|
||||
@@ -1079,13 +1079,6 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
|
||||
if (mUseMipMaps)
|
||||
{
|
||||
mAutoGenMips = gGLManager.mHasMipMapGeneration;
|
||||
#if LL_DARWIN
|
||||
// On the Mac GF2 and GF4MX drivers, auto mipmap generation doesn't work right with alpha-only textures.
|
||||
if(gGLManager.mIsGF2or4MX && (mFormatInternal == GL_ALPHA8) && (mFormatPrimary == GL_ALPHA))
|
||||
{
|
||||
mAutoGenMips = FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
mCurrentDiscardLevel = discard_level;
|
||||
|
||||
@@ -386,8 +386,6 @@ void LLRenderTarget::flush(BOOL fetch_depth)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if !LL_DARWIN
|
||||
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
|
||||
if (mSampleBuffer)
|
||||
@@ -427,7 +425,6 @@ void LLRenderTarget::flush(BOOL fetch_depth)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
glFlush();
|
||||
@@ -437,7 +434,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
|
||||
if (!source.mFBO || !mFBO)
|
||||
{
|
||||
llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl;
|
||||
@@ -456,7 +452,6 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
|
||||
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL LLRenderTarget::isComplete() const
|
||||
@@ -600,7 +595,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;
|
||||
@@ -641,12 +635,10 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
|
||||
}
|
||||
|
||||
mTex.push_back(tex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLMultisampleBuffer::allocateDepth()
|
||||
{
|
||||
#if !LL_DARWIN
|
||||
glGenRenderbuffersEXT(1, (GLuint* ) &mDepth);
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepth);
|
||||
if (mStencil)
|
||||
@@ -657,6 +649,5 @@ void LLMultisampleBuffer::allocateDepth()
|
||||
{
|
||||
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, mSamples, GL_DEPTH_COMPONENT16_ARB, mResX, mResY);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user