We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 27 - Make SDL_GL_LoadLibrary() accept NULL.
Summary: Make SDL_GL_LoadLibrary() accept NULL.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-03 12:28 UTC by Ryan C. Gordon
Modified: 2006-03-09 10:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2006-01-03 12:28:52 UTC
Make SDL_GL_LoadLibrary() accept NULL to mean "choose a reasonable default for
the platform."

--ryan.



Sam's approval:

To: "A list for developers using the SDL library. \(includes SDL-announce\)"
<sdl@libsdl.org>
Subject: Re: [SDL] Bug with dynamic GL loading
From: Sam Lantinga <slouken@twomix.devolution.com>
Date: Sat, 10 Sep 2005 20:52:11 -0700

> > I'm inclined to think we should just explicitly say "NULL will try to
> > pick a reasonable default for the given platform" since it shouldn't
> > break any existing programs and it removes the need for those nasty
> > #ifdefs in every SDL program.

> That would be *much* better, yes. You could even make it a constant:

> #define SDL_DEFAULT_GL_LIBRARY_PATH    NULL

Sounds good to me...

        -Sam Lantinga, Software Engineer, Blizzard Entertainment
Comment 1 Ryan C. Gordon 2006-01-03 12:29:07 UTC
Date: Tue, 22 Nov 2005 03:52:15 -0500
From: "Ryan C. Gordon" <icculus@icculus.org>
To: sdl@libsdl.org
Subject: [SDL] GL on photon, gem, dc, cybergfx...

As discussed earlier, we're changing SDL_GL_LoadLibrary() to explicitly 
consider NULL to mean "the most reasonable default library for the 
current platform" ... this means we won't have to hardcode every app to 
have:

#if WINDOWS
#define GLLIB "OPENGL32.DLL"
#elif LINUX
#define GLLIB "libGL.so.1"
#elif MACOSX
#define GLLIB "/System/Library/Frameworks/OpenGL.framework"
#else
#error please define your platform
#endif
lib = SDL_GL_LoadLibrary(GLLIB);

However, I need to know WHAT the reasonable default is for the following 
platforms:

photon
gem/ataricommon
dc (is there any real GL_LoadLibrary facility here?)
cybergfx (is there any real GL_LoadLibrary facility here?)

Thanks,
--ryan.

Comment 2 Ryan C. Gordon 2006-01-03 12:29:27 UTC
gem/ataricommon is apparently good to go.

--ryan.

Comment 3 Ryan C. Gordon 2006-01-04 14:19:19 UTC
Reinitiating nagging on the mailing list...

--ryan.

Comment 4 Ryan C. Gordon 2006-01-04 14:23:18 UTC
"dc" apparently just statically links (and ignores any input to SDL_GL_LoadLibrary()).

--ryan.

Comment 5 Ryan C. Gordon 2006-01-04 14:27:17 UTC
Oh, wait, looks like it's the same deal for cybergfx.

--ryan.

Comment 6 Ryan C. Gordon 2006-01-04 14:36:17 UTC
Sent Mike Gorchak email, hopefully he'll know about the photon driver.

--ryan.

Comment 7 Ryan C. Gordon 2006-01-27 11:23:06 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

Comment 8 Sam Lantinga 2006-03-09 10:08:01 UTC
This is implemented in CVS.