GL FRAMEBUFFER INCOMPLETE MULTISAMPLE during FBO creation

NVidia Quadro with proprietary 460 driver. Can someone explain me where the GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE comes from? All attachments have 4 samples, don’t they?

303 glGenTextures(n = 1, textures = &1)
304 glActiveTexture(texture = GL_TEXTURE7)
305 glBindTexture(target = GL_TEXTURE_2D, texture = 1)
306 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA8, width = 1000, height = 800, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = NULL)
307 glFramebufferTexture2DMultisampleEXT(target = GL_FRAMEBUFFER, attachment = GL_COLOR_ATTACHMENT0, textarget = GL_TEXTURE_2D, texture = 1, level = 0, samples = 4)
308 glGenTextures(n = 1, textures = &2)
309 glBindTexture(target = GL_TEXTURE_2D, texture = 2)
310 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_DEPTH24_STENCIL8, width = 1000, height = 800, border = 0, format = GL_DEPTH_STENCIL, type = GL_UNSIGNED_INT_24_8, pixels = NULL)
311 glGenRenderbuffers(n = 1, renderbuffers = &1)
312 glBindRenderbuffer(target = GL_RENDERBUFFER, renderbuffer = 1)
313 glRenderbufferStorageMultisample(target = GL_RENDERBUFFER, samples = 4, internalformat = GL_DEPTH24_STENCIL8, width = 1000, height = 800)
314 glGetRenderbufferParameteriv(target = GL_RENDERBUFFER, pname = GL_RENDERBUFFER_SAMPLES, params = &4)
315 glFramebufferRenderbuffer(target = GL_FRAMEBUFFER, attachment = GL_DEPTH_STENCIL_ATTACHMENT, renderbuffertarget = GL_RENDERBUFFER, renderbuffer = 1)
317 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE

OpenGL forum is in another castle.

No, they don’t. You did not create a 2D Multisample texture; you created a regular old 2D texture. If you want to create a multisample texture, you have to use a Multisample texture creation function. And it must be a GL_TEXTURE_2D_MULTISAMPLE texture target.

1 Like

Ok and if I attach the texture to the FBO should I use glFramebufferTexture2D or glFramebufferTexture2DMultisample?

Funny, other people seem to use glTexImage2D i ncombination with glFramebufferTexture2DMultisample:

There is no “glFramebufferTexture2DMultisample” function.

The changeset you linked to seems to show them correcting this issue. The code that didn’t create multisample color images was removed and replaced by an if/else branch that checks the multisample boolean to decide which function to call.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.