From: c.mottram (ucftchr++at++ucl.ac.uk)
Date: 01/28/2003 03:09:07
Thanks for that, if only to find out correct settings for the load options.
This half works!!
I have a two channel display and with the following I get a dynamic texture
in the second channel with a fixed texture in the first channel
tex->setImage( (unsigned int*)0, 4, 512, 512, 0 );
tex->setFilter( PFTEX_MINFILTER, PFTEX_LINEAR );
tex->setFilter( PFTEX_MAGFILTER, PFTEX_LINEAR );
tex->setRepeat( PFTEX_WRAP_S, PFTEX_CLAMP );
tex->setRepeat( PFTEX_WRAP_T, PFTEX_CLAMP );
tex->setFormat( PFTEX_INTERNAL_FORMAT, GL_RGBA );
tex->setFormat( PFTEX_SUBLOAD_FORMAT, PF_ON );
//tex->setLoadMode( PFTEX_LOAD_BASE, PFTEX_BASE_AUTO_SUBLOAD );
tex->setLoadOrigin( PFTEX_ORIGIN_DEST, 0, 0 );
tex->setLoadSize( 320, 240 );
tex->setLoadImage( (unsigned int*)image);
Now if I uncomment //tex->setLoadMode( PFTEX_LOAD_BASE,
PFTEX_BASE_AUTO_SUBLOAD );
I get dynamic textures in both windows but NO geometry in the first channel,
which leaves me in a bit of a fix.
but half way there, note also I had to make the first tex->setImage( 512x512
or nothing happened!
cheers
Chiron
ps I'm not attaching code as it would fill up everyones inboxes but can send
complete program on request, if anyone fancies solving this.
At 13:56 27/01/2003 +0000, you wrote:
>
>This is my setup for getting frames off a webcam in a PC and stream it
>to a Onyx.
>
>Modify the parameters according to your requirements.
>
>sdata->tex = new pfTexture;
>sdata->tex->setImage( 0, 3, 512, 512, 0 );
>sdata->tex->setFilter( PFTEX_MINFILTER, PFTEX_LINEAR );
>sdata->tex->setFilter( PFTEX_MAGFILTER, PFTEX_LINEAR );
>sdata->tex->setRepeat( PFTEX_WRAP_S, PFTEX_CLAMP );
>sdata->tex->setRepeat( PFTEX_WRAP_T, PFTEX_CLAMP );
>sdata->tex->setFormat( PFTEX_INTERNAL_FORMAT, GL_RGB );
>sdata->tex->setFormat( PFTEX_SUBLOAD_FORMAT, PF_ON );
>sdata->tex->setLoadMode( PFTEX_LOAD_BASE, PFTEX_BASE_AUTO_SUBLOAD );
>sdata->tex->setLoadOrigin( PFTEX_ORIGIN_DEST, 0, 0 );
>sdata->tex->setLoadSize( 512, 512 );
>sdata->tex->setLoadImage( ( unsigned int* ) sdata->bitmap );
>
>call sdata->tex->load( ) in the Draw process.
>
>Goncalo
>
>--
>Goncalo Carvalho
>Digital Design Studio - Glasgow School of Art
>House for an Art Lover - Bellahouston Park
>10 Dumbreck Road
>Glasgow G41 5BW
>United Kingdom
>
>Tel: +44 (0) 141 353 4616
>Fax: +44 (0) 141 353 4422
>Mobile: +44 (0) 7766 295867
>mailto:g.carvalho++at++gsa.ac.uk
>
>
This archive was generated by hypermail 2b29 : Tue Jan 28 2003 - 03:10:15 PST