PDA

View Full Version : glutGetModifiers();?



RobertSI
06-04-2000, 05:10 AM
Trying to use GLUT_ACTIVE_CTRL && 'z'
in keyboard func like this:
switch(key)
{
case: GLUT_ACTIVE_CTRL && 'Z':
{
glutGetModifiers();
doSomething();
}
Not working. Please advise. Thank you.

Bob
06-04-2000, 05:34 AM
GLUT_ACTIVE__CTRL && 'Z' will be evaluated as a logical expression, and will return either true or false because you are using && (use & if you want to AND two values together), and as long as key doesn't hold the same value as the logical expression, the two functions will not be executed.

[This message has been edited by Bob (edited 06-04-2000).]