I have code fully working under graphics card OpenGL.
However when I switch to OpenGL emulation using GDI generic OpenGL driver I get very strange error:
GL ERROR - Function glBindTexture(GL_TEXTURE_2D,1) generated error GL_INVALID_ENUM
The documentation of glBindTexture() says that GL_INVALID_ENUM can be returned only in case the target has wrong enum. GL_TEXTURE_2D is however correct enum - works on graphic card OpenGL driver.
I'm sure that: 1) The glBindTexture is generating that error - using GLIntercept tracker with error logging 2) Texture is allocated and has size of 512 x 4 3) Texture is assigned the data: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_textureImage.width(), m_textureImage.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, m_textureImage.bits()); 4) OpenGL context between assigning the texture the data and actually using the texture doesn't change - thou texture is unbound in-between
Is there some other undocumented reasons why it can return such error? Any ideas how to find the problem?