Added check_gl_error() function in order to test opengl calls.
Errors messages from: https://www.opengl.org/wiki/GLAPI/glGetError