On 28. Jan 2010, at 21:56, Stephen Furlani wrote:
> I'm trying to get the CGLContextObj in the NSOpenGLView to point to
> the CGLContextObj created by Equalizer (in the AGLWindow).  I'm doing
> it in the "main" section of the software...
> 
> It's a horrible idea, I know, but it was a shortcut instead of re-
> writing 56 calls to [self getCGLContext] (in one class, out of 12
> classes).  I need the cgl_ctx out of equalizer anyway, so I thought
> I'd kill 2 birds with one stone.  (You'd think for a program whose
> sole purpose is to render textures on rectangles would have
> encapsulated the rendering portion of their software, but no.)

The difficulty with this approach is that you have to be very careful on how 
you handle your OpenGL context. The main issues are described in [1], which 
should bring you up to speed regarding the does and don'ts of OpenGL and 
multi-threading.

The easiest really is to do all your GL stuff in Equalizer from 
Channel::frameDraw. If it helps to have your application window in the main 
thread (and other Eq-windows in other threads), have a look at non-threaded 
pipes. They are not recommended though, since there are a couple of performance 
issues with scalable rendering modes.

> I'd really rather not have to re-write the entire rendering/GUI/
> database portions of the software right now... but it looks like I
> won't have that luxury.

In my experience this often is the faster (or only) way, because otherwise 
you'll be in a lot of pain figuring out all the bugs and errors in your 
approach.


Cheers,

Stefan.

[1] http://www.equalizergraphics.com/documentation/parallelOpenGLFAQ.html



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

Reply via email to