Don Burns (don_burns++at++peru.engr.sgi.com)
Mon, 11 Oct 1999 13:41:08 -0700 (PDT)
I am not aware of any way to query the capability. The following should work:
Given a texture, or frame buffer size s X t (in this case both must be powers
of two):
//
// Set up a NULL texture which will load from the frame buffer
//
pfTexture *tex = new pfTexture;
tex->setImage( NULL, 3, s, t, 0);
tex->setLoadMode( PFTEX_LOAD_SOURCE, PFTEX_SOURCE_FRAMEBUFFER);
//
// 16 bit texture work faster here. Choose your favorite
// texture format
//
//tex->setFormat( PFTEX_INTERNAL_FORMAT, PFTEX_RGB_5 );
tex->setFormat( PFTEX_INTERNAL_FORMAT, PFTEX_RGBA_8 );
tex->setFormat( PFTEX_SUBLOAD_FORMAT, PF_ON);
tex->setFilter( PFTEX_MINFILTER, PFTEX_BILINEAR);
tex->setLoadOrigin( PFTEX_ORIGIN_SOURCE, 0, 0);
tex->setLoadSize( s, t);
Call tex->load() in a predraw DRAW callback before any geosets using this
texture are drawn.
Hope this helps,
-don
This archive was generated by hypermail 2.0b2 on Mon Oct 11 1999 - 13:41:11 PDT