[eq-dev] Newbie Question: Multiple Mac OpenGL APIs
Stephen Furlani
stephen.furlani at gmail.com
Wed Dec 30 20:28:17 CET 2009
Hello,
I seem to be flooding the list with questions, sorry.
I'm having a bit of difficulty resolving all these different OpenGL APIs on
the Mac OS. The program I want to edit to put on Equalizer normally renders
to an NSOpenGLView. NSOpenGLView has a NSOpenGLContext. But the program
renders everything through a CGLContext: (I'm paraphrasing the code)
CGLContextObj *cgl_ctx = [[NSOpenGLView getContext] getCGLContext];
[cgl_ctx makeCurrentContext];
glBegin(...);
glFinish(...);
If I want it to use Equalizer I should do something similar to this?
CGLContextObj *cgl_ctx = aglCreateCGLContext( someFunction(), ... );
[cgl_ctx makeCurrentContext];
glBegin(...);
glFinish(...);
where someFunction() goes out and returns a pointer to a RenderContext
(provided I setup my nodes, channels, windows, etc. correctly).
Since OpenGL is a state machine, if I set some glContext to be the
CurrentContext, it shouldn't matter what context it is. Equalizer then
handles the subsequent OpenGL calls to its RenderContext.
Do I have it right? Is there more refactoring that needs doing assuming
I've setup my Client, Server, Pipes, Nodes etc correctly?
Thanks,
-Stephen Furlani
--
View this message in context: http://n2.nabble.com/Newbie-Question-Multiple-Mac-OpenGL-APIs-tp4233648p4233648.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
More information about the eq-dev
mailing list