[sldev] Ubuntu Runtime Error SDL

David Fries david at fries.net
Tue Feb 27 21:00:24 PST 2007


What graphics card do you have?  Is your display using hardware OpenGL
acceleration?  Second Life is setup to only try a fixed number of
OpenGL visuals.  The default is a 24 bit depth buffer.  I've include a
patch that tries a 16 bit depth buffer if the initial OpenGL context
fails.  Let me know if it helps.  If it doesn't help post the visuals
of glxinfo for your display.

On Tue, Feb 27, 2007 at 08:14:17PM -0800, truxpin at adsl-209-233-23-82.dsl.snfc21.pacbell.net wrote:
> 
> Client built on Linux Ubuntu Dapper-Drake (without llmozlib) has start-up 
> failure trying to create window. Pertinent messages:
> .....
> 2007-02-28T03:50:27Z INFO: createContext, fullscreen=0 size=800x600
> 2007-02-28T03:50:28Z INFO: createContext: Compiled against SDL 1.2.5
> 2007-02-28T03:50:28Z INFO: createContext:  Running against SDL 1.2.11
> 2007-02-28T03:50:28Z INFO: createContext: creating window 800x600x32
> 2007-02-28T03:50:28Z WARNING: createContext: window creation failure. SDL: 
> 		     	      Couldn't find matching GLX visual
> 2007-02-28T03:50:28Z INFO: destroyContext begins ......
> 
> Same error running from build dir, or unpacked tarball. I get the error even
> if X display is set to 800x600.
> 
> Suggestions?
> 
> Fremont Cunningham
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html

-- 
David Fries <david at fries.net>
http://fries.net/~david/ (PGP encryption key available)
-------------- next part --------------
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)
 		{


More information about the SLDev mailing list