I am having an issue under Mac OS <X (pre X). I have a 2d app in which I am
using OGL to draw some alpha graphics. When I go to draw I check to see if
the GWorldPtr is the same as my saved GWorldPtr, if not I go through the
aglChoosePixelFormat and all that. In this particular instance I am always
drawing to the same port so it only hits this body of code once.
After this the GWorld is locked and unlocked and what not as all the normal
drawing takes place. When I get one of these OGL drawn movies I “attach”
which involves checking the current context via an if (
aglGetCurrentContext() != mCtx ) aglSetCurrentContext( mCtx ). This line is
always skipped as I never change my context. The problem is that my drawing
never takes place. If I then destroy the pixelFormat and the context and
therby force the code to go back through the choosePixelFormat and what not
it all works fine.
This code seems to work fine under OSX. So I am wondering what could be
happening to my GWorld that would cause my drawing to fail.
Oh, OGL reports no errors when it fails, it just doesn’t draw.