Re: [info-performer] Adding a texture to a pfGeode

New Message Reply Date view Thread view Subject view Author view

From: Paolo Farinelli (paolo++at++sgi.com)
Date: 01/23/2003 16:47:18


Hi Pat,

Take a look at man pfdConverterMode_pfb. You can turn on the
 PFPFB_SAVE_TEXTURE_IMAGE mode in order to include
actual texel data in your outputted pfb file.

For a quick test, I added the following 4 lines of code to texture.C
in /usr/share/Performer/src/pguide/libpf/C++ :

At the top of the file, with the other includes:

#include <Performer/pfdb/pfpfb.h>
#include <Performer/pfdu.h> ,

And, just after root->addChild(dcs2) :

pfdConverterMode( "pfb", PFPFB_SAVE_TEXTURE_IMAGE, PF_ON );
pfdStoreFile( root, "foo.pfb" );

This generates a large pfb file which seems to contain image data, as
required.

Hope this helps,
Paolo

Gatewood, Pat wrote:

>I am trying to create a simple object using the performer API.
>It has a pfGeode with one pfGeoSet attached.
>
>How do I attach a texture file to the pfGeode or pfGeoSet so that it will
>be written into the file created by pfdStoreFile?
>
>Thanks.
>
>-----------------------------------------------------------------------
> List Archives, Info, FAQ: 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
>-----------------------------------------------------------------------
>

-- 
Paolo Farinelli                                           paolo++at++sgi.com
Member of Technical Staff, OpenGL Performer              1-650-933-1808
Silicon Graphics        1600 Amphitheatre Pkwy, Mountain View, CA 94043


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 16:47:23 PST

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