aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/pipelines/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/opengl/pipelines/shader.cpp')
-rw-r--r--backends/graphics/opengl/pipelines/shader.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/backends/graphics/opengl/pipelines/shader.cpp b/backends/graphics/opengl/pipelines/shader.cpp
index 69af911fc6..46e81423c5 100644
--- a/backends/graphics/opengl/pipelines/shader.cpp
+++ b/backends/graphics/opengl/pipelines/shader.cpp
@@ -38,6 +38,12 @@ void ShaderPipeline::activateInternal() {
if (g_context.multitextureSupported) {
GL_CALL(glActiveTexture(GL_TEXTURE0));
}
+
+ _activeShader->activate();
+}
+
+void ShaderPipeline::deactivateInternal() {
+ _activeShader->deactivate();
}
void ShaderPipeline::setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
@@ -53,9 +59,7 @@ void ShaderPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordi
}
void ShaderPipeline::setProjectionMatrix(const GLfloat *projectionMatrix) {
- if (isActive() && _activeShader) {
- _activeShader->activate(projectionMatrix);
- }
+ _activeShader->setUniform("projection", new ShaderUniformMatrix44(projectionMatrix));
}
#endif // !USE_FORCED_GLES