OpenGL problems

Hi everyone.

I just three days ago started using libsdl, and it looks promising. I
compiled all of the example programs to test it out, but the OpenGL test
program doesn’t work. I just get weird stuff in my window (see [1] for
a screenshot). (You can see some warped contents of the libsdl.org web
page at the bottom of the window.)

I have a different OpenGL test program that doesn’t use libsdl and it
works fine (see [2]).

I’m not sure where I should start looking to find out what the problem
is. Can anyone help?

Thanks,

Cameron

[1] http://www-personal.monash.edu.au/~cameron/gl/shot.png
[2] http://www-personal.monash.edu.au/~cameron/gl/shot2.png--
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

did you compile the libsdl yourself, or did you use the libsdl from some
distribution. several distribution (like SuSe) provide development
libraries that are nocht useable with OGL. in that case you should download
the newest source and compile the sdl-devel-libs yourself.

Cameron McCormack wrote:> Hi everyone.

I just three days ago started using libsdl, and it looks promising. I
compiled all of the example programs to test it out, but the OpenGL test
program doesn’t work. I just get weird stuff in my window (see [1] for
a screenshot). (You can see some warped contents of the libsdl.org web
page at the bottom of the window.)

I have a different OpenGL test program that doesn’t use libsdl and it
works fine (see [2]).

I’m not sure where I should start looking to find out what the problem
is. Can anyone help?

Thanks,

Cameron

[1] http://www-personal.monash.edu.au/~cameron/gl/shot.png
[2] http://www-personal.monash.edu.au/~cameron/gl/shot2.png


Matthias Bach

Marix eMonkey 2002

personal webpage:
http://www.marix.madsite.de

Matthias Bach:

did you compile the libsdl yourself, or did you use the libsdl from some
distribution. several distribution (like SuSe) provide development
libraries that are nocht useable with OGL. in that case you should download
the newest source and compile the sdl-devel-libs yourself.

I initially tried the libsdl provided by the libsdl1.2 Debian package.
When this didn’t work, I compiled it myself, but still experienced the
problem.

I’m using the latest NVidia libGL and libGLcore libraries and the libGLU
that comes with the Mesa package. Is it troublesome that these are
mixed?

Cameron–
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

no, it shouldn’t, but as far as i know, OGL-capability has to be enabled
somewhere in the makefile. don’t remember whether it is by default or not,
so.

Cameron McCormack wrote:> Matthias Bach:

did you compile the libsdl yourself, or did you use the libsdl from some
distribution. several distribution (like SuSe) provide development
libraries that are nocht useable with OGL. in that case you should
download the newest source and compile the sdl-devel-libs yourself.

I initially tried the libsdl provided by the libsdl1.2 Debian package.
When this didn’t work, I compiled it myself, but still experienced the
problem.

I’m using the latest NVidia libGL and libGLcore libraries and the libGLU
that comes with the Mesa package. Is it troublesome that these are
mixed?

Cameron


Matthias Bach

Marix eMonkey 2002

personal webpage:
http://www.marix.madsite.de

Are you sure your OpenGL works without problems? Try to run applications like
gears or glxgears. There are many problems with nVidia drivers and you just
could find one.On Sat, Aug 10, 2002 at 10:29:11PM +1000, Cameron McCormack wrote:

I’m using the latest NVidia libGL and libGLcore libraries and the libGLU
that comes with the Mesa package.


http://decopter.sf.net - free unrealistic helicopter simulator

Jacek Pop?awski:

Are you sure your OpenGL works without problems? Try to run
applications like gears or glxgears. There are many problems with
nVidia drivers and you just could find one.

Yes, glxgears works fine.

I tried just now going back to the Mesa libraries, and glxgears and that
other demo GL program I have still work. SDL’s testgl program still
gives the weird output.

Thanks,

Cameron–
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

Hello,

