From: Jürgen Gotschlich (juergen.gotschlich++at++dlr.de)
Date: 02/13/2002 15:11:32
High,
I would like to enable?disable all textures in my application. How to do
this ?
First I simply tried
if( pfGetEnable(PFEN_TEXTURE)) pfDisable( PFEN_TEXTURE );
else pfEnable( PFEN_TEXTURE );
But since this didn't work properly, I tried the following. The
'disable'-case is copied out of perfly and is working well. But the
'enable'-case (written by my own) is wrong. The textures are enabled,
but in wireframe. Why that ?
if( TexMode ) {
TexMode = FALSE;
cout << "disable texture" << endl;
pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
0);
pfDisable(PFEN_TEXTURE);
pfDisable(PFEN_TEXGEN);
pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
1);
}
else {
TexMode = TRUE;
cout << "enable texture" << endl;
pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
1);
pfEnable(PFEN_TEXTURE);
pfEnable(PFEN_TEXGEN);
pfOverride(PFSTATE_ENTEXTURE | PFSTATE_TEXTURE | PFSTATE_ENTEXGEN,
0);
}
Some ideas ?
-- ________________________________________________________________________Jürgen Gotschlich email: juergen.gotschlich++at++dlr.de __/|_ Phone: +49(531)295-3248/2778 /_/_/_/ Fax : +49(531)295-2640 |/ DLR
Deutsches Zentrum für Luft-und Raumfahrt | German Aerospace Center Institut für Flugsystemtechnik | Inst. of Flight Research Abt. Flugsimulation | Flight Simulation Dep. Lilienthalplatz 7 | Lilienthalplatz 7 D-38108 Braunschweig | D-38108 Braunschweig, Germany ________________________________________________________________________
This archive was generated by hypermail 2b29 : Wed Feb 13 2002 - 06:13:04 PST