I'm using Dev-C++ on Windows Vista with FreeGlut. I'm going through the OpenGL SuperBible and the first program just runs and then windows returns "xxxx.exe has stopped working."
The code looks like this but it happens with all the examples, not just this one.
Code:/************************** * Includes * **************************/ #include <gl/glu.h> #include <gl/gl.h> #include <gl/freeglut.h> // Called to draw scene void RenderScene(void) { // Clear the window with current clearing color glClear(GL_COLOR_BUFFER_BIT); // Flush drawing commands glFlush(); } /////////////////////////////////////////////////////////// // Set up the rendering state void SetupRC(void) { glClearColor(0.0f, 0.0f, 1.0f, 1.0f); } /////////////////////////////////////////////////////////// // Main program entry point int main(int argc, char* argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA); glutCreateWindow("Simple"); glutDisplayFunc(RenderScene); SetupRC(); glutMainLoop(); return 0; }



LinkBack URL
About LinkBacks


