Open GL - error funcion glutMouseFunc

 
Vista:

error funcion glutMouseFunc

Publicado por olga (5 intervenciones) el 24/01/2005 17:17:25
hola tengo el siguiente codigo:

void CGlView::onMouse(int button, int state, int x, int y)
{
if((button== GLUT_LEFT_BUTTON) & (state== GLUT_DOWN))
{
x0=x;y0=y;
}
}
y depues la llamada a :

glutMouseFunc(onMouse);

Cuando compilo me da el siguiente error alguien sabe pq?

error C2664: 'glutMouseFunc' : cannot convert parameter 1 from 'void (int,int,int,int)' to 'void (__cdecl *)(int,int,int,int)'
None of the functions with this name in scope match the target type
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:error funcion glutMouseFunc

Publicado por Lien (2 intervenciones) el 26/03/2005 00:33:25
mira a ver sto q al, yo la utilizo = y no me da problem:

void mouse(int button, int estado,int x,int y) {
if (button == GLUT_LEFT_BUTTON && estado == GLUT_DOWN) {
glutSetCursor(GLUT_CURSOR_CROSSHAIR);
presionado = 1;
xold = x;
yold=y;
}
if (button == GLUT_LEFT_BUTTON && estado == GLUT_UP) {
glutSetCursor(GLUT_CURSOR_INHERIT);
presionado=0;
}
}

glutMouseFunc(mouse);

suerte y espero t sirva d algo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar