SDL_GL_LoadLibrary - Where do I find this path?

"The path of the GL library is passed to SDL_GL_LoadLibrary and it returns
0 on success, or -1 on an error."
say the SDL docs. So I pass “C:/WINNT/SYSTEM32”, and get back “Could not
load OpenGL library”.
This must be a bug in the docs.
But even if I pass “C:/WINNT/SYSTEM32/OPENGL32.DLL” and everything works,
this is still non-portable.
So my question is: from where do I get this path? Do I have to ask the user?
This would suck badly…

Thanks in advance,

Pius II.

This must be a bug in the docs.

Well, that depends. Certainly people say “the full path of the file”.

But even if I pass “C:/WINNT/SYSTEM32/OPENGL32.DLL” and everything works,
this is still non-portable.

If you don’t pass anything, it just uses the default GL driver for the
system.

So my question is: from where do I get this path? Do I have to ask the user?
This would suck badly…

Yes. It doesn’t suck at all… how else do you expect to get
platform-specific information?

m.On Fri, Jun 08, 2001 at 09:27:16PM +0100, Pius II. wrote:


“So I gave myself to God, @Michael_Vance
there was a pregnant pause” http://linuxgames.com/michael/
before He said ‘Ok’." – Belle and Sebastian

I do not think tou have to pass the whole path.
Passing just OPENGL32.DLL should work since c:\winnt\system32 is supposed
to be the default path for DLLs.
So passing OPENGL32.DLL to window system and libGL.so to ALL unix systems
should always work.

After all these are the default values used internally by SDL. So if you
do not want to use any other library than these, you could even never call
SDL_GL_LoadLibrary.

Oddly, sometimes by programs failed to start when I didn’t call
SDL_GL_LoadLibrary, so the safest method is to pass “libGL.so.1” for unix
and “OPENGL32.DLL” for windows.

This function is very usefull though. Have you noticed that in quake you
can select the opengl driver? You could use the function to load e.g. a
MiniGL 3dfx driver which you could provide with your application
distribution. Of course, since all 3d cards have full opengl drivers
nowdays this could not be very usefull.

Hope it helpsOn Fri, 8 Jun 2001, Pius II. wrote:

"The path of the GL library is passed to SDL_GL_LoadLibrary and it returns
0 on success, or -1 on an error."
say the SDL docs. So I pass “C:/WINNT/SYSTEM32”, and get back “Could not
load OpenGL library”.
This must be a bug in the docs.
But even if I pass “C:/WINNT/SYSTEM32/OPENGL32.DLL” and everything works,
this is still non-portable.
So my question is: from where do I get this path? Do I have to ask the user?
This would suck badly…

Thanks in advance,

Pius II.

But even if I pass “C:/WINNT/SYSTEM32/OPENGL32.DLL” and everything
works,

this is still non-portable.

If you don’t pass anything, it just uses the default GL driver for the
system.

Aaah, this is much better. Perhaps the docs should mention that you can
simply give NULL as the path.
I thought I had to find out the exact location of the local GL flavour :slight_smile:

Thanks!