I`ve got a little trouble, but cannot find the source.
My program quit big now, but it must be something small…
Well, I init SDL application, draw smth, and… when I leave
the application, I have exception on the line

SDL_Quit();

Does anybody know, why SDL creates exception on exit? It was inited
correctly.
What can it be? I spent 1 week, but cannot find anything…

Thank you!–
Best regards,
Alexander mailto:Editor at echo.ru

Jacek Pop?awski:

Are you sure your OpenGL works without problems? Try to run applications like
gears or glxgears. There are many problems with nVidia drivers and you just
could find one.

Quake 3 Arena works with the NVidia GL libraries too.–
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

Please compare:

ldd glxgears

and:

ldd testgl

Are same libraries used?On Sun, Aug 11, 2002 at 01:25:16AM +1000, Cameron McCormack wrote:

Yes, glxgears works fine.

I tried just now going back to the Mesa libraries, and glxgears and that
other demo GL program I have still work. SDL’s testgl program still
gives the weird output.


http://decopter.sf.net - free unrealistic helicopter simulator

The same heppens to me too. NT debug exception in ntdll.dll or something
like that…

RK.

Alexander Gayevoy wrote:>Hello,

I`ve got a little trouble, but cannot find the source.
My program quit big now, but it must be something small…
Well, I init SDL application, draw smth, and… when I leave
the application, I have exception on the line

SDL_Quit();

Does anybody know, why SDL creates exception on exit? It was inited
correctly.
What can it be? I spent 1 week, but cannot find anything…

Thank you!

The same heppens to me too. NT debug exception in ntdll.dll or something
like that…

This is often caused by memory problems in your program.
Try using a debug memory allocation tool.

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

If you have NVIDIA drivers, look for /usr/X11R6/lib/libGL.a… If you have
it, DELETE IT.

Debian does not follow the OpenGL Linux ABI specification. You’re getting
the wrong library by the looks of it.On Sat, Aug 10, 2002 at 08:08:13PM +1000, Cameron McCormack wrote:

I just three days ago started using libsdl, and it looks promising. I
compiled all of the example programs to test it out, but the OpenGL test
program doesn’t work. I just get weird stuff in my window (see [1] for
a screenshot). (You can see some warped contents of the libsdl.org web
page at the bottom of the window.)

I have a different OpenGL test program that doesn’t use libsdl and it
works fine (see [2]).

I’m not sure where I should start looking to find out what the problem
is. Can anyone help?


Joseph Carter Sooner or later, BOOM!

Never underestimate the power of somebody with source code, a text editor,
and the willingness to totally hose their system.
– Rob Landley

-------------- 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/20020810/a457a997/attachment.pgp

Yeah, I know what his problem is. Anything already compiled will work
fine. This is why DynGL 3 exists. =) See list archives.On Sun, Aug 11, 2002 at 01:31:29AM +1000, Cameron McCormack wrote:

Are you sure your OpenGL works without problems? Try to run applications like
gears or glxgears. There are many problems with nVidia drivers and you just
could find one.

Quake 3 Arena works with the NVidia GL libraries too.


Joseph Carter You want fries with that?

  • Knghtbrd wonders what his 18 hour download will break
    It includes glibc, X, python, gcc, and the Debian tools…
    Which means with my luck it will break glibc, X, python, gcc,
    and the Debian tools…

-------------- 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/20020810/59ea73b7/attachment.pgp

Jacek Pop?awski:

Please compare:

ldd glxgears

and:

ldd testgl

Are same libraries used?

