From: Dorosky, Christopher G (christopher.g.dorosky++at++lmco.com)
Date: 05/04/2001 07:16:50
Example.
gset->setAttr(PFGS_PACKED_ATTR, (PACKED EVERYTHING STRING), packed_array,
NULL);
gset->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, NULL, NULL);
//same for texcoords and normals. (above)
// if I do it for the coord3 the program crashes.
// if I don't do the NULL's for the others, then the packed attr stuff
doesn't work.
// all is well with this setup. I just was wondering why not to do it to the
coord3's.
// look at the man page, it talks about NULL for the other 3, not vertices.
Why?
Christopher Dorosky
Lead Electronic Systems Engineer - Real Time Simulation
Lockheed Martin Missiles and Fire Control - Dallas
christopher.g.dorosky++at++lmco.com
972-603-2349
-----Original Message-----
From: Brian Furtaw [mailto:brian++at++sgi.com]
Sent: Friday, May 04, 2001 6:20 AM
To: Dorosky, Christopher G
Cc: 'info-performer++at++sgi.com'
Subject: Re: Packed attributes
"Dorosky, Christopher G" wrote:
>
> I have a few questions on packed attributes that I was hoping someone
could
> answer.
>
> 1. It seems that every packed attribute must be bound per vertex. Is this
> true?
In Performer this is true. If you look at the OpenGL man page for
glVertexPointer you will see a list of vertex array formats the Infinite
Reality has been optimized for.
> 2. There are two similiar modes, something like C4UBN3FT2FV3F and
> C4UBN3FTSV3F.... I'm sure I screwed it up, but the important part is that
> the letters after the texture coordinates are either "2F" for 2 floats, or
> "S" (possibly 2S) for ??? What does the S mean? The header talks about
> GEN_FORMAT.
The 2F is as you guessed 2 floats per texture coordinate the 2S is for 2
shorts per texture coord. So the first string translates to Color RGBA
order 1 unsigned byte Normal 3 floats Texcoords 2 floats Vertex 3
floats. The second string is
Color RGBA order 1 unsigned byte Normal 3 floats Texcoords 2 shorts
Vertex 3 floats.
> 3. It seems that you have to set all packed attrs, attributes on the gset
to
> NULL, except COORD3. What is special about this?
I am not following you here do you have some code?
Brian
>
> This is all on Performer 2.2.10.
>
> Thanks
>
> Christopher Dorosky
> Lead Electronic Systems Engineer - Real Time Simulation
> Lockheed Martin Missiles and Fire Control - Dallas
> christopher.g.dorosky++at++lmco.com
> 972-603-2349
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
--
----oOOo---- ----oOOo---- ----oOOo---- ----oOOo----
Brian Furtaw (brian++at++sgi.com)
Graphics Guru Office:(301)572-3293 Fax: (603)250-0370
12200-G Plum Orchard Drive OpenGL/Performer/OpenInventor/ImageVision
Silver Spring, Maryland 20904 Volumizer/Optimizer/React/PCI Device
Drivers
-----------------------------------------------------------------------
List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
Open Development Project: http://oss.sgi.com/projects/performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2b29 : Fri May 04 2001 - 07:16:58 PDT