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

Conflicts with glx
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Wed May 18, 2005 6:44 pm    Post subject: Conflicts with glx Reply with quote

I've run into problems with derelict.opengl.gl publicly importing derelict.opengl.glx. It causes lots of conflicts in my projects, having declared names like Window or Font. My suggestion is that gl should **privately** import glx (and for the sake of consistency, wgl) since it's almost never needed at all. The code that needs these should IMO use a version() and import glx or wgl privately as well. I've modified my own copy of Derelict this way and I can see no downsides.

Greetz,
Tom
Back to top
View user's profile Send private message MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed May 18, 2005 6:51 pm    Post subject: Reply with quote

Sounds like a good idea. Mike, what do you think? I tend to agree that the library user should explicitly import glx if they need it anyway..

-JJR
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Thu May 19, 2005 5:47 am    Post subject: Reply with quote

Works for me. I guess it will have to be the same for wgl. But, what I will do is move the stuff out into separate modules and import them privately from there. That way, people who want to use those extra declarations (when going through the Win32 API for example) will be able to without looking for a separate library. Perhaps I should patch that stuff into std.c.windows.windows and send it to Walter.
Back to top
View user's profile Send private message Send e-mail
aldacron



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

PostPosted: Tue May 24, 2005 10:57 am    Post subject: Reply with quote

Okay, I've got wgl sorted. That's in the trunk now. I'm not too confident on the glx stuff, though. If anyone else can get to it before I can, I'd appreciate it.
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue May 24, 2005 8:39 pm    Post subject: Reply with quote

I'll check it out as soon as I can....
Back to top
View user's profile Send private message
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Wed May 25, 2005 10:30 am    Post subject: Reply with quote

IMO these definitions in glx.d can cause lots of problems (they do in my case):

typedef void Display;
typedef XID Pixmap;
typedef XID Font;
typedef XID Window;

And they still do with the new version from the trunk.
In my experience, gl.d should not import glx nor wgl at all. If someone needs these platform specific tools, they should import glx or wgl explicitly. And if this is too much hassle for the user, maybe there should be derelict.opengl.foobar (or some more reasonable name Wink) that imports all of these (assuming there will be more, like glmac, etc), enclosed in a few 'version' statements.
Back to top
View user's profile Send private message MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed May 25, 2005 10:41 am    Post subject: Reply with quote

I haven't made any changes yet to the glx import. I'll have a look promptly. I agree that importing glx should be a user decision.

-JJR
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed May 25, 2005 10:55 am    Post subject: Reply with quote

Oops... sorry, looks like I no longer have commit access to this project. I can't help here.

It looks like Mike hasn't changed the public imports in gl.d still. Linux and Win32 versions still import glx and wgl.

Maybe he can update both.

-JJR
Back to top
View user's profile Send private message
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Wed May 25, 2005 10:55 am    Post subject: Reply with quote

Damn, sorry. I thought you meant "I'll check if everything's fine with it" by saying "I'll check it out as soon as I can...." Rolling Eyes
No hurry then, When I remove the glx and wgl imports from gl.d, everything's fine Smile
Back to top
View user's profile Send private message MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed May 25, 2005 10:59 am    Post subject: Reply with quote

h3r3tic wrote:
Damn, sorry. I thought you meant "I'll check if everything's fine with it" by saying "I'll check it out as soon as I can...." Rolling Eyes
No hurry then, When I remove the glx and wgl imports from gl.d, everything's fine Smile


Ha! Well actually I did mean that! I totally forgot the double meaning. What happened there is that I actually never got around to investigating until your brought it up again today.

Indeed, I noticed that the fix appears simple. Like you said, just removing the glx and wgl imports from gl.d should do it.

-JJR
Back to top
View user's profile Send private message
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Wed May 25, 2005 11:00 am    Post subject: Reply with quote

JJR wrote:
Indeed, I noticed that the fix appears simple. Like you said, just removing the glx and wgl imports from gl.d should do it.


Cool, so it appears that I've got the most up-to-date version of Derelict, with these already removed Wink
Back to top
View user's profile Send private message MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed May 25, 2005 11:03 am    Post subject: Reply with quote

Yep... looks that way... you lucky guy you!

That's almost like time travel, eh?
Back to top
View user's profile Send private message
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Wed May 25, 2005 11:05 am    Post subject: Reply with quote

JJR wrote:
That's almost like time travel, eh?


Looks like I'm not the only one experiencing extraordinary phenomena:
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4155
Back to top
View user's profile Send private message MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed May 25, 2005 11:09 am    Post subject: Reply with quote

Shocked Laughing

That was a killer! Thanks for the link. I didn't see it on the newsgroup.

-JJR
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Wed May 25, 2005 7:13 pm    Post subject: Reply with quote

The fix is now in the trunk: gl.d no longer imports wgl or glx. And I'll ask Brad to get you back on the commit list, John. I thought you still could.
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
Goto page 1, 2  Next
Page 1 of 2

 
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