opengl初学者求助,程序运行失败
#include<windows.h>#include<GL/gl.h>
#include<GL/glaux.h>
void CALLBACK display(void)
{
static float a=30.0;
glClearColor(1.0,1.0,1.0,0.0);
glClear(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
glColor3f(0.3f,0.7f,1.0f);
glLoadIdentity();
glTranslatef(0.0,0.0,-20.0);
glRotatef(a,0.0,0.0,1.0);
auxWireTeapot(1.0);
glFlush();
auxSwapBuffers();
a=a+10.0f;
}
void myinit(void)
{
glShadeModel(GL_FLAT);
}
void CALLBACK myReshape(int w,int h)
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0,1.0,-1.0,1.0,1.5,20.0);
glMatrixMode(GL_MODELVIEW);
glViewport(0,0,w,h);
}
void main(int argc,char** argv)
{
auxInitDisplayMode(AUX_DOUBLE|AUX_RGB);
auxInitPosition(0,0,125500,950);
auxInitWindow(argv[0]);
myinit();
auxReshapeFunc(myReshape);
auxMainLoop(display);
}
程序实现茶壶旋转,运行后出现茶壶,但没有旋转,请高手看看哪里出错了