Hello, I am following this (http://openglbook.com/the-book/chapter-2-vertices-and-shapes ) guide to teach myself OpenGL. I followed the second chapter very carfully (I only used diffrent identifiers for variables and objects), but when I run my code I get an access violation error. Here is the code snippet which seems to be causing the issue:
I am using VC++ and it is set up correctly because my code will compile and a OpenGL windows opens if I comment out those two lines. g_vaoID is initlized on this line: GLuint g_vertexShaderID, g_fragmentShaderID, g_programID, g_vaoID, g_vboID, g_colourBufferID; if it helps. Could anybody who has programmed with OpenGL or just knows what I am doing wrong please give me a hand? Thankyou
I don't know too much about OpenGL, but if those functions fail they should set an error code. Try placing some glGetError(): http://www.opengl.org/wiki/GLAPI/glGetError
and see if anything turns up. You'll have to see what errors each function might set via the openGl API.