Hi everyone, I have been working on my game engine for a while now, I am using glfw to create and initialize the window and the context. Everything worked fine until I tried to ask glfw to create me an context of version higher than 3.0 (which defaults to).
Glfw looks like is not the issue here, I contacted the guys and looks like glfw can create the context properly, I have opengl 4.5 supported.
When I use an higher context I start to get fails on the most simpler opengl calls like in my VertexBuffer wrapper class:
VertexBuffer::VertexBuffer(GLuint upload_type) :
m_upload_type(upload_type),m_size(0)
{
glGenBuffers(1,&m_buffer_index);
}
void VertexBuffer::bind() const
{
glBindBuffer(GL_ARRAY_BUFFER, m_buffer_index);
assert(glGetError()==0);
}
I my assertion get triggered in the bind method, returning error 1280, which googling should stand for GL_INVALID_ENUM. The buffer index is correctly generated and used.
I have been scratching my head about this problem for a while and having trouble figuring out the problem.
The guys on glfw repository mentioned that maybe my glew was outdated, but I am running on latest glew, 1.13.
If i let the context default to 3.0 everything works fine, all my rendering , shadows etc.
Any clue on this matter?
PS: glew is loading fine and does not report errors.
M.