diff options
author | Jesse Buhagiar <jooster669@gmail.com> | 2021-05-30 16:56:56 +1000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-31 14:59:47 +0100 |
commit | 573c1c82f7ea47a33f2899a94a4594e55a3121cc (patch) | |
tree | 08b00a89616c9a214d40999722451b3560bebf9a /Userland/Libraries/LibGL/SoftwareGLContext.cpp | |
parent | 52e5d3c961711611e6ae74047812515ed3f9a9df (diff) | |
download | serenity-573c1c82f7ea47a33f2899a94a4594e55a3121cc.zip |
LibGL: Implement glActiveTexture
Diffstat (limited to 'Userland/Libraries/LibGL/SoftwareGLContext.cpp')
-rw-r--r-- | Userland/Libraries/LibGL/SoftwareGLContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 92b415abfd..c6b2b5ff1e 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -1286,6 +1286,13 @@ void SoftwareGLContext::gl_bind_texture(GLenum target, GLuint texture) } } +void SoftwareGLContext::gl_active_texture(GLenum texture) +{ + RETURN_WITH_ERROR_IF(texture < GL_TEXTURE0 || texture > GL_TEXTURE31, GL_INVALID_ENUM); + + m_active_texture_unit = &m_texture_units.at(texture - GL_TEXTURE0); +} + void SoftwareGLContext::present() { m_rasterizer.blit_to(*m_frontbuffer); |