My code keeps crashing at runtime, I have done some creative debugging and determined that it was the glGenVertexArrays that was causing the crash, I've looked around and come across some answers that told me to enable experimental mode in GLEW but that didn't work, as far as I can tell my graphics card supports it, my opengl version is 3.1. I'm using freeGLUT and GLEW
here's the code, the line in question is 45 http://hastebin.com/rekizejuza.cpp
std::cout << "made it here\r\n";
glGenVertexArrays(1, &meshID);
std::cout << "not here here\r\n";
glBindVertexArray(meshID);
glGenVertexArrays
problem, but nonetheless would crash your app if it wen't on. Check line 57delete [] ids;
. You are deleting a local variable that was declared on the stack, at line 49unsigned int ids[4];
. Your compiler is probably not complaining about it, but this is absolute nonsense. \$\endgroup\$ – glampert Apr 23 '14 at 18:48glewExperimental = GL_TRUE;
and this causes openGL crashes when calling glGenVertexArrays(); I hope I have helped! See ya! \$\endgroup\$ – Michael Pacheco Jul 25 '17 at 1:32