OpenGLRenderer: Fix FBO clearing when scissor is enabled

This commit is contained in:
Lynix
2022-11-06 15:31:55 +01:00
parent 45d4195527
commit 0133a91c4d
4 changed files with 28 additions and 3 deletions

View File

@@ -20,12 +20,14 @@ namespace Nz
bool hasDepth = false;
bool hasStencil = false;
m_attachmentSizes.resize(attachments.size());
for (std::size_t i = 0; i < attachments.size(); ++i)
{
assert(attachments[i]);
const OpenGLTexture& glTexture = static_cast<const OpenGLTexture&>(*attachments[i]);
Vector2ui textureSize = Vector2ui(glTexture.GetSize());
m_attachmentSizes[i] = textureSize;
if (i == 0)
m_size = textureSize;