— En date de?: Mar 12.5.09, David Olofson a ?crit? David Olofson
Objet: Re: [SDL] glSDL
?: sdl at lists.libsdl.org
Date: Mardi 12 Mai 2009, 13h04
On Tuesday 12 May 2009, julien CLEMENT wrote:
Hi,
I’ve compiled & installed glSDL (in /usr/local).
How did you do that, exactly?
sudo make install
The glSDL versions available at olofson.net are all "application side"
wrappers, so there is nothing to install. You just #include "glSDL.h"
instead of SDL.h in your code, add glSDL.c to your project (Makefile
or whatever) and recompile.
understood.
When I set SDL_VIDEODRIVER to “glSDL” and launch the
demo “testsprite”, I get the following error:
Couldn’t initialize SDL: No available video device
The SDL_VIDEODRIVER environment variable is not supported by glSDL
wrapper! You need to pass the option “-gl” to the included testsprite
to run in in “OpenGL mode”.
There is an unofficial true backend version of glSDL that does
support the SDL_VIDEODRIVER variable. Maybe you’re looking at the
wrong documentation…? All there is for the wrapper version (IIRC)
is the README included with the source.
http://icps.u-strasbg.fr/~marchesin/sdl/glsdl.html
Maybe there is a naming collision with your project ?
As for the “parallax4” demo, it simply crashes and here is the GDB
report:
<<<
(gdb) r
Starting program: /home/clement/src/private/glSDL-0.8/parallax4
[Thread debugging using libthread_db enabled]
Requesting glSDL.
Requesting double buffered display.
??? Display size: 320x240.
Number of layers: 7.
??? Alpha: 0.
??? Planets: On.
[New Thread 0x7f81f5c236e0 (LWP 12202)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f81f5c236e0 (LWP 12202)]
0x00007f81f5324a1e in SDL_GL_GetProcAddress ()
from /usr/lib/libSDL-1.2.so.0
Can’t tell for sure from this, but it seems like SDL cannot find the
OpenGL library or something…
I would assume you get the same thing with “./testsprite -gl”,
considering this.
Indeed, same error with the -gl switch.
I’ve noticed that by default, “SDL_VIDEODRIVER” is simply not set,
and if I set it to the null? string:
“export SDL_VIDEODRIVER=”
I get the same crash, so I may be missing something in the usage of
glSDL …
The test programs included with glSDL use the flag SDL_GLSDL (glSDL
extension) for SDL_SetVideoMode(). SDL_VIDEODRIVER is not supported,
but is rather handled by SDL as usual, which doesn’t work, as the SDL
library doesn’t know what “glSDL” is.
I’m a bit confused with the name “glSDL”. Is this flag added by your library ?
Any idea David ?
Start by checking if you can OpenGL working with the SDL demos
included with the SDL, or some other SDL/OpenGL programs.
The flag “-gl” works perfectly (little note: it’s not listed in the possible options), as long as I don’t set any SDL_VIDEODRIVER environment variable.
(And it’s very fast with -gl)
Thanks !
//David Olofson - Programmer, Composer, Open Source Advocate
.-------? http://olofson.net - Games, SDL examples? -------.
|? ? ? ? http://zeespace.net - 2.5D rendering engine? ? ???|
|? ? ???http://audiality.org - Music/audio engine? ? ? ? ? |
|? ???http://eel.olofson.net - Real time scripting? ? ? ???|
’–? http://www.reologica.se - Rheology instrumentation? --’
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org