#ifndef MAININIT_H_ #define MAININIT_H_ #include #include #include #include #include "Shapes.h" #include "PlayerControl.h" void InitGL(int Width, int Height) { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1.0); glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); glShadeModel(GL_SMOOTH); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f); glMatrixMode(GL_MODELVIEW); } void BeginGame() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); DrawPyramid(0,0,-5); glutSwapBuffers(); } void InitEngine(int width, int height,char* name, int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH); glutInitWindowSize(width, height); glutInitWindowPosition(0, 0); window = glutCreateWindow(name); glutDisplayFunc(&BeginGame); glutIdleFunc(&BeginGame); glutKeyboardFunc(&keyPressed); InitGL(width, height); glutMainLoop(); } #endif /*MAININIT_H_*/ // there thwoing errors to each other #ifndef PLAYERCONTROL_H_ #define PLAYERCONTROL_H_ #include "keydef.h" char window; void keyPressed(unsigned char key, int x, int y) { usleep(100); if (key == ESCAPE) { glutDestroyWindow(window); exit(0); } } #endif /*PLAYERCONTROL_H_*/ Severity and Description Path Resource Location Creation Time Id error: initializing argument 1 of ‘void glutKeyboardFunc(void (*)(unsigned char, int, int))’ GameEngine/Source/Engine MainInit.h line 43 1194926275438 2749 Severity and Description Path Resource Location Creation Time Id error: expected ‘,’ or ‘...’ before numeric constant GameEngine/Source/Engine PlayerControl.h line 7 1194926275436 2747 Severity and Description Path Resource Location Creation Time Id error: invalid conversion from ‘void (*)(unsigned char, int)’ to ‘void (*)(unsigned char, int, int)’ GameEngine/Source/Engine MainInit.h line 43 1194926275437 2748