Re: texture coordinates and packed arrays.

New Message Reply Date view Thread view Subject view Author view

From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 08/15/2000 10:27:32


On Tue, 15 Aug 2000 christopher.g.dorosky++at++lmco.com wrote:

> pfHi,
>
> I have a situation where a simple object is repeated in the scene graph many
> times. I noticed that for each time it is repeated, the number of texture
> coordinates passed to the pipe rises proportionately. Each of these objects
> share the same geostate, and same texture coordinates. Is there a way to
> globally set this and save the passing? I tried making one tex_coord array
> and using its address as the attribute to all of the TEXCOORD2, but it
> didn't reduce the number of coordinates passed.
>

When drawing objects, Performer has to send them to the pipe as many times
as they appear in the scene; this is the way immediate mode rendering
libraries like OpenGL work.

One thing you could try is compiling the pfGeoSets of this object into an
OpenGL display list, this way all their attributes will be stored in the
pipe and they will only be rendered by ID. The function that turns this on
or off is pfGeoSet::setDrawMode. When doing this, make sure that you don't
create multiple geosets with the same TEXCOORD2 pointer, but rather just
use the same pfGeoSet repeatedly in the scene graph.

>
> I was hoping for a solution by one of two methods. With a geostate, you can
> do a geostate->apply() and the geostate attributes become global until
> another geostate is applied (geodes with NULL geostates inherit). Is there a
> way to do this with texture coordinates?
>

No, there isn't. Geostate is a modal state operation, a set of texture
coordinates isn't.
 
>
> Failing that, could I simply reduce the amount of bytes by packing the
> array? The only two attributes I am interested in are vertices and texture.
> It seemed like any space I would gain by packing would be wasted by
> including color or normals. Is there a good way to do this?
>

Packing the array may increase the speed at which vertices are sent to the
pipe, but try the display list method first.

-- Marcin


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 10:27:42 PDT

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