rebirth123 wrote on Monday, October 14, 2013:
GLFW 2 worked flawlessly but I decided to try out this new version and experience the changes. I can get it to work in a windowed mode without any problems, but as soon as I try fullscreen mode I am getting serious lock ups which is forcing me to hard reset my PC.
I have tried to setup fullscreen with a lower resolution than the native resolution on my primary monitor, but this results in a total black screen lockup. If I set the resolution to the native (current) resolution of my primary monitor then opengl renders correctly, but as soon as I press escape to exit, I get a total black screen lockup which forces me to hard reset my PC. Alt-Ctrl-Del is not working, so this makes it difficult (and tedious) to find a fix.
Windows 7 sp1
GTX 780
Multi-monitor configuration
VS2010
Here is the initialization code:
bool initialize(int wWidth, int wHeight, bool fullScreen, std::string title)
{
glfwSetErrorCallback(_errorCallback);
if(!glfwInit())
{
return false;
}
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
glfwWindowHint(GLFW_STENCIL_BITS, 8);
glfwWindowHint(GLFW_DEPTH_BITS, 24);
glfwWindowHint(GLFW_SAMPLES, 0);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
if(fullScreen)
_window = glfwCreateWindow(wWidth, wHeight, title.c_str(), glfwGetPrimaryMonitor(), NULL);
else
_window = glfwCreateWindow(wWidth, wHeight, title.c_str(), NULL, NULL);
if(!_window)
{
glfwTerminate();
return false;
}
glfwSetWindowSizeCallback(_window, _windowResizeCallback);
glfwGetFramebufferSize(_window, &_windowWidth, &_windowHeight);
glfwSetKeyCallback(_window, _keyCallback);
glfwMakeContextCurrent(_window);
glewExperimental = true;
GLenum err = glewInit();
if(GLEW_OK != err)
{
shutdown();
return false;
}
printf("GL Version: %s\n", glGetString(GL_VERSION));
return true;
}
void shutdown()
{
//glfwDestroyWindow(_window); //tried to comment this out but made no difference
glfwTerminate();
}
Hope you can help.
P.S. I took out all of the GL error checks in my paste (to save space for the relevant code) GL is reporting no errors.