View previous topic :: View next topic |
Author |
Message |
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
Posted: Wed May 18, 2005 6:44 pm Post subject: Conflicts with glx |
|
|
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 |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 18, 2005 6:51 pm Post subject: |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu May 19, 2005 5:47 am Post subject: |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Tue May 24, 2005 10:57 am Post subject: |
|
|
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 |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue May 24, 2005 8:39 pm Post subject: |
|
|
I'll check it out as soon as I can.... |
|
Back to top |
|
|
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
Posted: Wed May 25, 2005 10:30 am Post subject: |
|
|
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 ) that imports all of these (assuming there will be more, like glmac, etc), enclosed in a few 'version' statements. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 25, 2005 10:41 am Post subject: |
|
|
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 |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 25, 2005 10:55 am Post subject: |
|
|
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 |
|
|
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
Posted: Wed May 25, 2005 10:55 am Post subject: |
|
|
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...."
No hurry then, When I remove the glx and wgl imports from gl.d, everything's fine |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 25, 2005 10:59 am Post subject: |
|
|
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...."
No hurry then, When I remove the glx and wgl imports from gl.d, everything's fine |
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 |
|
|
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
Posted: Wed May 25, 2005 11:00 am Post subject: |
|
|
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 |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 25, 2005 11:03 am Post subject: |
|
|
Yep... looks that way... you lucky guy you!
That's almost like time travel, eh? |
|
Back to top |
|
|
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Wed May 25, 2005 11:09 am Post subject: |
|
|
That was a killer! Thanks for the link. I didn't see it on the newsgroup.
-JJR |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed May 25, 2005 7:13 pm Post subject: |
|
|
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 |
|
|
|