Ran Yakir (rany++at++bvr.co.il)
Wed, 17 Jan 1996 07:57:23 +0000
The way to do this as follows :
In the channel draw callback :
....
pfDraw();
#ifdef IRISGL
mmode (MPROJECTION);
ortho2 (-1.0, 1.0, -1.0, 1.0);
mmode (MVIEWING);
pfPushIdentMatrix();
/*
* Now, you have a coordinate system which correspondes to viewport
* coordinates
*/
pfPushState();
pfBasicState(); /* no transparency, texture, etc. */
zbuffer (FALSE);
bgnline();
v2f( ...)
....
endline();
zbuffer (TRUE);
pfPopState();
pfPopMatrix();
#else
glMatrixMode (GL_PROJECTION);
glLoadIdentity();
gluOrtho2D (-1.0, 1.0, -1.0, 1.0);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity();
pfPushState();
pfBasicState(); /* no transparency, texture, etc. */
glDisable (GL_DEPTH_TEST);
glBegin (...);
....
glEnd();
glEnable (GL_DEPTH_TEST);
pfPopState();
#endif
If you want you 3D coordinate system later, you might want to save the
projection matrix (in IrisGL) or push it (in OpenGL), and retrieve it later.
Overlay has nothing to do with coordinate system. You might go into overlay and
continue drawing with the same 3D transformations.
Ran
--
__ | Ran Yakir
/_) _ __ \ / _ / o __ | Graphics App. Chief Engineer
/ )_ (_(_) ) \/ (_(_/<_(_)( | BVR Technologies Ltd.
_/ |
-------------------------------------+--------------------------------
Phone : | E-mail : rany++at++bvr.co.il
Work : 972-3-5715671 |
Res. : 972-9-989974 |
Fax : 972-3-5715668 |
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:15 PDT