As it turns out, you can’t depend on SDL_GL_GetProcAddress to return the
function with some broken (Win32) drivers at the moment.
Basically, some wglGetProcAddress implementations (3dfx) can’t return
non-extension functions. And to complicate matters, the native Win32
function may not work on extension functions since the driver may export
only one function name, but return the same pointer for various requests
when you use wglProcAddress.
So:
wglGetProcAddress (“glBindTexture”) <-- fails for 3dfx
GetProcAddress (hInst, “glLockArraysEXT”) <-- fails for TNT
Lovely, innit? I haven’t got time to completely implement the fix now,
but here is the rough fix for this purpose:
func = NULL;
if ( video->GL_GetProcAddress ) {
if ( video->gl_config.driver_loaded ) {
func = video->GL_GetProcAddress(this, proc);
if ( !func ) {
SDL_LoadFunction (video->GL_Handle, proc);
}
} else {
SDL_SetError("No GL driver has been loaded");
}
} else {
SDL_SetError("No dynamic GL support in video driver");
}
Basically, if the normal allocation method fails, try to get the symbol
the hard way. If that fails, you’re screwed. Note, as I’ve done this
here, you will need to add GL_Handle to SDL_sysvideo.h - I didn’t see
something similar in there.
I wish I could provide a real patch right now, but I am a bit busy working
out a decent smarthost arrangement so I can send mail to the SourceForge
projects I am part of. You see, VA Software has decided discrimination
against connection classes is effective spam prevention. They have told
me their position is that the users unfairly blacklisted as spammers are
an acceptable cost, and if my ISP sucks too much to rely on their
smarthost then I should get a better ISP - regardless of how much more
that will cost me. They feel dialup block blacklisting is at least as
effective as active scoring spam detection tools such as spamassasin, and
while they plan to install specifically spamassasin, the DUL blacklisting
will probably continue.
This means I can’t even control my own projects. I’m quite fed up with
the attitude of VA Software in recent months, the evil-looking usage
policy changes, the cronjobs that crash several times a day, the long PR
resolution times (and the number of PRs resolved as “we won’t fix this”),
and in general the whole mess. I’m looking for alternative hosting, and I
can provide a smallish server for the task if there’s someplace to put it.
I would ask Ryan about icculus.org, but SSI has some commercial ambitions
even if all of our code is GPL, so I feel somewhat uncomfortable taking up
his bandwidth with something that may one day down the line be returning
us some measure of financial profit.
I originally had planned to try and pay for some hosting, but I was hoping
to not need to worry about that until after that potential financial
return came in so I could afford to do so. ;)–
Joseph Carter No conceit in my family
That reminds me, we’ll need to buy a chainsaw for the office. “In
case of emergency, break glass”
-------------- 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/20020515/43b1c240/attachment.pgp