diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-08-03 14:54:53 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-08-03 14:54:53 -0600 |
commit | 13e152c92d0bd1bf224a67d64d0c747b8d28e426 (patch) | |
tree | 6ac5c400b52f9b52a1dfed971a4d812cd44370de | |
parent | d9b9242a802c08e9018b399e46d04aa0dffa5add (diff) |
fix for SH-2177: Second Life Crashes On Startup in Advanced Mode -- I have reinstalled SL, Clear Caches -- Nothing Works
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 551d487cc8..1239e2d40b 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1172,8 +1172,39 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO // First we try and get a 32 bit depth pixel format BOOL result = wglChoosePixelFormatARB(mhDC, attrib_list, NULL, 256, pixel_formats, &num_formats); + + while(!result && mFSAASamples > 0) + { + llwarns << "FSAASamples: " << mFSAASamples << " not supported." << llendl ; + + mFSAASamples /= 2 ; //try to decrease sample pixel number until to disable anti-aliasing + if(mFSAASamples < 2) + { + mFSAASamples = 0 ; + } + + if (mFSAASamples > 0) + { + attrib_list[end_attrib + 3] = mFSAASamples; + } + else + { + cur_attrib = end_attrib ; + end_attrib = 0 ; + attrib_list[cur_attrib++] = 0 ; //end + } + result = wglChoosePixelFormatARB(mhDC, attrib_list, NULL, 256, pixel_formats, &num_formats); + + if(result) + { + llwarns << "Only support FSAASamples: " << mFSAASamples << llendl ; + } + } + if (!result) { + llwarns << "mFSAASamples: " << mFSAASamples << llendl ; + close(); show_window_creation_error("Error after wglChoosePixelFormatARB 32-bit"); return FALSE; |