我在Ubuntu下装上了freeglut-2.6.0,然后写了夹一个first.c的文件,文件内容如下:#include<GL/glut.h>
#include<GL/glx.h>
#include<X11/Xlib.h>
#include<stdio.h>
#include<stdlib.h>
int main()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
glBegin(GL_POLYGON);
glVertex3f(0.25,0.25,0.0);
glVertex3f(0.75,0.25,0.0);
glVertex3f(0.75,0.75,0.0);
glVertex3f(0.25,0.75,0.0);
glEnd();
glFlush();
return (0);
}然后,用gcc -lglut first.c编译后,执行./a,什么输出也没有,请高手指教~!