ribot
08-20-2002, 06:26 AM
hi there all,
I'm a little confused as to the following bug:
I have a global: boolean g_bFog = true;
I set the default state in the init block to enable the fog (glEnable(GL_FOG)), but I try to map a kep press to change the boolean status of the fog but nothing changes.
The app detects the keypress and outputs to the cmd line what state it should be but the state does not visibly change.
The only way around this is to add code to my display section which detects what the current state of g_bFog is and enables or disables the effect:
if (g_bFog)
gl.glEnable(GL_FOG)
else
gl.glDisable(GL_FOG)
Do I have to put this code in the display section for the code to be disabled / enabled, or should the keypress code suffice?
Thanks
ribot.
I'm a little confused as to the following bug:
I have a global: boolean g_bFog = true;
I set the default state in the init block to enable the fog (glEnable(GL_FOG)), but I try to map a kep press to change the boolean status of the fog but nothing changes.
The app detects the keypress and outputs to the cmd line what state it should be but the state does not visibly change.
The only way around this is to add code to my display section which detects what the current state of g_bFog is and enables or disables the effect:
if (g_bFog)
gl.glEnable(GL_FOG)
else
gl.glDisable(GL_FOG)
Do I have to put this code in the display section for the code to be disabled / enabled, or should the keypress code suffice?
Thanks
ribot.