Hi,
I have been having a problem recently running my OpenGL project, whenever I ran my project my entire OS would freeze and I would be forced to restart my computer. I found that the source of the problem was the glutCreateWindow(); function, so I tried exchanging the OpenGL utility to GLFW, but that gave the same problem, so I believe it must be a problem with my hardware/drivers. I even tried making a sample application to make sure my code was not the issue.
#include <Windows.h>
#include <iostream>
#include <gl/glut.h>
#include <time.h>
void display()
{
glutSwapBuffers();
}
void reshape(int w, int h)
{
glViewport(0,0,w,h);
}
int main(int argc, char** argv)
{
#ifdef RELEASE
FreeConsole();
#endif
int x = 1000;
int y = 600;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(x,y);
glutInitWindowPosition(50, 100);
glutCreateWindow("Test");
glutDisplayFunc(display);
glutReshapeFunc(reshape);
std::cout << "OpenGL Version: " << glGetString(GL_VERSION) << std::endl;
std::cout << std::endl;
std::cout << "#######################" << std::endl;
std::cout << std::endl;
glutMainLoop();
return 0;
}
As I said the program would cause my OS to hang at ‘glutCreateWindow(“Test”);’
I can only think it would be a driver problem, as I recently updated my driver and that was when the problems started occurring. My spec is:
Intel i5 750
4GB RAM
Nvidia Geforce 465 GTX
Windows 7 64-bit
Does anyone know the source of the problem?