From: Goncalo Carvalho (g.carvalho++at++gsa.ac.uk)
Date: 01/27/2003 05:56:17
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 KingdomTel: +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 : Mon Jan 27 2003 - 06:01:41 PST