Hello,

I have a question about the OpenGLContexts with Equalizer.

In the Mac OS (as you know) there are multiple APIs for interfacing
with OpenGL.  Equalizer uses AGL (Carbon) while the software I'm
working with uses NSGL/CGL.

Now, NSGL has an object NSOpenGLContext which can be initialized in
the following manner:

NSOpenGLContext *myContext = [[NSOpenGLContext alloc]
initWithCGLContext:];

Can I initialize the NSOpenGLContext with the CGLContext returned from
the AGLContext generated by Equalizer!?

CGLContext cgl_ctx;
if (aglGetCGLContext (AGLContextFromEQ, cgl_ctx)) {
    NSOpenGLContext *myContext = [[NSOpenGLContext alloc]
initWithCGLContext: cgl_ctx ];
}

Or is that going to open a can of worms?

I am only asking this because I'm trying to be minimally invasive with
my re-factoring of this code to make it "just work" as a first-pass
prototype.  Instead of using the standard NSOpenGLView I'm using
MYOpenGLView which will contain/return a NSOpenGLContext that is not
the one created by default for the NSOpenGLView but one created by
Equalizer.

thoughts?  The code I'm working with is *NOT* encapsulated (even with
the MVC cocoa good-practices) at all, and the code which draws openGL
stuff is mixed in with notifications and all this other GUI gunk and
database management.  It's quite a mess so the less I have to change,
the better it will be.

-Stephen

_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Reply via email to