Re: [PyOpenGL-Users] Extensions, etc
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2003-08-12 11:57:02
|
Brian Hammond wrote: >* Mike C. Fletcher <mcf...@ro...> [2003-08-11 23:09]: > > >>Writing the .i file is not a particularly difficult task (there's a lot >>of samples in the interface directories), but it requires effort by a >>developer for every extension so supported. >> >> > >Ok - Why though? Maybe I am too naive with this but can't this be >automated as well? AFAIK you have to expose the enumerations and the >functions, both of which you have access to from the specs, no? > For simple modules, this works. The wrapping of an extension module is as "automated" as the rest of the PyOpenGL system (which is fairly automated for the bulk of OpenGL). The thing is that there are certain types of things that just don't have any automated machinery. For instance, we don't currently have anything to automate generating wrappers around Python callbacks. We also manually encode information regarding parameters that should not be passed in for the Python versions (i.e. array-length variables or the like). If an extension doesn't require any of that special handling it's basically just the .h file for the extension with some boilerplate wrappers to make it get recognised by the system. Creating *those* extensions with an automated script should be quite easy. >>Even more restrictively, it >>requires that the developer *have* that extension on their machine so >>that they can *test* it. My old Radeon 7500 has very few of the >> >> > >Whoa - I wasn't expecting that... Testing that the extension is callable >is part of the build process? I would think that having the function >ptr exposed would be all you'd need to do. > It's not part of the build process, it's part of the *development* process. Sending out code that's never been run tends to cause a lot of headaches. There's actually quite a bit of it in PyOpenGL's extensions (for exactly this reason), but I'm *not* a fan of doing it for any non-trivial extension (i.e. one where we have to write *code* in the wrapper). I'm serious when I say feel free to contribute a script to do the downloading and wrapping automatically (that goes for anyone). It would probably allow access to quite a few extensions not currently supported. I just don't have time to do it, as there are lots of things on my todo list that are already languishing for all 8 or 9 projects I'm running. ... >>likely be a few years before they do (unless Microsoft decides to write >>one)). >> >> > >I don't think they're doing any new OGL drivers other than 1.1 AFAIK > My impression too. The ARB still seems to be hoping they will, but it just doesn't seem likely that they'll do all that work just to help people remain cross-platform. After all, they *want* developers to lock into Direct3D (and therefor Windows). Enjoy, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |