problem about glu-Record and share programming errors

  • MrDoctorProfessorTyler
    c++ opengl perspective freeglut glu
    I am using FreeGLUT to try and create my first cube in C++ with OpenGL. I have an issue that whenever I call “gluPerspective”, the compiler throws this error:build/Debug/MinGW-Windows/main.o: In

  • G-71
    c++ opengl glut glu
    I try to compile some “hello world” glut application:#include #include #include #include GLint Width = 512, Height = 512;const int CubeSize = 200;void Display(void) {int left, right, top, bottom;left = (Width – CubeSize) / 2;right = left + CubeSize;bottom = (Height – CubeSize) / 2;top = bottom + CubeSize;glClearColor(0, 0, 0, 1);glClear(GL_COLOR_BUFFER_BIT);glColor3ub(255,0,0);glBegin(GL_QUADS);glVertex2f(left,bottom);glVertex2f(left,top);glVertex2f(right,top);glVertex2f(right,bottom);glEnd();glFinish(); }void Reshape(GLint w, GLint h) {Width = w;Height = h;glViewport(0, 0, w, h);glMatrixMode(GL_PROJECTION);glLoadIdentity();glOrtho(0, w, 0, h, -1.0, 1.0);glMatrixMode(GL_MODELVIEW);glLoadIdentity(); }void Keyboard(unsigned char key, int x, int y) { #define ESCAPE ‘\033’i

Originally posted 2013-08-31 07:48:57.