Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Sat, 2 Mar 1996 14:59:04 +0100
Here are some draw callbacks which worked with performer 1.2, I haven't
tried it with 2.0 but it should work. I think this is pretty much what you
described you were doing though.
static float ident_matrix[4][4] = {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
};
static long Pre_texture_transform(pfTraverser *trav, void *data)
{
short MAT_mode;
MAT_mode = getmmode();
mmode(MTEXTURE);
loadmatrix(texture_matrix); /* do what you like here */
mmode(MAT_mode);
}
static long Post_texture_transform(pfTraverser *trav, void *data)
{
short MAT_mode;
MAT_mode = getmmode();
mmode(MTEXTURE);
loadmatrix(ident_matrix);
mmode(MAT_mode);
}
Rgds,
Angus.
On Mar 1, 9:22am, AnitaKishore wrote:
>
> "pushmatrix operates on the single transformation stack when mmode is
> MSINGLE, and on the ModelView matrix stack when mmode is MVIEWING. It
> should not be called when mmode is MPROJECTION or MTEXTURE."
>-- End of excerpt from AnitaKishore
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:31 PDT