View previous topic :: View next topic |
Author |
Message |
Paolo Invernizzi
Joined: 20 Jul 2006 Posts: 17
|
Posted: Thu Mar 29, 2007 7:28 am Post subject: OS X 10.4.9 GDC 0.23 and derelict glu |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu Mar 29, 2007 10:40 am Post subject: |
|
|
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 |
|
|
Paolo Invernizzi
Joined: 20 Jul 2006 Posts: 17
|
Posted: Sat Mar 31, 2007 2:03 am Post subject: |
|
|
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 |
|
|
Paolo Invernizzi
Joined: 20 Jul 2006 Posts: 17
|
Posted: Sat Mar 31, 2007 10:13 am Post subject: Forgot this also! |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Mar 31, 2007 11:10 am Post subject: |
|
|
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 |
|
|
|