AST (arnaud++at++thomson-dsi.fr)
Thu, 16 Jun 94 09:54:29 +0100
Here is one simple code that reproduces this bug:
void main( int argc,
char *argv[] )
{
pfGeoSet *gset;
pfGeoState *gset_state;
pfTexture *tex;
pfTexEnv *tex_env;
/* ----------------------------
Initialization of Performer
---------------------------- */
pfInit();
arena = pfGetSharedArena();
/* -----------------------
Creation of one geoset
----------------------- */
gset = build_gset();
pfInitState(NULL);
pfNewState();
gset_state = pfNewGState(arena);
pfGStateMode(gset_state, PFSTATE_ENTEXTURE, PFTR_ON);
/* --------------------------------------------
Creation of one pfTexture and one pfTexEnv
-------------------------------------------- */
tex = pfNewTex(arena);
tex_env = pfNewTEnv(arena);
pfLoadTexFile(tex, "image.rgb");
pfGStateAttr(gset_state, PFSTATE_TEXTURE, tex);
pfGStateAttr(gset_state, PFSTATE_TEXTURE, tex_env);
/* ------------------------------------
Creation of 2 windows with winopen
------------------------------------ */
init_windows();
/* ------------------------------------
Drawing of geoset in first window
--> correctly textured
------------------------------------ */
winset(wid1);
pfApplyTEnv(tex_env);
pfApplyTex(tex);
pfEnable(PFEN_TEXTURE);
pfDrawGSet(gset);
sleep(1);
/* ------------------------------------
Drawing of geoset in second window
--> no texture !?
------------------------------------ */
winset(wid2);
pfApplyTEnv(tex_env);
pfApplyTex(tex);
pfEnable(PFEN_TEXTURE);
pfDrawGSet(gset);
sleep(10);
}
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:20 PDT