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

@@ -29,6 +29,8 @@ namespace Nz
void Activate() const override;
inline const Vector2ui& GetAttachmentSize(std::size_t i) const;
std::size_t GetColorBufferCount() const override;
const Vector2ui& GetSize() const override;
@@ -39,10 +41,11 @@ namespace Nz
private:
GL::Framebuffer m_framebuffer;
std::size_t m_colorAttachmentCount;
std::vector<Vector2ui> m_attachmentSizes;
Vector2ui m_size;
};
}
#include <Nazara/OpenGLRenderer/OpenGLFboFramebuffer.hpp>
#include <Nazara/OpenGLRenderer/OpenGLFboFramebuffer.inl>
#endif // NAZARA_OPENGLRENDERER_OPENGLFBOFRAMEBUFFER_HPP

View File

@@ -3,11 +3,14 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/OpenGLRenderer/OpenGLFboFramebuffer.hpp>
#include <Nazara/OpenGLRenderer/OpenGLFramebuffer.hpp>
#include <Nazara/OpenGLRenderer/Debug.hpp>
namespace Nz
{
inline const Vector2ui& OpenGLFboFramebuffer::GetAttachmentSize(std::size_t i) const
{
return m_attachmentSizes[i];
}
}
#include <Nazara/OpenGLRenderer/DebugOff.hpp>