Packed attributes less efficient ?

New Message Reply Date view Thread view Subject view Author view

CHRISTOPHE.C.D.DELEPINE++at++TTS.thomson.fr
13 Mar 1998 10:12:14 +0000


In order to improve rendering performance, i have experimented geosets with
packed attributes, but unfortunately the rendering time has increased (~20%)
compared with the same geosets without packed attributes. A bit strange
since it is supposed to decrease OpenGL function call overhead...

my packed vertex looks like:

short n[4];
float t[2];
float v[3];

the color is not included because it is constant per geoset.

here is the geoset initialisation code for packed attributes:

        pfGSetDrawMode(gs->gset, PFGS_PACKED_ATTRS, PF_ON);
        pfGSetAttr(gs->gset, PFGS_PACKED_ATTRS, PFGS_PA_C4UBN3ST2FV3F, gs->ntv, NULL);
        pfGSetAttr(gs->gset, PFGS_COORD3, PFGS_PER_VERTEX, NULL, NULL);
        pfGSetAttr(gs->gset, PFGS_NORMAL3, PFGS_PER_VERTEX, NULL, NULL);
        pfGSetAttr(gs->gset, PFGS_TEXCOORD2, PFGS_PER_VERTEX, NULL, NULL);

and the one for non packed attributes:

        pfGSetAttr(gs->gset, PFGS_COORD3, PFGS_PER_VERTEX, gs->point, NULL);
        pfGSetAttr(gs->gset, PFGS_NORMAL3, PFGS_PER_VERTEX, gs->normal, NULL);
        pfGSetAttr(gs->gset, PFGS_TEXCOORD2, PFGS_PER_VERTEX, gs->uv, NULL);

Any idea that could explain the loss of performance ?
Would it be faster to use directly OpenGL (glDrawArrayEXT) with attributes stored
in separate arrays (which is not possible to specify with Performer) ?

machine: Onyx2 + performer 2.2

  _ __
 / )/ _ ' __/ / _ / )_ /_' . _
(_ /)/ /_) /()/)/)(- /__/(-((-/)//)(-
             / /

Thomson Training & Simulation
5 rue Leonardo da Vinci
Z.A. Les Boutries, B.P. 252
78703 Conflans Sainte-Honorine
FRANCE
    
phone: 33 1 34 90 36 14
  fax: 33 1 34 90 36 02
email: christophe.delepine++at++tts.thomson.fr

=======================================================================
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:57:01 PDT

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