Renderer/Framebuffer: Add GetType (and rework backend internals)

This commit is contained in:
Jérôme Leclercq
2021-06-22 17:30:08 +02:00
parent c188d0616a
commit d88c4ecb5b
22 changed files with 129 additions and 149 deletions

View File

@@ -144,7 +144,7 @@ namespace Nz
StackVector<GLenum> invalidateAttachments = NazaraStackVector(GLenum, colorBufferCount + 1);
if (command.framebuffer->GetType() == OpenGLFramebuffer::Type::FBO)
if (command.framebuffer->GetType() == FramebufferType::Texture)
{
context->glDrawBuffers(GLsizei(colorBufferCount), fboDrawBuffers.data());

View File

@@ -11,7 +11,7 @@
namespace Nz
{
OpenGLFboFramebuffer::OpenGLFboFramebuffer(OpenGLDevice& device, const std::vector<std::shared_ptr<Texture>>& attachments) :
OpenGLFramebuffer(OpenGLFramebuffer::Type::FBO)
OpenGLFramebuffer(FramebufferType::Texture)
{
if (!m_framebuffer.Create(device))
throw std::runtime_error("failed to create framebuffer object");