Re: pfGroup node DRAW callback
Angus Dorbie (dorbie++at++sgi.com)
Fri, 13 Mar 1998 13:27:39 -0800
Anita Kishore wrote:
>
> Hi Sharon:
>
> I picked up on the work that I had left off a couple of months
> back (when you had helped answer some questions regarding forming
> matrices in performer appl. and loading it on to MODELVIEW stack through
> node callbacks) and have seen something strange that I think is wrong
> being done inside performer.
>
> I am attaching a small sample code to show this. The program
> creates a simple geometry, adds a couple of DCS and a group node above it,
> and attaches DRAW callbacks to all these nodes. These callbacks do not
> do anything in particular but are there simply to track the problem.
>
> I tracked the GL calls that are generated through ogldebug, and here
> is what I found:
>
> There is a pop matrix call immediately after finishing the pfGroup's
> node callback. The rest of the GL calls seem to fall in place ok. Is this
> pop correct? Why is it showing up here?
>
> Now, returning to my original problem, my actual appl. is also similarly
> structured scenegraph wise. I try to load a particular matrix onto the
> MODELVIEW stack in the pre DRAW callback of a pfGroup node (below which my
> geometry exists). But, the stack is not being affected (ie: this geometry is
> not
> drawn using the viewing matrix that I loaded). Upon tracing similarly
> with ogldebug, I found the same 'pop' matrix GL call immediately after the
> pre DRAW callback of this group node thus voiding the matrix that I just
> laoded.
> I am not doing any pop until the post draw callback. So why is this happening
> only for a group node?
>
> I am using performer2.2, Onyx2, Irix 6.4.
>
> Thanks for your help.
>
> -anita
> kishore++at++triavest.com
>
>
Off hand I'd say the pop is for the DCS on the matrix stack, although I
thought that performer used loadmatrix.
So you get:
pushmatrix, load or multiply for dcs, draw group, popmatrix.
So the pop happens after the group but I could be wrong here.
Cheers,Angus.
--
"Only the mediocre are always at their best." -- Jean Giraudoux
For advanced 3D graphics Performer + OpenGL based examples and tutors:
http://www.dorbie.com/
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:57:01 PDT