OpenGL & PowerPlant

In case someone else is using OpenGL in PowerPlant, here’s something I’m breaking my head on. I’m using the OpenGL PP class from www.metrowerks.com/powerplant and ran into a weird problem. If I have more than one window with an OpenGL pane running, drawing and updating mess up big. For one thing, some windows may never draw gl scenes or it get all mixed up. I’m curious if anyone else has been trying this class.

Ok, I solved my own problem. The OpenGL Pane class from the metrowerks site (or actually, the carbonized version) has one little “bug”. The only function that sets the current context is DrawSelf(), but DrawSelf() isn’t always the only function calling the OpenGL drawing function. So I moved the

aglSetCurrentContext( mCtx );

function in DrawSelf to the DrawGL() function. Smooth!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.