How to generate textures from frame buffer?

New Message Reply Date view Thread view Subject view Author view

Amaury Aubel (aubel++at++lig.di.epfl.ch)
Thu, 19 Jun 1997 18:18:25 -0600


Hi Performers,

I have a pfBillboard made up of a few planes. I map onto those planes
transparent textures, which I update from time to time.
What I'd like to do is generate the textures from the frame buffer.
 Unfortunately there's no example source code on the subject to hand.

I tried:
          pfTexLoadMode(movie->tex,PFTEX_LOAD_SOURCE,
PFTEX_SOURCE_FRAMEBUFFER);
          pfTexLoadMode(movie->tex, PFTEX_LOAD_LIST, PFTEX_LIST_AUTO_SUBLOAD);
          pfTexFormat(movie->tex, PFTEX_SUBLOAD_FORMAT, TRUE);
          pfTexLoadOrigin(movie->tex,PFTEX_ORIGIN_SOURCE,128,128);
          pfTexLoadSize(movie->tex,128, 128);

and calling
pfLoadTex(movie->tex);

to load the texture causes a :
PF Notice/Usage: OpenGL Error 0x502 - invalid operation
PF Warning/Usage: pfTexture::apply() - bad number of components -1

Has anyone already used the frame buffer as a source for textures?
If yes how is the frame buffer considered by default? As a 4-component -RGBA-
"texture"? If not can it be changed to meet my need?

Thanks for your help,

Amaury.
=======================================================================
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:55:28 PDT

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