summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowsdl.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2008-02-27 18:58:14 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2008-02-27 18:58:14 +0000
commit6d52efe452aa8469e0343da1c7d108f3f52ab651 (patch)
treea87be48e9840d7fc1f7ee514d7c7f994e71fdb3c /indra/llwindow/llwindowsdl.cpp
parent6027ad2630b8650cabcf00628ee9b0d25bedd67f (diff)
Merge of windlight into release (QAR-286). This includes all changes in
windlight14 which have passed QA (up through r79932). svn merge -r 80831:80833 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge_windlight14_r80620
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r--indra/llwindow/llwindowsdl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index e7475d577d..686be3385e 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -505,6 +505,9 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
#if !LL_SOLARIS
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, (bits <= 16) ? 16 : 24);
+ // We need stencil support for a few (minor) things.
+ if (!getenv("LL_GL_NO_STENCIL"))
+ SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
#else
// NOTE- use smaller Z-buffer to enable more graphics cards
// - This should not affect better GPUs and has been proven
@@ -587,6 +590,11 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
}
mWindow = SDL_SetVideoMode(width, height, bits, sdlflags | SDL_FULLSCREEN);
+ if (!mWindow && bits > 16)
+ {
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
+ mWindow = SDL_SetVideoMode(width, height, bits, sdlflags | SDL_FULLSCREEN);
+ }
if (mWindow)
{
@@ -629,6 +637,11 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
llinfos << "createContext: creating window " << width << "x" << height << "x" << bits << llendl;
mWindow = SDL_SetVideoMode(width, height, bits, sdlflags);
+ if (!mWindow && bits > 16)
+ {
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
+ mWindow = SDL_SetVideoMode(width, height, bits, sdlflags);
+ }
if (!mWindow)
{