Newbie SDL/OpenGL problem

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and displayed
static. After a while of trying each one, they all simply made a window
with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as it
is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

I’d really like to get started with SDL and OpenGL. What am I doing
wrong?

–Aaron Traas

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and displayed
static. After a while of trying each one, they all simply made a window
with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as it
is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

I’d really like to get started with SDL and OpenGL. What am I doing
wrong?

–Aaron Traas

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and displayed
static. After a while of trying each one, they all simply made a window
with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

i have also recently started with SDL/OpenGL (in the last 3/4 months or
so)

starting with the obvious: try moving your mouse onto the window and try
and activate it, as these tutorials don’t draw anything unless they have
the focus. did you run it from a terminal? sometimes the tutorials don’t
work for me unless they’re from a terminal.

make and run the testgl and testwin programs that come with SDL.

is the current directory correct (for the textures, etc if there are
any)? if you start getting in deep, a good start to finding out what’s
wrong is littering the program with

printf("test point whatever\n");

and then compiling it again. you can they trace up to which point the
program executed and what happened.

which wm/desktop environment are you using? try at least KDE and GNOME
as well, if you’re not in them. could be a problem with the window
focus (maybe).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as it
is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

Tux Racer actually uses SDL, i think. try running tuxracer from the
console and seeing what output you get and if this is helpful.

hope this is of some help to you. :o)

-billOn Sun, 11 Nov 2001, Aaron Traas wrote:

rm /usr/X11R6/lib/libGL.so
rm /usr/X11R6/lib/libGL.a

Recompile.

The Debian X maintainer has elected to put libGL in /usr/X11R6 even though
the ABI calls for them in /usr/lib. He’s not inclined to change this just
for the NVidia drivers (which he is openly hostile toward, though he’s
never used them…) The NVidia driver maintainer is now aware of the
problem and will divert the files in his next release properly.

When that happens, the nvidia-glx-dev package may fail to install due to
the missing files it wants to divert, I don’t remember whether or not it
will cope gracefully. That’s okay if it does, just touch them and retry
the installation - future installs will not try to put them back.

This has all been figured out and tested the hard way on this box.On Sun, Nov 11, 2001 at 04:24:40PM -0500, Aaron Traas wrote:

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and displayed
static. After a while of trying each one, they all simply made a window
with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as it
is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

I’d really like to get started with SDL and OpenGL. What am I doing
wrong?


Joseph Carter Free software developer

I generally don’t use anything that has “experimental” and
"warning" pasted all over it
no, I’m not that dumb… hehe

  • darkangel considers downloading the latest unstable kernel

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011112/07951abf/attachment.pgp

Joseph Carter wrote:

rm /usr/X11R6/lib/libGL.so
rm /usr/X11R6/lib/libGL.a

Recompile.

WOW! Worked like a charm. Thanks!

The Debian X maintainer has elected to put libGL in /usr/X11R6 even
though the ABI calls for them in /usr/lib. He’s not inclined to
change this just for the NVidia drivers (which he is openly hostile
toward, though he’s never used them…) The NVidia driver maintainer
is now aware of the problem and will divert the files in his next
release properly.

I gather the hostility is do to the non-free nature of the drivers? I
can sort of understand that. You really can’t argue with their quality,
however… I get almost identical framerates in Q3 under windows and
Linux with the nVidia drivers. And they were a breeze to set up.

Anyway, thanks a million!

–Aaron Traas

Well, that got it working, but it seems pretty damn slow. One of the
lessons dumps all of the video card info, so I know it’s seeing the
nVidia driver. Could it be that running things in a window as opposed to
full screen is a problem? I’m very new to SDL, and don’t know how to do
this. I’m just following a tutorial.

–Aaron Traas

Joseph Carter wrote:>

On Sun, Nov 11, 2001 at 04:24:40PM -0500, Aaron Traas wrote:

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and displayed
static. After a while of trying each one, they all simply made a window
with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as it
is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

I’d really like to get started with SDL and OpenGL. What am I doing
wrong?

