Re: OpenGL 3D Geometry within Performer

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Thu, 20 May 1999 11:00:10 -0700


Dotson, Brian W. wrote:
>
> Hi,
>
> I am trying to take an application that uses OpenGL to draw 3D geometry and
> run it within Performer.
>
> I was thinking that I could place the OpenGL drawing code within a draw
> callback, but this didn't work. The only examples I have seen are using 2D
> OpenGL commands, such as putting text on the screen or a hud.
>
> Is it possible to use 3D OpenGL commands to create a geometry within
> performer and visualize the object along with other objects that may have
> been loaded from a .flt file?

Yes, the only potential problem (apart from state information which you
should try to use pfState to manage or push & pop) is that the node you
callback around may be culled. Apart from this you need to remember that
the modelview for the node in the scenegraph will be on the stach when
you draw, and z is up, not y. The bound sphere of the callback node
should cover all the geometry you intend to draw in the callback so it
is culled properly.

Cheers,Angus.

-- 
"Microsoft's system was like a forest that hadn't had a controlled
 burn in decades, just waiting for one person with a match to turn
 it into a disaster. Melissa was Microsoft's fault. They left their
 system wide open to this sort of abuse, they knew it could happen
 and did nothing." -- Bruce Perens

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu May 20 1999 - 11:00:18 PDT

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