I'm using MSVC 2012. I followed the first tutorial, however I get a run time error about a null pointer. Occurs at the assert in Shader.hpp line 73, "Unhandled exception at 0x74C6C9F1 in OpenGL_Practice.exe: 0xC0000005: Access violation executing location 0x00000000."
It happens right when I try to create the vertex shader source. vs.Source(...);
Is the tutorial missing something? Is it MSVC? Or something in site_config?
Thanks
Edit: Code http://pastebin.com/fSv2Jgyi
Last edit: TickingHands 2013-08-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is IMHO in the fact that you create the window after initializing glew and after you call Shader.Source(...).
You also don't check the return value of glewInit().
To work properly the GL-commands and glew needs to have an initialized and current opengl context and this is not yet created in your app.
HTH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using MSVC 2012. I followed the first tutorial, however I get a run time error about a null pointer. Occurs at the assert in Shader.hpp line 73, "Unhandled exception at 0x74C6C9F1 in OpenGL_Practice.exe: 0xC0000005: Access violation executing location 0x00000000."
It happens right when I try to create the vertex shader source. vs.Source(...);
Is the tutorial missing something? Is it MSVC? Or something in site_config?
Thanks
Edit: Code http://pastebin.com/fSv2Jgyi
Last edit: TickingHands 2013-08-25
Sorry for the very late response.
The problem is IMHO in the fact that you create the window after initializing glew and after you call Shader.Source(...).
You also don't check the return value of glewInit().
To work properly the GL-commands and glew needs to have an initialized and current opengl context and this is not yet created in your app.
HTH