1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Index: llwindowsdl.cpp
===================================================================
RCS file: /home/david/src/.cvs/programming/SecondLife/linden/indra/llwindow/llwindowsdl.cpp,v
retrieving revision 1.1
diff -u -r1.1 llwindowsdl.cpp
--- llwindowsdl.cpp 28 Feb 2007 04:43:12 -0000 1.1
+++ llwindowsdl.cpp 28 Feb 2007 04:52:45 -0000
@@ -393,6 +393,13 @@
}
mWindow = SDL_SetVideoMode(width, height, bits, sdlflags | SDL_FULLSCREEN);
+ if (!mWindow)
+ {
+ llwarns << "createContext: window creation failure. SDL: " << SDL_GetError() << llendl;
+ llwarns << "createContext: Trying again with 16 bit depth buffer" << llendl;
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
+ mWindow = SDL_SetVideoMode(width, height, bits, sdlflags);
+ }
if (mWindow)
{
@@ -435,6 +442,13 @@
llinfos << "createContext: creating window " << width << "x" << height << "x" << bits << llendl;
mWindow = SDL_SetVideoMode(width, height, bits, sdlflags);
+ if (!mWindow)
+ {
+ llwarns << "createContext: window creation failure. SDL: " << SDL_GetError() << llendl;
+ llwarns << "createContext: Trying again with 16 bit depth buffer" << llendl;
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
+ mWindow = SDL_SetVideoMode(width, height, bits, sdlflags);
+ }
if (!mWindow)
{
|