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

Example needed: opengl app on mac os x without sdl

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



Joined: 30 Oct 2007
Posts: 19

PostPosted: Tue Apr 28, 2009 6:27 am    Post subject: Example needed: opengl app on mac os x without sdl Reply with quote

Can anyone please give an example how to create an opengl app with D & DerelictGL without SDL/GLUT?
Back to top
View user's profile Send private message
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Tue Apr 28, 2009 7:40 am    Post subject: Reply with quote

First you need bindings to AGL + Carbon or Cocoa, cocoa also requires a bridge of some kind. There's a bridge (don't know if it has opengl support) available here: http://michelf.com/projects/d-objc-bridge/ it uses Phobos and it's GPL licensed. There is also dwt-mac which uses tango and it's EPL licensed, it's not updated to latest tango and I haven't tested the opengl parts. DWT-Mac contains a limited cocoa bridge but it has opengl support.

Then you just find a Carbon/Cocoa OpenGL tutorial like this: http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html

Or you read the first 1-3(or 5) NeHe tutorials: http://nehe.gamedev.net/ At the bottom of each tutorial download the Mac OS X/Cocoa version of the code and port to D.

I can almost promise you that it will be a lot harder, because there are no complete bindings available.
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Apr 28, 2009 10:59 am    Post subject: Reply with quote

Check out DOG http://team0xf.com:8080/dog/

Specifically , http://team0xf.com:8080/dog/file/e3423d90be83/platform/OSX.d
Back to top
View user's profile Send private message AIM Address
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Wed Apr 29, 2009 2:47 am    Post subject: Reply with quote

That file doesn't do anything. BTW that seems like just another SDL/GLUT, I thought he wanted a tutorial on how to do it native.
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue May 05, 2009 11:39 am    Post subject: Reply with quote

Yea, the link doesn't really have anything. But if he browses through DOG's code, he should be able to find the calls to set up code native on the mac.
Back to top
View user's profile Send private message AIM Address
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue May 05, 2009 11:42 am    Post subject: Reply with quote

http://team0xf.com:8080/dog/file/e3423d90be83/backend/native/OSX.d

~ Clay
Back to top
View user's profile Send private message AIM Address
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Wed May 06, 2009 4:50 am    Post subject: Reply with quote

Yes, but that file imports several files from the xf.platform.osx package which I cannot find. Am I missing something ?
Back to top
View user's profile Send private message
fraz



Joined: 19 May 2008
Posts: 6

PostPosted: Fri May 08, 2009 3:44 am    Post subject: Reply with quote

Try the xf repository: http://team0xf.com:8080/xf/file/98591a571f82/platform/osx/
Back to top
View user's profile Send private message
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