Re: [osg-users] GraphicsWindowCocoa : Cocoa backend for osgViewer

2009-02-26 Thread Sylvain MARIE


I would download one of the cocoa-samples from apple which  
demonstrates

the creation of window + opengl context, download the current svn from
SDL and look at its cocoa-implementation and then fill the missing
pieces of a newly created GraphicsWindowCocoa class.


I'm now reading tons of docs: the SDL Cocoa implementation, the Apple  
samples, and the osgViewer code.
As osgViewer and Cocoa are quite new to me I might need some time to  
swallow it all :-/

Sure you can borrow bits of code from osgViewerCocoa but they use
different design approaches: osgViewerCocoa embeds an osgViewer into a
NSApplication with their classes, what you want is to embed a  
NSWindow /

NSOpenGlContext into a GraphicsWindowCocoa class.


Understood. Will stick to the SDL-Cocoa integration model then.

I started one [implementation], but stopped it, because there was no  
really need on my

side, and it's still bare bone without much functionality.


Unfortunately there's some more work to do, some functionality could  
be
refactored and used by both implementations (the automatic hiding of  
the

menubar etc)

Great! Would you mind sharing your initial work? Anything speeding up  
the osgViewer/Cocoa is welcome.
And I can definitely live with some limited implementation for a  
start :-)

We could add the shared contexts, fullscreen mode, etc. later, right?

If you want we can tackle this task together, I have some sparetime
available and know Objective C a bit.



I'm _not_ going to refuse any help! :-)

OK I'm back to my lectures, hoping to be able to attack/enhance the  
osgViewer/Cocoa backend ASAP


Thanks
Sylvain
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] GraphicsWindowCocoa : Cocoa backend for osgViewer

2009-02-25 Thread Sylvain MARIE


Hi,

I would like to use OSG 2.8 (with Qt 4.5rc1) on Leopard, in 64bit,  
using the Cocoa framework.

That means I need osgViewer to use Cocoa instead of Carbon.
I read and tried to understand http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/MacOSX10.5 
 and scouted the mailing list.

It looks like nobody submitted GraphicsWindowCocoa yet.

Before I take the plunge and try to implement GraphicsWindowCocoa (I'm  
a complete Objective-C newbie), I would like to check with you guys  
the best approach:


1. Read 50x the osgViewerCocoa sample and GraphicsWindowCarbon code
2. Detect the common pattern between the 2 approaches
3. Implement GraphicsWindowCocoa in the osgViewer framework
4. Use GraphicsWindowCocoa when OSG is compiled in 64 bits on Apple  
hardware (simple #ifdef in osgViewer/Graphicswindow)
5. Submit the code so more skilled developers pinpoint my errors and  
get the ball rolling


Sounds like a plan ? Did anyone already work on coding the Cocoa  
backend for osgViewer?


Cheers
Sylvain

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org