Richard Airlie wrote:
> I am trying to draw an OpenGL quad at the very end of fgRenderFrame in
> main.cxx, just before the glutSwapBuffers by doing:
>glMatrixMode(GL_MODELVIEW);
>glPushMatrix();
>glLoadIdentity();
> [...]
> This has worked on a few occasions, but not all the time.
If you want to draw into screen space, you'll need to push the
identity matrix onto the *projection* stack as well. Otherwise the
coordinates you are using will end up drawing a 1m x 1m square
parallel to the equatorial plane at the local tile origin. Probably
not what you had in mind. :)
If what you really want to do is draw into 3D space, you should look
at the panelnode.cxx class. This is the wrapper around the 2D panel
code that maps it's internal "screen space" notion into the 3D world.
You could probably clone or hook this to do what you want.
Alternatively, it may be that what you want to do be handled already
(no OpenGL required) by the existing panel framework.
Andy
--
Andrew J. RossBeyond the OrdinaryPlausibility Productions
Sole Proprietor Beneath the Infinite Hillsboro, OR
Experience... the Plausible?
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel