• Laszlo Agocs's avatar
    Add support color renderbuffers · e099c9b1
    Laszlo Agocs authored
    Let's pretend it's 2008 and forget about multisample textures for
    a moment. Therefore, add support for color renderbuffers. These are
    only useful when sample count is > 1 i.e. multisampling is requested.
    In combination with the yet-to-be-added resolve operation this would
    allow doing msaa offscreen rendering on GLES 3.0 (or GLES 2.0 with
    extensions) systems as well (those do not have multisample textures)
    Backends other than gl just use a texture under the hood. With OpenGL
    we use a renderbuffer, however, not a texture.
    This may seem like a horrible waste of time but will eventually be
    helpful to get a port of Qt Quick that is feature-wise identical to
    today's OpenGL path, without changing the OpenGL version requirements.
    Introduces isFeatureSupported, so examples like msaatexture can
    conveniently qFatal (hehe) when the GL backend reports multisample
    textures are not supported.
    While we are at it, make some examples nicer by not having to repeat
    releasing resources one by one.
    The example (msaarenderbuffer) is not finished yet since adding support
    for resolve (vkCmdResolveImage, glBlitFrameBuffer, etc.) is a future task.
qrhigles2.cpp 73.1 KB