View previous topic :: View next topic |
Author |
Message |
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Feb 12, 2005 8:42 pm Post subject: GLX |
|
|
John Reimer submitted bindings for the glx* OpenGL functions, and I have added glx.d to DerelictGL. I also modularized the package to reduce the size of gl.d and ease maintenance. From a user's perspective, you still only need import derelict.opengl.gl. But if you want to dig around the source, all of the OpenGL functions have been moved out into glfuncs.d, and the wgl* stuff to wgl.d. Each module has its own package-protected load function (loadGL for glfuncs.d and loadPlatformGL for wgl.d and glx.d), so that's where you need to look if any function loading problems arise.
As always, this has not been tested. I modified glx.d a bit from John's original, so I may have broken something there or in one of the other new modules. It all compiles on Windows though |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sat Feb 12, 2005 10:11 pm Post subject: |
|
|
Mike,
It seems the svn is missing some files in derelict.opengl;
the gl.d module is there, but no glx.d, glint.d, wgl.d, or glfuncs.d.
Have you added them yet?
Thanks,
John R. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sun Feb 13, 2005 1:03 am Post subject: |
|
|
Thanks. I forgot to add the new files to the working copy. All is well with the trunk now. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Feb 13, 2005 2:40 am Post subject: |
|
|
Great! Thanks!
I've found a couple errors in glx.d. If you could make the changes for me, I'd appreciate it.
lines 26 and 34 --> "ulong" should be "uint"
I thought I had corrected most of those mistakes, but a few must have slipped through the crack. I forgot that C's "unsigned long" actually translates to D's "uint." I wish the languages would use variable types with clearly indicated bit sizes.
John R. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sun Feb 13, 2005 4:22 am Post subject: |
|
|
Fixed. Since you are doing so much work on Derelict lately I'll ask Brad to give you commit privs. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Feb 13, 2005 4:56 am Post subject: |
|
|
That would be great, thank you.
You'll probably end up still having to fix up packages I commit to get them to conform to your Derelict design. But as long as you don't mind that, then I'm happy.
For any larger additions than fixes, I could confirm what you want done before I make any commits.
Later,
John R. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Feb 14, 2005 11:04 am Post subject: |
|
|
I was going through the changes to gl and glx.
As it works now, glx imports gl to have access to its "getProc" function, but gl imports glx to provide global access to glx's function list. Is this binary dependency intended? Although dmd handles it fine, it seems slightly confusing. Maybe getProc should be moved to another module?
All the best,
John R. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Mon Feb 14, 2005 9:03 pm Post subject: |
|
|
I added a file 'internal.d' to the gl package and moved all of the responsibility for the shared lib there. I also stripped out all references to OpenGL in the error strings and variable names (except the module declaration), as I think I may reuse this in the future. I'm thinking about restructuring DerelictSDL in the same way, i.e. each module is responsible for loading its own functions and sdl.d only contains the publicly exposed imports and load functions. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Feb 14, 2005 9:58 pm Post subject: |
|
|
Perfect! I like it.
Note that internal.d didn't get added to the svn update. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Tue Feb 15, 2005 1:55 am Post subject: |
|
|
Gah! Why do I keep forgetting to add stuff? It's in now |
|
Back to top |
|
|
|