summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/SoftwareGLContext.cpp
diff options
context:
space:
mode:
authorJesse Buhagiar <jooster669@gmail.com>2021-05-30 16:56:56 +1000
committerLinus Groh <mail@linusgroh.de>2021-05-31 14:59:47 +0100
commit573c1c82f7ea47a33f2899a94a4594e55a3121cc (patch)
tree08b00a89616c9a214d40999722451b3560bebf9a /Userland/Libraries/LibGL/SoftwareGLContext.cpp
parent52e5d3c961711611e6ae74047812515ed3f9a9df (diff)
downloadserenity-573c1c82f7ea47a33f2899a94a4594e55a3121cc.zip
LibGL: Implement glActiveTexture
Diffstat (limited to 'Userland/Libraries/LibGL/SoftwareGLContext.cpp')
-rw-r--r--Userland/Libraries/LibGL/SoftwareGLContext.cpp7
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);