Reputation: 41
I made an OpenGL app for testing out Framebuffer Objects that works on the laptop I made it on, another laptop I own and my desktop PC. However, it seems to crash for everyone else I've asked to test the app for me.
So far I have narrowed it down to crashing on the first extension I call (in this case, glGenBuffers), which I am 100% certain is not called until after this function (see below) is called. After looking through many answers, I have made sure of the following:
And it still crashes on other PCs, in this manner:
Any ideas of what I can try next?
Update: Asked my friend to send me the error message, here it is:
Unhandled exception at 0x7490CB49 in OpenGL Framework.exe: 0xC0000005: Access violation executing location 0x00000000.
void CSystem::Initialise()
{
if(glfwInit() == GL_FALSE)
{
return GL_FALSE;
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
if(m_bFullscreen)
window = glfwCreateWindow(1600, 900, "OpenGL", glfwGetPrimaryMonitor(), nullptr); // Fullscreen
else
window = glfwCreateWindow(1600, 900, "OpenGL", nullptr, nullptr); // Windowed
if(window == nullptr)
{
return false;
}
glfwMakeContextCurrent(window);
glewExperimental = GL_TRUE;
if(glewInit() != GLEW_OK)
{
return false;
}
if(glGetError())
{
return false;
}
}
Upvotes: 0
Views: 490
Reputation: 41
So I managed to fix the issue, for anyone else who wants to know. Turns out that even though GLEW didn't bring up any errors, it still wasn't loading all the extensions properly.
I solved the issue by removing GLEW entirely and writing my own extension loader. Time consuming, and probably not what other people with the same problem want to hear - but that did it.
It was good at least for me to write something so that in the future I can actually see which extensions are failing to load and how. In this case, by writing them all myself it ended up working flawlessly. Go figure!
Upvotes: 0