I am using Nsight 4.0 beta with OpenGl program (and get the same error on nSight 3.2). When I try to pause I get the error
glTexParameterf (Zero texture object not supported – encountered on target of GL_TEXTURE_2D
When I run the compatibility log I get an empty file - ie no errors
An update - I would the log - you have to run the program not just exit at its start
log file
glBufferStorage (queried; will fail if used): 0x00000001
glNamedBufferStorageEXT (queried; will fail if used): 0x00000001
glClearTexImage (queried; will fail if used): 0x00000001
glClearTexSubImage (queried; will fail if used): 0x00000001
glBindBuffersBase (queried; will fail if used): 0x00000001
glBindBuffersRange (queried; will fail if used): 0x00000001
glBindImageTextures (queried; will fail if used): 0x00000001
glBindSamplers (queried; will fail if used): 0x00000001
glBindTextures (queried; will fail if used): 0x00000001
glBindVertexBuffers (queried; will fail if used): 0x00000001
glBeginConditionalRenderNVX (queried; will fail if used): 0x00000001
glEndConditionalRenderNVX (queried; will fail if used): 0x00000001
glTexParameteri (Zero texture object not supported – encountered on target of GL_TEXTURE_2D): 0x0000000a
glTexParameterf (Zero texture object not supported – encountered on target of GL_TEXTURE_2D): 0x0000000a
The follow code is causing at least one of the errors but I can see nothing wrong with the code
glGenFramebuffers(1, &c_ID);
glBindFramebuffer(GL_FRAMEBUFFER, c_ID);
// Create the multisample color render buffer image and attach it to the
// second FBO.
glGenTextures(1, &c_RenderTexture);
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, c_RenderTexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, c_Samples, GL_RGBA8, c_Width, c_Height,GL_FALSE);
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, c_RenderTexture, 0);
CHECKOPENGL_TRICKY;
Solution:
Do not use GL_TEXTURE_2D glTexParameteri/glTexParameterf with multisample textures
Hi,
That solution is not exactly correct. What the error is reporting is that you have 0 bound to the indicated texture binding point and that this is something that Nsight does not currently support (it is a compatibility feature that has been deprecated in Core OpenGL).
If you look at your statements, you are creating a texture, binding it to the GL_TEXTURE_2D_MULTISAMPLE binding point, but then attempting to set parameters on the GL_TEXTURE_2D binding point – note the mismatch. In this case nothing is bound to GL_TEXTURE_2D and this is why Nsight is reporting the error.
Dan