H-N-N
October 4th, 2004, 07:38 PM
Hi there,
I want to set the OpenGL paint function by calling glutDisplayFunc( paintGL() )paintGL(void) returns void and includes glBegin() & glEnd() etc...
My compiler (VC++ 6) says:
"cannot convert parameter 1 from 'void (void)' to 'void (__cdecl *)(void)"
This project should be independant of MFC and MS specific functions. Calling glutDisplayFunc( &paintGL() ) does not change anything.
This function looks like followed:
void View::paintGL(void)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(0,0,5,0,0,0,0,1,0);
glBegin(GL_LINES);
glVertex3f(-0.5,-0.5,0.0);
glVertex3f(0.5,0.0,0.0);
glVertex3f(0.0,0.5,0.0);
glutSwapBuffers();
glEnd();
glFlush();
}
Do you have a clue what could be wrong?
Thank you alot in advance!!
Holger
I want to set the OpenGL paint function by calling glutDisplayFunc( paintGL() )paintGL(void) returns void and includes glBegin() & glEnd() etc...
My compiler (VC++ 6) says:
"cannot convert parameter 1 from 'void (void)' to 'void (__cdecl *)(void)"
This project should be independant of MFC and MS specific functions. Calling glutDisplayFunc( &paintGL() ) does not change anything.
This function looks like followed:
void View::paintGL(void)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(0,0,5,0,0,0,0,1,0);
glBegin(GL_LINES);
glVertex3f(-0.5,-0.5,0.0);
glVertex3f(0.5,0.0,0.0);
glVertex3f(0.0,0.5,0.0);
glutSwapBuffers();
glEnd();
glFlush();
}
Do you have a clue what could be wrong?
Thank you alot in advance!!
Holger