openglfbomultisampling

OpenGL multiple render target FBO with multisampling - requirements


When creating a multisample FBO, do all attached target textures need to be multisample-textures?


Solution

  • Section 9.4.2 Whole Framebuffer Completeness of the spec states:

    The framebuffer object bound to target is said to be framebuffer complete if all the following conditions are true:
    [...]

    • The value of RENDERBUFFER_SAMPLES is the same for all attached renderbuffers; the value of TEXTURE_SAMPLES is the same for all attached textures; and, if the attached images are a mix of renderbuffers and textures, the value of RENDERBUFFER_SAMPLES matches the value of TEXTURE_SAMPLES.

    So yes, the number of samples has to be the same for all attached textures and renderbuffers.