Re: Overlay graphics on performer

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Wed, 23 Aug 95 18:18:54 PDT


>
> The following question is related to page 365 of the IRIS Performer
> Programming Guide, the frequently asked question "How do I overlay graphics
> on top of my IRIS Performer scene?" .
> For steps 3 (save and clear the projection matrix) and 5 (save and clear the
> modelling matrix) of the answer what are the specific Performer calls to do
> this? Also for steps 7 and 9 (restoring the modelling and projection
> matrices).
> Is there an example of this anywhere in the Performer library?
>
> Stephanie Sroczyk, JJM Systems Inc.

You need to do this through the GL:

3:
  pfMatrix pmat, vmat;
         
  /* save projection matrix */
  mmode(MPROJECTION);
  getmatrix(pmat);

I don't know what "clearing the projection matrix" means but if you want
a 2D overlay then call:

  ortho2(0, 1, 0, 1) or,
  ortho2(-.5, x-.5, -.5, y-.5) where x and y are the viewport pixel sizes
                                if you want to work in pixel dimensions

5:
  /* save modelview matrix */
  mmode(MVIEWING);
  pushmatrix();

  /* "clear" modelview matrix */
  loadmatrix(identityMatrix);

7:
  /* restore projection matrix */
  mmode(MPROJECTION);
  loadmatrix(pmat);

9:
  /* restore modelview matrix */
  popmatrix();


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:49 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.