diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2024-06-11 16:23:36 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2024-06-18 16:47:26 +0200 |
commit | deb5800429f130db39258e21b99e5d72a4429820 (patch) | |
tree | 30f3278dfd195c6842e48300ee42c431e5ccbe49 /src/quick3d/quick3dscene2d | |
parent | 0c1bc77a46d410f58a19f55b0721d1cd3a1e05b0 (diff) |
The GL helpers have a drawBuffer and drawBuffers functions.
drawBuffer takes in a GLenum (GL_COLOR_ATTACHMENT0 + n) and drawBuffers
took in QRenderTargetOutput::AttachmentPoint (0 - 15).
When changes were made to support stereo rendering (QTBUG-123483)
we endup in a case where if we have a single color attachment we would
end up calling drawBuffer and if we have multiple attachments drawBuffers.
In both cases though, we end up calling with AttachmentPoint values instead
of GLEnum which broken render to texture since
drawBuffer(0) is not the same as drawBuffer(GL_COLOR_ATTACHMENT0 + 0). The
first actually disables the color attachment.
To solve this and reduce confusion, drawBuffer and drawBuffers now both
take GLEnum values. In the AttachmentPack we only store AttachmentPoint values
(since AttachmentPack is Graphics API agnostic) and we take care of converting
the AttachmentPoint values to GLenum values when calling drawBuffer or
drawBuffers.
Also remove duplicate activateDrawBuffers function in GraphicsContext as
we only need the one in SubmissionContext
Pick-to: 6.7.2 6.7 6.8
Task-number: QTBUG-126251
Change-Id: I00966c07902699450854d3d8327422967872a985
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/quick3d/quick3dscene2d')
0 files changed, 0 insertions, 0 deletions