Refactor material system (#382)
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Nz
|
||||
throw std::runtime_error("failed to create framebuffer object");
|
||||
|
||||
std::size_t colorAttachmentCount = 0;
|
||||
bool hasDepth = false;
|
||||
bool hasDepth = false;
|
||||
bool hasStencil = false;
|
||||
|
||||
for (std::size_t i = 0; i < attachments.size(); ++i)
|
||||
@@ -25,6 +25,13 @@ namespace Nz
|
||||
assert(attachments[i]);
|
||||
const OpenGLTexture& glTexture = static_cast<const OpenGLTexture&>(*attachments[i]);
|
||||
|
||||
Vector2ui textureSize = Vector2ui(glTexture.GetSize());
|
||||
|
||||
if (i == 0)
|
||||
m_size = textureSize;
|
||||
else
|
||||
m_size.Minimize(textureSize);
|
||||
|
||||
PixelFormat textureFormat = glTexture.GetFormat();
|
||||
|
||||
GLenum attachment;
|
||||
@@ -89,4 +96,9 @@ namespace Nz
|
||||
{
|
||||
return m_colorAttachmentCount;
|
||||
}
|
||||
|
||||
const Vector2ui& OpenGLFboFramebuffer::GetSize() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user