Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Wed, 25 Oct 1995 21:37:16 +0100
Here are draw callbacks which do this sort of thing to a pfNode,
You can vary the plane equations or apply transformations to the
texture matrix using mmode(MTEXTURE) but be sure to undo them
afterwards.
long Texture_pre(pfTraverser *trav, void *data)
{
float splane[] = { 1.0, 0.0, 0.0, 0.0 };
float tplane[] = { 0.0, 1.0, 0.0, 0.0 };
/* use TG_SPHEREMAP here if youre applying environment maps */
/* textures in model coordinates */
texgen(TX_S, TG_LINEAR, splane);
texgen(TX_T, TG_LINEAR, tplane);
texgen(TX_S, TG_ON, NULL);
texgen(TX_T, TG_ON, NULL);
}
long Texture_post(pfTraverser *trav, void *data)
{
texgen(TX_S, TG_OFF, NULL);
texgen(TX_T, TG_OFF, NULL);
}
Happy texturing,
Angus.
On Oct 25, 4:27pm, Seth A Rosenblum wrote:
> Subject: Texture
> Is it possible to add texture to a multigen flight model using performer? If
> the answer is yes, I would appreciate an explanation of how this is done.
>
> Thank You,
>
> Seth A. Rosenblum
>
>-- End of excerpt from Seth A Rosenblum
-- Angus Dorbie, Silicon Graphics Ltd, UK dorbie++at++reading.sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:58 PDT