rm /usr/X11R6/lib/libGL.so
rm /usr/X11R6/lib/libGL.a

Recompile.

The Debian X maintainer has elected to put libGL in /usr/X11R6 even though
the ABI calls for them in /usr/lib. He’s not inclined to change this just
for the NVidia drivers (which he is openly hostile toward, though he’s
never used them…) The NVidia driver maintainer is now aware of the
problem and will divert the files in his next release properly.

When that happens, the nvidia-glx-dev package may fail to install due to
the missing files it wants to divert, I don’t remember whether or not it
will cope gracefully. That’s okay if it does, just touch them and retry
the installation - future installs will not try to put them back.

This has all been figured out and tested the hard way on this box.


Joseph Carter Free software developer

I generally don’t use anything that has “experimental” and
"warning" pasted all over it
no, I’m not that dumb… hehe

  • darkangel considers downloading the latest unstable kernel


    Part 1.2Type: application/pgp-signature

Well, that got it working, but it seems pretty damn slow. One of the
lessons dumps all of the video card info, so I know it’s seeing the
nVidia driver. Could it be that running things in a window as opposed to
full screen is a problem? I’m very new to SDL, and don’t know how to do
this. I’m just following a tutorial.

I had this problem too. It turned out that NVidia GLX was still loading
a software version of Mesa from somewhere. Download the nvcheck.sh script
and run tit to see if everything is okay on your system.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Umm… I just realized something. 3D accelleration no longer works at
all… TuxRacer now gets single-digit framerate, and Q3 is totally
unplayable.

For some reason, removing those two files fixed my compilation problem,
but broke hardware accelleration. Help!

–Aaron

Joseph Carter wrote:>

On Sun, Nov 11, 2001 at 04:24:40PM -0500, Aaron Traas wrote:

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and displayed
static. After a while of trying each one, they all simply made a window
with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as it
is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

I’d really like to get started with SDL and OpenGL. What am I doing
wrong?

rm /usr/X11R6/lib/libGL.so
rm /usr/X11R6/lib/libGL.a

Recompile.

The Debian X maintainer has elected to put libGL in /usr/X11R6 even though
the ABI calls for them in /usr/lib. He’s not inclined to change this just
for the NVidia drivers (which he is openly hostile toward, though he’s
never used them…) The NVidia driver maintainer is now aware of the
problem and will divert the files in his next release properly.

When that happens, the nvidia-glx-dev package may fail to install due to
the missing files it wants to divert, I don’t remember whether or not it
will cope gracefully. That’s okay if it does, just touch them and retry
the installation - future installs will not try to put them back.

This has all been figured out and tested the hard way on this box.


Joseph Carter Free software developer

I generally don’t use anything that has “experimental” and
"warning" pasted all over it
no, I’m not that dumb… hehe

  • darkangel considers downloading the latest unstable kernel


    Part 1.2Type: application/pgp-signature

Here’s what I have:

/usr/lib/libGL.so -> libGL.so.1.0.1541
/usr/lib/libGL.so.1 -> libGL.so.1.0.1541
/usr/lib/libGL.so.1.0.1541
/usr/lib/libGLU.a -> …/X11R6/lib/libGLU.a
/usr/lib/libGLU.so -> libGLU.so.1.3
/usr/lib/libGLU.so.1 -> libGLU.so.1.3
/usr/lib/libGLU.so.1.3 -> …/X11R6/lib/libGLU.so.1.3
/usr/lib/libGLcore.so.1 -> libGLcore.so.1.0.1541
/usr/lib/libGLcore.so.1.0.1541
/usr/X11R6/lib/libGLU.a
/usr/X11R6/lib/libGLU.so -> libGLU.so.1.3
/usr/X11R6/lib/libGLU.so.1 -> libGLU.so.1.3
/usr/X11R6/lib/libGLU.so.1.3
/usr/X11R6/lib/libGLw.a

This combination of files seems to work just fine.On Fri, Nov 16, 2001 at 12:37:30PM -0500, Aaron Traas wrote:

