Re: Line prims vs. Wireframe state

New Message Reply Date view Thread view Subject view Author view

Steve Baker (sbaker++at++link.com)
Mon, 8 Dec 1997 08:26:14 -0600 (CST)


On Fri, 5 Dec 1997, Glenn Waldron wrote:

> What's the performance difference, if any, between:
>
> a) a pfGeoSet with PFGS_LINE/LINE_STRIP primitives;

I presume this generates an OpenGL GL_LINES/GL_LINESTRIP
call.

> b) a pfGeoSet with solid prim type (e.g., PFGS_TRIS) using a
> pfGeoState with PFSTATE_ENWIREFRAME enabled
  
...and this generates a GL_TRIANGLES type of call with glPolygonMode
set to GL_LINE instead of the usual GL_FILL.

Check your OpenGL manual for further details...

So, why use one rather than the other? Well, the second approach
(PFSTATE_ENWIREFRAME) is extremely convenient for an application
where polygons are normally drawn filled - but which wants to
simply turn on a wire-frame view for a short period - or perhaps
just in one of several pfChannels. In that case, you can simply
turn on the ENWIREFRAME state and then do a pfOverride and without
any change to the database, it all comes out in wireframe.

However, if you just want a few lines in your otherwise polygonal
database, then using the GeoState to change the mode to GL_LINE
instead of GL_FILL would result in extra glPolygonMode commands
being generated, which is presumably less efficient than simply
having Performer generate a glBegin(GL_LINES) call in place
of glBegin(GL_POLYGON) ...or whatever... - so in this case,
use the PFGS_LINE/LINE_STRIP primitives.

Steve Baker 817-619-8776 (Vox/Vox-Mail)
Hughes Training Inc. 817-619-4028 (Fax)
2200 Arlington Downs Road SBaker++at++link.com (eMail)
Arlington, Texas. TX 76005-6171 SJBaker1++at++airmail.net (Personal eMail)
http://www.hti.com http://web2.airmail.net/sjbaker1 (personal)

** Beware of Geeks bearing GIF's. **

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


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:56:21 PDT

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