Re: gl polygons in channel postdraw

New Message Reply Date view Thread view Subject view Author view

Simon Mills (simon++at++wgs.estec.esa.nl)
Thu, 15 Apr 1999 09:58:44 +0200


Devrim Erdem wrote:
>
> Hi pfPeople,
>
> I am no pf or gl guru, this might be a stupid question bacuse
> of my lack of knowledge.
>
> I am adding some new polygons to my scene in my channel postdraw
> callback function. Adding a single polygon using
> pfPushState();
> pfPushMatrix();
> pfBasicState();
> glPushMatrix();
> glBegin(GL_POLYGON);...
>
> was easy. But still I see *only* the first polygon although I have
> moved the polygon building code into a for loop like this :
> for ( i = 0 ; i < DEPTH; i++){
> pfPushState();
> pfPushMatrix();
> pfBasicState();
> glPushMatrix();
> glBegin(GL_POLYGON);...
>
> What is the reason behind this problem ?

I would recommend that you put you loop just around the polygon drawing
code as below. You should only need to do the push/pop of matrix and
state once per frame.

pfPushState();
pfPushMatrix();
pfBasicState();
glPushMatrix();
for ( i = 0 ; i < DEPTH; i++){
 glBegin(GL_POLYGON);...

>
> thanks,
>
> --
> /*===============================================
> M. Devrim Erdem devrim++at++infotron-tr.com
> System Integration Engineer
> info(+)TRON, Turkey
> http://www.infotron-tr.com
> http://abone.turk.net/mderdem
> ===============================================*/
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

  
Hope it helps, Simon
________________________________________________________________________

Simon C. Mills
Silicon Worlds S.A.
c/o Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
The Netherlands http://www.estec.esa.nl/wmwww/EMM
________________________________________________________________________


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Apr 15 1999 - 00:59:09 PDT

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