diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-23 18:29:38 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-23 18:29:38 -0500 |
commit | 4821a22070c1f68f224ff670096c2bddf25b932a (patch) | |
tree | 11d6c8c5a4a785a653535d16bac0ffe3c1d9cc4f /indra/llrender/llgl.cpp | |
parent | 57620a9da903f3c6fe482627d18c44b6411e6910 (diff) |
SH-2244 Fix for mac build?
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r-- | indra/llrender/llgl.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index f546e07320..4d0dfbf75d 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -67,6 +67,12 @@ static const std::string HEADLESS_VERSION_STRING("1.0"); std::ofstream gFailLog; +#if GL_ARB_debug_output + +#ifndef APIENTRY +#define APIENTRY +#endif + void APIENTRY gl_debug_callback(GLenum source, GLenum type, GLuint id, @@ -82,6 +88,7 @@ void APIENTRY gl_debug_callback(GLenum source, llwarns << "Message: " << message << llendl; llwarns << "-----------------------" << llendl; } +#endif void ll_init_fail_log(std::string filename) { @@ -127,7 +134,9 @@ std::list<LLGLUpdate*> LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS // ATI prototypes +#if LL_WINDOWS PFNGLGETSTRINGIPROC glGetStringi = NULL; +#endif // vertex blending prototypes PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB = NULL; @@ -484,6 +493,7 @@ bool LLGLManager::initGL() LL_ERRS("RenderInit") << "Calling init on LLGLManager after already initialized!" << LL_ENDL; } +#if LL_WINDOWS if (!glGetStringi) { glGetStringi = (PFNGLGETSTRINGIPROC) GLH_EXT_GET_PROC_ADDRESS("glGetStringi"); @@ -501,7 +511,6 @@ bool LLGLManager::initGL() str << (const char*) glGetStringi(GL_EXTENSIONS, i) << " "; } -#if LL_WINDOWS { PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = 0; wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); @@ -510,12 +519,12 @@ bool LLGLManager::initGL() str << (const char*) wglGetExtensionsStringARB(wglGetCurrentDC()); } } -#endif + free(gGLHExts.mSysExts); std::string extensions = str.str(); gGLHExts.mSysExts = strdup(extensions.c_str()); - } +#endif // Extract video card strings and convert to upper case to // work around driver-to-driver variation in capitalization. @@ -654,12 +663,14 @@ bool LLGLManager::initGL() glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords); } +#if LL_WINDOWS if (mHasDebugOutput && gDebugGL) { //setup debug output callback glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE); glDebugMessageCallbackARB((GLDEBUGPROCARB) gl_debug_callback, NULL); glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); } +#endif //HACK always disable texture multisample, use FXAA instead mHasTextureMultisample = FALSE; |