I have a Problem with glutDisplayFunc, GlutReshapeFunc, … My Problem is, i want to use it in c++. I have made a class Szene where my callback functions are element functions. Here the class Definition.
class Szene {
Szene(int argc, char argv);
void AktElementSuchen();
void InitSchatten();
void InitSzene();
void InitOpenGl();
void SpecialKey(int key, int x, int y);
void Display();
void Reshape(int,int);
void InitWin(int argc, char
void Key(unsigned char key, int x, int );
Licht* lichtarray;
Schatten* schattenarray;
Kamera betrachter;
bool schattenaktiviert;
Objekt* objektarray[1];
Now i have the Problem: That i have a compiler error like this:
h:\Szene\Szene.cpp(50): error C2664: ‘glutKeyboardFunc’ : cannot convert parameter 1 from ‘void (unsigned char,int,int)’ to ‘void (__cdecl *)(unsigned char,int,int)’

when i cast the funktion like glutDisplayFunc((void)Display) it does not operate.

what can i do?

Perhaps my compiler is a problem, i use visual studio .net