Hi, glViewPort seems to be missing from libGL. Attached is a small piece of code to show the problem. Compile using gcc -o cube cube.c -lm -lX11 -lglut -lGL -lGLU -L/usr/X11R6/lib You should find that glViewPort cannot be found during the link stage. TTFN Paul -- "Space", it says, "is big. Really big. You just won't believe how vastly, hugely, mind-bogglingly big space really is. I mean, you may think it's a long way down the road to the chemists, but that's just *peanuts* compared to space, listen" - Hitch Hikers Guide to the Galaxy
#include <GL/gl.h> #include <GL/freeglut.h> void display() { glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); glutWireCube(0.5); glutSwapBuffers(); } void reshape(int w, int h) { glViewPort(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-4.0, 4.0, -4.0, 4.0, -4.0, 4.0); } void init() { glClearColor(0.0, 0.0, 0.0, 0.0); glColor3f(1.0, 1.0, 1.0); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize(500, 500); glutInitWindowPosition(0, 0); glutCreateWindow("cube"); glutReshapeFunc(reshape); glutDisplayFunc(display); init(); glutMainLoop(); }
Attachment:
signature.asc
Description: This is a digitally signed message part