Umm… I just realized something. 3D accelleration no longer works at
all… TuxRacer now gets single-digit framerate, and Q3 is totally
unplayable.

For some reason, removing those two files fixed my compilation problem,
but broke hardware accelleration. Help!


Joseph Carter Free software developer

  • knghtbrd ponders how to scare the living shit out of 87 people at once…
    AHH! I can do it in 3 words!:
    Microsoft Visual COBOL.

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011116/cc1089e9/attachment.pgp

Of course it broke your HW acceleration !
Those files are the one responsibles for sending
OpenGL commands to your graphics board.

Without them you only have SW OpenGL.

Paulo> ----- Original Message -----

From: adt6247@njit.edu (Aaron Traas)
To: ; “Joseph Carter”
Sent: Friday, November 16, 2001 5:37 PM
Subject: Re: [SDL] Newbie SDL/OpenGL problem…

Umm… I just realized something. 3D accelleration no longer works at
all… TuxRacer now gets single-digit framerate, and Q3 is totally
unplayable.

For some reason, removing those two files fixed my compilation problem,
but broke hardware accelleration. Help!

–Aaron

Joseph Carter wrote:

On Sun, Nov 11, 2001 at 04:24:40PM -0500, Aaron Traas wrote:

I downloaded the OpenGL demos at the SDL web site
(http://www.libsdl.org/opengl/intro.html), and successfully compiled
them. When I ran them, however, each one openned a window and
displayed

static. After a while of trying each one, they all simply made a
window

with a black screen. Some of them segfualt on run (such as lesson 10,
lesson 30).

I’m running Debian GNU/Linux (Woody) with Xfree86 4.1, 2.4.9 kernel,
nVidia’s kernel and GLX drivers. I obviously have libSDL installed as
it

is compiling. Quake III, Tux Racer, and GLTron all work beautifully.

I’d really like to get started with SDL and OpenGL. What am I doing
wrong?

rm /usr/X11R6/lib/libGL.so
rm /usr/X11R6/lib/libGL.a

Recompile.

The Debian X maintainer has elected to put libGL in /usr/X11R6 even
though

the ABI calls for them in /usr/lib. He’s not inclined to change this
just

for the NVidia drivers (which he is openly hostile toward, though he’s
never used them…) The NVidia driver maintainer is now aware of the
problem and will divert the files in his next release properly.

When that happens, the nvidia-glx-dev package may fail to install due to
the missing files it wants to divert, I don’t remember whether or not it
will cope gracefully. That’s okay if it does, just touch them and retry
the installation - future installs will not try to put them back.

This has all been figured out and tested the hard way on this box.


Joseph Carter Free software
developer

I generally don’t use anything that has “experimental” and
"warning" pasted all over it
no, I’m not that dumb… hehe

  • darkangel considers downloading the latest unstable kernel

Part 1.2Type: application/pgp-signature


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

No no no no no no

DRI OpenGL on a Debian system lives in /usr/X11R6/lib. If you have NVidia
drivers installed, these libs don’t even work. At all. The NVidia stuff
installs itself to /usr/lib as per Linux OpenGL ABI requirements.

The problem is that SDL adds both paths and finds the (useless) DRI libs
before it finds the (functional) NVidia libs. While it’s possible to set
this up intentionally to prevent the problem with -lGLcore (namely that it
gets linked in too and this means that your program won’t run on a machine
without NVidia), it really isn’t set up right at the moment and there are
still better ways to do that if that is indeed what you want to do. I
have a chroot build environment for the purpose myself.

The solution is to install nvidia-glx and nvidia-glx-dev as per
instructions and then remove those extra files which interfere with
compiling OpenGL apps. There is now a new version of nvidia-glx-src which
should make this no longer necessary.On Fri, Nov 16, 2001 at 06:27:16PM -0000, Paulo Pinto wrote:

Of course it broke your HW acceleration !
Those files are the one responsibles for sending
OpenGL commands to your graphics board.

Without them you only have SW OpenGL.


Joseph Carter Free software developer

We must know, we will know.
– David Hilbert

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011117/df360029/attachment.pgp