From a52019d6d1e15d0e826d279ebcaef2f99d293292 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 10 May 2011 14:34:36 -0700 Subject: SH-1521 FIX -- Lighting and Shadows grayed out on mac * Modified mac feature table to bring it up to date with latest renderer features including deferred rendering * Changed mac AGL pixel format to no longer allow it to revert to software rendering when shader compilation errors occur. * Fixed up various GLSL shader compilation warnings and errors that came up as a result of the above changes. * Changed initial conditions for the "hardware skinning" checkbox on the preferences floater so it can be modified before login on machines that support avatar vertex programs. * Removed unused avatarAlphaF.glsl files Reviewed by davep --- indra/llwindow/llwindowmacosx.cpp | 59 ++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 26 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index affd7276cc..077d7ef1d0 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -541,20 +541,20 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits GLint fullscreenAttrib[] = { AGL_RGBA, - AGL_FULLSCREEN, - // AGL_NO_RECOVERY, // MBW -- XXX -- Not sure if we want this attribute - AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, - AGL_SAMPLES_ARB, mFSAASamples, - AGL_DOUBLEBUFFER, - AGL_CLOSEST_POLICY, - AGL_ACCELERATED, - AGL_RED_SIZE, 8, - AGL_GREEN_SIZE, 8, - AGL_BLUE_SIZE, 8, - AGL_ALPHA_SIZE, 8, - AGL_DEPTH_SIZE, 24, - AGL_STENCIL_SIZE, 8, - AGL_NONE + AGL_FULLSCREEN, + AGL_NO_RECOVERY, + AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, + AGL_SAMPLES_ARB, mFSAASamples, + AGL_DOUBLEBUFFER, + AGL_CLOSEST_POLICY, + AGL_ACCELERATED, + AGL_RED_SIZE, 8, + AGL_GREEN_SIZE, 8, + AGL_BLUE_SIZE, 8, + AGL_ALPHA_SIZE, 8, + AGL_DEPTH_SIZE, 24, + AGL_STENCIL_SIZE, 8, + AGL_NONE }; LL_DEBUGS("Window") << "createContext: creating fullscreen pixelformat" << LL_ENDL; @@ -567,21 +567,28 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits } else { + // NOTE from Leslie: + // + // AGL_NO_RECOVERY, when combined with AGL_ACCELERATED prevents software rendering + // fallback which means we won't hvae shaders that compile and link but then don't + // work. The drawback is that our shader compilation will be a bit more finicky though. + GLint windowedAttrib[] = { AGL_RGBA, - AGL_DOUBLEBUFFER, - AGL_CLOSEST_POLICY, - AGL_ACCELERATED, - AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, - AGL_SAMPLES_ARB, mFSAASamples, - AGL_RED_SIZE, 8, - AGL_GREEN_SIZE, 8, - AGL_BLUE_SIZE, 8, - AGL_ALPHA_SIZE, 8, - AGL_DEPTH_SIZE, 24, - AGL_STENCIL_SIZE, 8, - AGL_NONE + AGL_NO_RECOVERY, + AGL_DOUBLEBUFFER, + AGL_CLOSEST_POLICY, + AGL_ACCELERATED, + AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, + AGL_SAMPLES_ARB, mFSAASamples, + AGL_RED_SIZE, 8, + AGL_GREEN_SIZE, 8, + AGL_BLUE_SIZE, 8, + AGL_ALPHA_SIZE, 8, + AGL_DEPTH_SIZE, 24, + AGL_STENCIL_SIZE, 8, + AGL_NONE }; LL_DEBUGS("Window") << "createContext: creating windowed pixelformat" << LL_ENDL; -- cgit v1.2.3