Author |
Message |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Fri Oct 03, 2008 2:31 pm Subject: Derelict on Mac OS X - another solution |
I have ported everything now but there are some functions missing like:
SDL_main, SDL_malloc, SDL_free and so on. I replaced SDL_malloc and others with the corresponding functions from std but I don' ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Fri Oct 03, 2008 2:14 pm Subject: Derelict on Mac OS X - another solution |
In SDLmain.m there are these lines:
/* Use this flag to determine whether we use SDLMain.nib or not */
#define SDL_USE_NIB_FILE 0
/* Use this flag to determine whether we use CPS (docking ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Sat Sep 27, 2008 11:17 am Subject: Re: Objective-C in D? |
When loading SDL, we already load Cocoa, why should we try to load it a second time?
Well, my point was that you actually don't load it a second time. No matter how many calls you make to dlopen (or ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Thu Sep 25, 2008 2:51 pm Subject: Re: Objective-C in D? |
If SDL is already linked to Cocoa can't I use regular function declarations like this:
extern (C) char* registerName(char*);
Or do I still have to use "Derelict_GetProc", i ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Thu Sep 25, 2008 2:26 pm Subject: Re: Objective-C in D? |
Actually, as SDL is linked to Cocoa, we can directly use the SDL SharedLib handle to get the function pointers. I think it's cleaner and it avoids an unnecessary dynamic load and handle management.
... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Tue Sep 23, 2008 1:17 pm Subject: Re: Objective-C in D? |
To load the Cocoa framework and get function pointers, you should do something like this:
import derelict.util.loader;
SharedLib cocoa = Derelict_LoadSharedLib("Cocoa.framework/Cocoa" ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Sun Sep 21, 2008 3:30 pm Subject: Re: Objective-C in D? |
I could use a sample code to test with
Here is a simple test program.
import derelict.opengl.gl;
import derelict.util.exception;
import derelict.sdl.sdl;
import std.stdio;
import std.string;
... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Fri Sep 19, 2008 10:29 am Subject: Re: Objective-C in D? |
Yes I think it's possible, you can do everything you can do in objc with the runtime functions I mentioned. It's a little tricky to create a new class that extends a objc class this way but it's possi ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Thu Sep 18, 2008 2:22 pm Subject: Objective-C in D? |
It’s funny that we have activity on this topic now. I didn't work on the problem since my last post until last week, where I played with SDLmain.m to try to be able to use it without the main() rede ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Tue Apr 22, 2008 2:54 pm Subject: Re: Derelict on Mac OS X - another solution |
Actually it should be @executable_path/../Frameworks to make it search in the Frameworks directory of the current application bundle.That's right, indeed (see [url=http://developer.apple.com/documenta ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Sun Apr 06, 2008 3:40 am Subject: Sharing OpenGL handle between GL and GLU on Mac OS X |
Calling dlopen multiple times on the same library isn't an issue. I just consulted the spec to be sure:
Only a single copy of an object file is brought into the address space, even if dlopen() is i ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Sat Apr 05, 2008 5:36 pm Subject: DerelictGLU not working on Mac OS X |
Indeed, the library paths for DerelictGLU for Mac OS X are empty. Actually, since the OpenGL framework contains libGLU.dylib, the GLU library is already loaded if the former is loaded and the GLU symb ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Sat Apr 05, 2008 4:38 pm Subject: SDL with Derelict on Mac OS X: not completely resolved yet |
DerelictGL now compiles correctly on Mac OS X. I fixed the DerelictGLContext-related issues in revision 288.
Regarding the SDL_main problem, an easy and clean solution hasn't been found yet, though ... |
Topic: darwin - DerelictGLContext is not defined |
hugues
Replies: 8
Views: 16469
|
Forum: Derelict Posted: Sat Apr 05, 2008 3:02 pm Subject: DerelictGLContext on Mac OS X fixed in revision 288 |
DerelictGL now compiles correctly on Mac OS X. I fixed the DerelictGLContext-related issues in revision 288.
Regarding the SDL_main problem, an easy and clean solution hasn't been found yet, though ... |
Topic: Derelict on Mac OS X - another solution |
hugues
Replies: 81
Views: 104721
|
Forum: Derelict Posted: Tue Apr 01, 2008 2:33 pm Subject: Re: SDL and OpenGL with Derelict on Mac OS X |
I was wondering about how to get rid of SDLmain.m and couldn't find an answer before finding your post. I didn't try your solution yet, but I'm confident knowing you succeeded to port your game.
Bear ... |
|