PDA

View Full Version : GLUT warning



Tjaco
09-30-2005, 12:55 PM
Hi everyone,

While fiddeling around with opengl via GLUT on Linux, I've wrote some code. While compiling it I get warned:

warning: passing arg 1 of `glutKeyboardFunc' from incompatible pointer type

from this line:

glutKeyboardFunc(keyboard);

on this code:

void keyboard(int key, int x, int y){
if(key==27) exit(0); //Escape
}

The binary runs as expected but I do like to understand the complaint. As far as I can see, I'm not doing anything strange according to the manual.

Where do I go wrong.

Much thanks in advance,
Tjaco

Ehsan Kamrani
09-30-2005, 09:13 PM
Here's the prototype of the keyboard function:

void keyboard( unsigned char key, int x, int y )
{
...
}

-Ehsan-

------------------------
Ehsan Kamrani
*Zehne Ziba* corporation,
*Zehne Ziba* managing director
------------------------