SDL* and GL bindings
Mike Parker
aldacron71 at yahoo.com
Sun May 21 07:34:32 PDT 2006
Bruno Medeiros wrote:
>
> But since dll's are usually packaged with the game/app itself, isn't a
> missing dll something so rare that it is exaggerated to worry about it
> so much? How can it happen at all, it seems so far-fetched.
That's true for things like SDL and such, but not OpenGL. Sometimes
downloads become corrupted, installations get borked, people delete
files by accident... there are a lot of variables.
When Herb Marselas was still with Ensemble Studios he wrote an article
for Game Programming Gems 2 called "Protect Yourself From DLL Hell and
Missing OS Functions" in which he advocated even loading Win32 API DLLs
manually. I'm not sure I'd go that far, as there are other applications
that would likely barf before a game would. But his reasoning in the
article was sound.
In my own experience, I have gotten the missing DLL message more than
once, from games and other applications, over the years. As absurd as it
sounds, it happens. When your target market is not as computer literate
as the hardcore types, it's best to make it as easy on the user as possible.
>>
>> Derelict really isn't difficult or time consuming to maintain. I just
>
> It's more work than a pure static-link binding, no?
Not much. The only extra work is declaring the function pointers and
implementing the load functions. That's just a matter of copy and paste.
Or for the more industrious, implementing a script to handle it for you.
>
> Wouldn't a pure header conversion work in all platforms that the
> original header works in?...
> It doesn't work on Mac, and it didn't work before in Linux because you
> need to add the code to the dynamic binding, right?
Right. But then that would defeat the purpose of Derelict. Again, the
other bindings already link to the import library statically. Derelict
is meant to provide an alternative.
>
>>
>> For what it's worth, one of the future additions to Derelict is going
>> to be the ability to link statically with an import library and bypass
>> the runtime loading mechanism.
>
> That would be great!
I'm glad you think so, but I still don't understand why. I flip-flopped
on this for a long time, because it means double the effort and I just
don't see the benefit of it versus the current mechanism. Manual loading
is much more flexible, which to me equates to "better". I can't see any
benefit at all to linking statically to the import libraries, other than
the fact that you don't have to call a load method as the OS will handle
that for you. Still, I have gotten messages from a few people who really
see it differently. If adding the feature makes it more convenient for
people, then I don't mind, even if I don't understand.
More information about the Digitalmars-d
mailing list