Ran Yakir (rany++at++amcor.bvr.co.il)
Tue, 9 May 1995 10:06:22 +0000
Yes. The GL function to do that is fbsubtexload(). It loads a rectangular
region of the framebuffer into a predefined texture. The texture has to be
defined with the TX_FAST_DEFINE property, so it can not have mip-mapping. You
also must define the texture dimensions to be a power of two. The rectangular
region you are loading must have dimensions that divides by 32.
I've never used fbsubtexload() along with Performer, but I think it is rather
straightforward.
The following Performer code fragments will do the job (I hope) :
/*
* At initialization
*/
screen_tex = pfNewTex (arena);
pfTexFilter (screen_tex, PFTEX_MINFILTER, PFTEX_BILINEAR); /* no mipmap !!! */
pfTexFilter (screen_tex, PFTEX_MAGFILTER, PFTEX_BILINEAR);
pfTexFormat (screen_tex, PFTEX_FAST_DEFINE, PF_ON);
pfTexImage (screen_tex, NULL, 3, xsize, ysize, 1);
...
/*
* At the post-draw callback
*/
pfApplyTEnv (env);
pfApplyTex (screen_tex);
fbsubtexload (screen_x, screen_y,
TX_TEXTURE_0, pfGetGLHandle (screen_tex),
0.0, 1.0, 0.0, 1.0,
0);
...
This is the simple case in which you fill the whole texture with your screen
image. In other cases, you specify that part of the texture which has to be
filled using the 5th to 8th arguments of the function.
If you need a complete example source, I can compose one for you.
Regards,
Ran
--
__ | Ran Yakir
/_) _ __ \ / _ / o __ | Graphics App. Chief Engineer
/ )_ (_(_) ) \/ (_(_/<_(_)( | BVR Technologies Ltd.
_/ |
-------------------------------------+--------------------------------
Phone : | E-mail : rany++at++bvr.co.il
Work : 972-3-5715671 |
Res. : 972-9-989974 |
Fax : 972-3-5715668 |
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:29 PDT