FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GLX

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Feb 12, 2005 8:42 pm    Post subject: GLX Reply with quote

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 Smile
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sat Feb 12, 2005 10:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sun Feb 13, 2005 1:03 am    Post subject: Reply with quote

Thanks. I forgot to add the new files to the working copy. All is well with the trunk now.
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Feb 13, 2005 2:40 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sun Feb 13, 2005 4:22 am    Post subject: Reply with quote

Fixed. Since you are doing so much work on Derelict lately I'll ask Brad to give you commit privs.
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Feb 13, 2005 4:56 am    Post subject: Reply with quote

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
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Feb 14, 2005 11:04 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Feb 14, 2005 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Feb 14, 2005 9:58 pm    Post subject: Reply with quote

Perfect! I like it.

Note that internal.d didn't get added to the svn update.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue Feb 15, 2005 1:55 am    Post subject: Reply with quote

Embarassed Gah! Why do I keep forgetting to add stuff? It's in now
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group