[Scummvm-cvs-logs] scummvm master -> 8ff5329b496c4d599f95eb2703716506bff94ffa
lordhoto
lordhoto at gmail.com
Tue May 3 20:49:10 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8ff5329b49 OPENGL: Assure color attributes for shader pipeline are always set.
Commit: 8ff5329b496c4d599f95eb2703716506bff94ffa
https://github.com/scummvm/scummvm/commit/8ff5329b496c4d599f95eb2703716506bff94ffa
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-05-03T20:43:18+02:00
Commit Message:
OPENGL: Assure color attributes for shader pipeline are always set.
Changed paths:
backends/graphics/opengl/pipelines/shader.cpp
backends/graphics/opengl/texture.cpp
diff --git a/backends/graphics/opengl/pipelines/shader.cpp b/backends/graphics/opengl/pipelines/shader.cpp
index 8e38458..a2dabb7 100644
--- a/backends/graphics/opengl/pipelines/shader.cpp
+++ b/backends/graphics/opengl/pipelines/shader.cpp
@@ -56,6 +56,8 @@ void ShaderPipeline::activateInternal() {
}
_activeShader->activate();
+
+ GL_CALL(glVertexAttribPointer(_colorAttribLocation, 4, GL_FLOAT, GL_FALSE, 0, _colorAttributes));
}
void ShaderPipeline::deactivateInternal() {
@@ -74,8 +76,6 @@ void ShaderPipeline::setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
*dst++ = b;
*dst++ = a;
}
-
- GL_CALL(glVertexAttribPointer(_colorAttribLocation, 4, GL_FLOAT, GL_FALSE, 0, _colorAttributes));
}
void ShaderPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordinates) {
diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp
index 8b94549..33598b5 100644
--- a/backends/graphics/opengl/texture.cpp
+++ b/backends/graphics/opengl/texture.cpp
@@ -509,6 +509,7 @@ TextureCLUT8GPU::TextureCLUT8GPU()
// Setup pipeline.
_clut8Pipeline->setFramebuffer(_target);
_clut8Pipeline->setPaletteTexture(&_paletteTexture);
+ _clut8Pipeline->setColor(1.0f, 1.0f, 1.0f, 1.0f);
}
TextureCLUT8GPU::~TextureCLUT8GPU() {
More information about the Scummvm-git-logs
mailing list