PDA

View Full Version : GL_INVALID_ENUM with glBindBuffer GL_TEXTURE_CUBE_MAP



Wilds
08-07-2012, 10:26 PM
Hello users!

I have the following problem, when binding my cubemap in my draw calls I get an error, this is not happening when I bind it in my init code!

I am getting the following intercept log:


GL ERROR - Function glBindBuffer(GL_TEXTURE_CUBE_MAP,6) generated error GL_INVALID_ENUM
GL ERROR - Function glBindBuffer(GL_TEXTURE_CUBE_MAP,0) generated error GL_INVALID_ENUM
ImageManager::Destructor - OpenGL id 1 is still active. (Image Memory leak?)
ImageManager::Destructor - OpenGL id 2 is still active. (Image Memory leak?)
ImageManager::Destructor - OpenGL id 3 is still active. (Image Memory leak?)
ImageManager::Destructor - OpenGL id 4 is still active. (Image Memory leak?)
ImageManager::Destructor - OpenGL id 5 is still active. (Image Memory leak?)
ImageManager::Destructor - OpenGL id 6 is still active. (Image Memory leak?)
ShaderGLSLManager::Destructor - OpenGL id 18 is still active. (ShaderGLSL Memory leak?)
ShaderGLSLManager::Destructor - OpenGL id 16 is still active. (ShaderGLSL Memory leak?)
ShaderGLSLManager::Destructor - OpenGL id 17 is still active. (ShaderGLSL Memory leak?)

The memory leaks are also weird, as I am almost sure my application terminates correctly.
Inside gDEBugger I am getting the errors all over, it's telling me that it can't get the functions as it;s confused in which context to use (there are 2 probably).

Can anyone help me in the right direction I am pulling my hairs out!

*EDIT*
I am stupid, binbuffer for a texture, I should take a vacation!

maybe someone can help me with the context errors in gDEBugger


Debug String: Detected error: The debugged process asked for an extension function pointer (wglChoosePixelFormatARB) from one render context, but called this function pointer in another render context (context #0)
Debug String: Detected error: The debugged process asked for an extension function pointer (wglCreateContextAttribsARB) from one render context, but called this function pointer in another render context (context #0)

I am getting errors all over with the same problem as stated in the above two sentences.

aqnuep
08-08-2012, 12:05 PM
No kidding you get GL_INVALID_ENUM when passing to GL_TEXTURE_CUBE_MAP to glBindBuffer?
Of course you get!

GL_TEXTURE_CUBE_MAP is a texture target, but glBindBuffer is meant to bind buffer objects, thus requires a buffer target.