Renderer: Improve texture view support (and support emulation for OGL)

This commit is contained in:
SirLynix
2022-12-02 22:58:34 +01:00
committed by Jérôme Leclercq
parent 08ea4c87a7
commit 56acbb2694
9 changed files with 99 additions and 24 deletions

View File

@@ -44,6 +44,15 @@ namespace Nz::GL
context.glFramebufferTexture2D(target, attachment, textarget, texture, level);
}
inline void Framebuffer::TextureLayer(GLenum attachment, GLuint texture, GLint level, GLint layer)
{
assert(m_objectId);
const Context& context = EnsureContext();
GLenum target = context.BindFramebuffer(m_objectId);
context.glFramebufferTextureLayer(target, attachment, texture, level, layer);
}
inline GLuint Framebuffer::CreateHelper(const Context& context)
{
GLuint fbo = 0;