diff options
author | thickbrick | 2011-03-24 17:06:27 +0200 |
---|---|---|
committer | thickbrick | 2011-03-24 17:06:27 +0200 |
commit | f8d46d105e5d137890b98fd18bdf26fa797e22d3 (patch) | |
tree | ac656516a6c8053a5c73108f1de212a2a5b56767 /linden/indra/llwindow/llwindowsdl.cpp | |
parent | Changed version to Experimental 2011.03.20 (diff) | |
download | meta-impy-f8d46d105e5d137890b98fd18bdf26fa797e22d3.zip meta-impy-f8d46d105e5d137890b98fd18bdf26fa797e22d3.tar.gz meta-impy-f8d46d105e5d137890b98fd18bdf26fa797e22d3.tar.bz2 meta-impy-f8d46d105e5d137890b98fd18bdf26fa797e22d3.tar.xz |
Fix #824/SNOW-466: Window Creation Error related to FSAA
- Linux only: Retry window creation with lower FSAA samples if it
fails.
- All platforms: save actual FSAA level into RenderFSAASamples after
window is created.
This exapnds on the patch from SNOW-466 by Robin Cornelius.
Diffstat (limited to 'linden/indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index edfe33b..2f9de6b 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp | |||
@@ -632,6 +632,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B | |||
632 | mWindow = SDL_SetVideoMode(width, height, bits, sdlflags); | 632 | mWindow = SDL_SetVideoMode(width, height, bits, sdlflags); |
633 | } | 633 | } |
634 | 634 | ||
635 | while (!mWindow && mFSAASamples > 0) | ||
636 | { | ||
637 | llwarns << "Window creating failed with " << mFSAASamples << "x FSAA."<<llendl; | ||
638 | mFSAASamples = mFSAASamples>>1; | ||
639 | SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, mFSAASamples ? 1 : 0); | ||
640 | SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, mFSAASamples); | ||
641 | mWindow = SDL_SetVideoMode(width, height, bits, sdlflags); | ||
642 | } | ||
643 | |||
635 | if (!mWindow) | 644 | if (!mWindow) |
636 | { | 645 | { |
637 | llwarns << "createContext: window creation failure. SDL: " << SDL_GetError() << llendl; | 646 | llwarns << "createContext: window creation failure. SDL: " << SDL_GetError() << llendl; |