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

@@ -111,10 +111,12 @@ namespace Nz::GL
//< TODO: Handle errors
}
inline void Texture::TextureView(GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
inline void Texture::TextureView(TextureTarget target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
{
m_target = target;
const Context& context = EnsureDeviceContext();
context.glTextureView(m_objectId, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
context.glTextureView(m_objectId, ToOpenGL(target), origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
}
inline GLuint Texture::CreateHelper(OpenGLDevice& /*device*/, const Context& context)