|
原程序:
#include<GL\GL.h>
#include<GL\GLU.H>
#include<GL\GLAUX.h>
#include<stdlib.h>
void CALLBACK display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,1.0,1.0);
glLoadIdentity();
glTranslatef(0.0,0.0,-8.0);
glScalef(1.0,2.0,1.0);
auxWireCube(1.0);
glFlush();
}
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);
}
int main(int argc,char **argv)
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGB);
auxInitWindow(argv[0]);
auxInitPosition(0,0,800,800);
myInit();
auxReshapeFunc(myReshape);
auxMainLoop(display);
}
(lib 已经设置好了)
系统是windows xp ,vc 6.0
报的错是:wglCreateContext failed
请问各位这是什么问题?????????????? |
|