summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/render/backend/attachmentpack.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/backend/attachmentpack.cpp b/src/render/backend/attachmentpack.cpp
index 6dee7587b..9a08fdde4 100644
--- a/src/render/backend/attachmentpack.cpp
+++ b/src/render/backend/attachmentpack.cpp
@@ -67,11 +67,13 @@ AttachmentPack::AttachmentPack(const RenderTargetSelector *selector, const Rende
// If nothing is specified, use all the attachments as draw buffers
if (selectedAttachmentPoints.isEmpty()) {
+ m_drawBuffers.reserve(m_attachments.size());
for (const Attachment &attachment : qAsConst(m_attachments))
// only consider Color Attachments
if (attachment.m_point <= QRenderTargetOutput::Color15)
m_drawBuffers.push_back((int) attachment.m_point);
} else {
+ m_drawBuffers.reserve(selectedAttachmentPoints.size());
for (QRenderTargetOutput::AttachmentPoint drawBuffer : selectedAttachmentPoints)
if (drawBuffer <= QRenderTargetOutput::Color15)
m_drawBuffers.push_back((int) drawBuffer);