[quote=“Sam Lantinga”]SDL includes glu.h in SDL_opengl.h for convenience.? Maybe it should be optional?
imho it would be better, because glu it is not a core library and it would be not always updated with gl and glx (or wgl) or provided by default (nvidia driver libraries seem not provide any glu function)On Mon, Nov 23, 2009 at 3:34 AM, consultit <@consultit (@consultit)> wrote:
[quote]
orkaboy wrote:
Hello!
I have a problem with opening OpenGL context on my Linux box. I’m trying to get openGL 3.2 to work, using SDL 1.3 for context/window creation.
My system:
Ubuntu 9.04, 64bit
nVidia GeForce 9800 GTX
Part of glxinfo output:
…
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 9800 GTX/9800 GTX+/PCI/SSE2
OpenGL version string: 3.2.0 NVIDIA 190.42
OpenGL shading language version string: 1.50 NVIDIA via Cg compiler
…
(Indicating that the 3.2 enabled driver, 190.42, installed using nVidias own installer, works).
I have tried to make a openGL 3.2 context using GLX, which works without problems.
libGL.so points to the correct driver (libGL.so.190.42), so there should not be any parts of the old, Ubuntu-supplied nVidia drivers left on the system.
However, when I try to follow these instructions to test openGL using SDL 1.3 (installed from the newest svn), I run into problems:
“http://www.opengl.org/wiki/Tutorial1:Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL(C_/SDL) (http://www.opengl.org/wiki/Tutorial1:Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL%28C/_SDL%29)”
The compilation works without warnings, but when I try to create a context, it fails, giving the following error:
Unable to create window: No OpenGL support in video driver
(Bold part is from SDL_GetError() )
I have tried to write the current SDL version using http://sdl.beuc.net/sdl.wiki/SDL_VERSION (http://sdl.beuc.net/sdl.wiki/SDL_VERSION) :
SDL compile-time version 1.3.0
SDL runtime version 1.3.0
…so there is no problem with my opengl installation, no apparent problem with my SDL installation… yet I get runtime errors, complaining on no driver support.
Any ideas? Using the nVidia drivers supplied in Ubuntu and SDL 1.2, I previously had no problems using opengl through SDL (but then I cant use 3.2).
The problem may be that SDL 1.3 (from subversion) will enable opengl support, during installation, if it finds these 3 includes
/usr/include/GL/gl.h
/usr/include/GL/glx.h
/usr/include/GL/glu.h
but the NVIDIA installer (the last stable is NVIDIA-Linux-x86_64-190.42-pkg2.run) do not put /usr/include/GL/glu.h so you have to supply one (obviously you should not use any glu function, unless you know what you are doing)