Does SDL Load OpenGL library twice

Hi All,
Someone on the JEDI-SDL mailing list posed the following question, and as I am not familiar with SDL’s internals I said I would refer it to this newsgroup…

Does SDL Load the OpenGL library twice.

ie:

  • SDL.dll loads and binds itself to OpenGL12.dll
  • SDL.dll performs the initializations
  • OpenGL12.pas loads and binds itself to OpenGL12.dll
  • program uses bindings in OpenGL12.pas

The “OpenGL12.dll” will be the same DLL, and Windows
won’t load it twice, but if hardware acceleration is used, the
real functions used will be those of nvOpenGL.dll (f.i.),
I’m just wondering if there won’t be circumstanced in which
SDL’s OpenGL12.dll won’t be the same as the one loaded
by OpenGL12.pas.
This being asserted by the fact that SDL offers a function to
dynamically bind to the OpenGL function… So when using
SDL, it might be better to use the SDL’s GetProcAddress
function instead of the API’s GetProcAddress function
used in OpenGL12.pas (though they may be the same thing
in the current implementation).
Not sure if this explanation is clearer ; )

Any insight into this would be greatly appreciated.

Thanks,

Dominique
http://www.DelphiGamer.com

This being asserted by the fact that SDL offers a function to
dynamically bind to the OpenGL function… So when using
SDL, it might be better to use the SDL’s GetProcAddress
function instead of the API’s GetProcAddress function
used in OpenGL12.pas (though they may be the same thing
in the current implementation).

It’s better to use SDL’s GetProcAddress when using SDL.
It should be the same, but in case it isn’t, you’ll avoid some
very strange crashes. :slight_smile:

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