Hi all,
On Mac OS X, there is a possibility of using a special mechanism for OpenGL
calls, that is, you include CGLMacros.h in your source, and all gl*** calls
take an implicit additional parameter, the context. This makes the use of a
"current active context" unnecessary, gives better performance and it works
better with threads. Developers are encouraged to use that mechanism.

Some apps (thinking of Quartz Composer) strongly suggest that this is used
for their plugins, drawing to the given context, and discourage changing the
current OpenGL context. I guess we're not far from a "suggest" becoming a
"require" in the future.

The way it works is that you have to define a local variable with the name
cgl_ctx, and that variable is passed as first argument to the special gl
calls:

CGLContextObj cgl_ctx = aContext;
glBegin(GL_LINES);   // which actually is like _blaBegin(cgl_ctx, GL_LINES),
because of CGLMacro.h inclusion
// this won't compile if cgl_ctx is not defined



So my question is: what is your thought about integrating this mechanism in
OSG?

Thanks,

Raphael
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to