drakh:/tmp $ ldd which glxgears
libGL.so.1 => /usr/lib/libGL.so.1 (0x4001d000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40064000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40072000)
libpthread.so.0 => /lib/libpthread.so.0 (0x4014c000)
libm.so.6 => /lib/libm.so.6 (0x40160000)
libc.so.6 => /lib/libc.so.6 (0x40181000)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x4029e000)
libdl.so.2 => /lib/libdl.so.2 (0x4062c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
drakh:/tmp $ ldd /usr/share/doc/libsdl1.2-dev/examples/test/testgl
libm.so.6 => /lib/libm.so.6 (0x4001d000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x4003e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x400a9000)
libc.so.6 => /lib/libc.so.6 (0x400bd000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401da000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x402b4000)
libdl.so.2 => /lib/libdl.so.2 (0x402c1000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

testgl not being linked to libGL.so is OK though, since dlopen is being
used to open the (by default, libGL.so.1) library in
src/video/x11/SDL_x11gl.c.–
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

Joseph Carter:

If you have NVIDIA drivers, look for /usr/X11R6/lib/libGL.a… If you have
it, DELETE IT.

Debian does not follow the OpenGL Linux ABI specification. You’re getting
the wrong library by the looks of it.

I don’t have that file. I do have /usr/X11R6/lib/libGLw.a, though.
Doesn’t look like there’s much in it though.–
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

Cameron McCormack wrote:

Jacek Pop?awski:

Please compare:

ldd glxgears

and:

ldd testgl

Are same libraries used?

drakh:/tmp $ ldd which glxgears
libGL.so.1 => /usr/lib/libGL.so.1 (0x4001d000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40064000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40072000)
libpthread.so.0 => /lib/libpthread.so.0 (0x4014c000)
libm.so.6 => /lib/libm.so.6 (0x40160000)
libc.so.6 => /lib/libc.so.6 (0x40181000)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x4029e000)
libdl.so.2 => /lib/libdl.so.2 (0x4062c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
drakh:/tmp $ ldd /usr/share/doc/libsdl1.2-dev/examples/test/testgl
libm.so.6 => /lib/libm.so.6 (0x4001d000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x4003e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x400a9000)
libc.so.6 => /lib/libc.so.6 (0x400bd000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401da000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x402b4000)
libdl.so.2 => /lib/libdl.so.2 (0x402c1000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

testgl not being linked to libGL.so is OK though, since dlopen is being
used to open the (by default, libGL.so.1) library in
src/video/x11/SDL_x11gl.c.

No, if the GL lib was dynamically loaded at runtime, all gl symbols
would also have to loaded dynamically (via SDL_GL_GetProcAddress),
too. The testgl program doesn’t do that. Relink testgl by hand and
explicitly use /usr/lib/libGL.so and see if that works.

My bet is you have a libGL.a sitting around somewhere.
Locate and destroy.

Cheers,
Frank.–
Need a break? http://criticalmass.sf.net/

BTW many nVidia users after installation of binary drivers have two version of
libGL, this is very annoying: “why the hell hardware rendering is disabled,
when glxinfo shows it’s enabled?”.On Sun, Aug 11, 2002 at 01:08:50PM -0700, Frank Becker wrote:

My bet is you have a libGL.a sitting around somewhere.


http://decopter.sf.net - free unrealistic helicopter simulator

This is because the dists can’t or won’t read the Linux OpenGL ABI
document which states clearly the only place for libGL is /usr/lib and
cites problems like these as justification.On Sun, Aug 11, 2002 at 10:59:01PM +0200, Jacek Pop?awski wrote:

My bet is you have a libGL.a sitting around somewhere.

BTW many nVidia users after installation of binary drivers have two version of
libGL, this is very annoying: “why the hell hardware rendering is disabled,
when glxinfo shows it’s enabled?”.


Joseph Carter We can hope for the future
But there may not be one

Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
they use Borg to do their marketing and Ferengi to do their
programming.
– Simon Slavin

-------------- 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/20020811/512d5b37/attachment.pgp

Frank Becker:

No, if the GL lib was dynamically loaded at runtime, all gl symbols
would also have to loaded dynamically (via SDL_GL_GetProcAddress),
too. The testgl program doesn’t do that. Relink testgl by hand and
explicitly use /usr/lib/libGL.so and see if that works.

My bet is you have a libGL.a sitting around somewhere.
Locate and destroy.

Well I recompiled and everything works fine now. I suspect that the
first time I compiled there was something missing (or perhaps that
static library was present).

Thanks guys,

Cameron–
Cameron McCormack
// @Cameron_McCormack
// http://www.csse.monash.edu.au/~clm/
// icq 26955922

Is there anywhere a website to which I can send people with problems, which
explains what to do? I get more and more complaints about not possible
compiles and crashes. I don’t understand the crashes though. I think I’m
doing everything right, but it doesn’t work. I haven’t tried to use DynGL
yet, will do that in the next release. I hope that will fix the problems.

Florian