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

OS X 10.4.9 GDC 0.23 and derelict glu

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



Joined: 20 Jul 2006
Posts: 17

PostPosted: Thu Mar 29, 2007 7:28 am    Post subject: OS X 10.4.9 GDC 0.23 and derelict glu Reply with quote

Hi again,
And here there's the patch for the glu...
Thanks, Paolo.

Code:

Index: glu.d
===================================================================
--- glu.d       (revision 247)
+++ glu.d       (working copy)
@@ -106,7 +106,7 @@
     DerelictGLU.setup(
         "glu32.dll",
         "libGLU.so,libGLU.so.1",
-        "",
+        "/System/Library/Frameworks/OpenGL.framework/OpenGL",
         &load
     );
 }
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Thu Mar 29, 2007 10:40 am    Post subject: Reply with quote

Added to the trunk. Just to be sure -- there's no issue with loading the OpenGL framework twice from within the same app? Would it be better on Mac to share a single library instance between the two packages?
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Paolo Invernizzi



Joined: 20 Jul 2006
Posts: 17

PostPosted: Sat Mar 31, 2007 2:03 am    Post subject: Reply with quote

aldacron wrote:
there's no issue with loading the OpenGL framework twice from within the same app?


Thanks for the merge.
I'm really a Win32 guy that have just started its Mac life, but I think it's safe. The man page of dlopen states:

Quote:
If the file is compatible with the current process and has not already been loaded into the current process, it is loaded and linked. ... A second call to dlopen() with the same path will return the same handle, but the internal reference count for the handle will be incremented. Therefore all dlopen() calls should be balanced with a dlclose() call.


Ciao
Back to top
View user's profile Send private message
Paolo Invernizzi



Joined: 20 Jul 2006
Posts: 17

PostPosted: Sat Mar 31, 2007 10:13 am    Post subject: Forgot this also! Reply with quote

But I donno the impact over the others derelict modules...
Ciao

Code:
Index: derelict/util/loader.d
===================================================================
--- derelict/util/loader.d      (revision 249)
+++ derelict/util/loader.d      (working copy)
@@ -364,6 +364,9 @@
             }
             else version (linux) {
                 libNameString = linLibs;
+            }
+            else version (Nix) {
+                libNameString = macLibs;
             }
         }
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Sat Mar 31, 2007 11:10 am    Post subject: Reply with quote

I didn't even think about that. Rather than using version(Nix), I wrapped it in a version(darwin) statement. I also added a test to check the assignment for null or empty strings. DerelictGL/GLU are the only packages with Mac lib strings currently, so calling the default load method for any of the others on Mac will now throw a DerelictException since they all have empty strings. That check should have been in long ago, considering that the one-arg version of load() exists.
_________________
The One With D | The One With Aldacron | D Bits
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