diff options
author | Johannes Schickel | 2016-01-04 06:41:10 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-03-16 20:29:26 +0100 |
commit | f5f1b6eba0d409abcda2a3c037a177d6f6e41a2e (patch) | |
tree | 7185022bb128795f3035de8925d04d98784a1afa /backends/graphics/opengl/texture.cpp | |
parent | 08553a09cfa2110d56b200bf6c69d01d5adbc6bb (diff) | |
download | scummvm-rg350-f5f1b6eba0d409abcda2a3c037a177d6f6e41a2e.tar.gz scummvm-rg350-f5f1b6eba0d409abcda2a3c037a177d6f6e41a2e.tar.bz2 scummvm-rg350-f5f1b6eba0d409abcda2a3c037a177d6f6e41a2e.zip |
OPENGL: Introduce pipeline abstraction to cleanup code.
Diffstat (limited to 'backends/graphics/opengl/texture.cpp')
-rw-r--r-- | backends/graphics/opengl/texture.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp index f98bf8be06..61e8dc37b3 100644 --- a/backends/graphics/opengl/texture.cpp +++ b/backends/graphics/opengl/texture.cpp @@ -22,6 +22,7 @@ #include "backends/graphics/opengl/texture.h" #include "backends/graphics/opengl/shader.h" +#include "backends/graphics/opengl/pipeline.h" #include "common/rect.h" #include "common/textconsole.h" @@ -282,7 +283,7 @@ void Texture::draw(GLfloat x, GLfloat y, GLfloat w, GLfloat h) { }; // Setup coordinates for drawing. - g_context.setDrawCoordinates(vertices, _glTexture.getTexCoords()); + g_context.activePipeline->setDrawCoordinates(vertices, _glTexture.getTexCoords()); // Draw the texture to the screen buffer. GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); @@ -649,7 +650,7 @@ void TextureCLUT8GPU::draw(GLfloat x, GLfloat y, GLfloat w, GLfloat h) { }; // Setup coordinates for drawing. - g_context.setDrawCoordinates(vertices, _glTexture.getTexCoords()); + g_context.activePipeline->setDrawCoordinates(vertices, _glTexture.getTexCoords()); // Draw the texture to the screen buffer. GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); @@ -744,7 +745,7 @@ void TextureCLUT8GPU::lookUpColors() { // Do color look up. _lookUpShader->activate(_projectionMatrix); _lookUpShader->setUniformI(_paletteLocation, 1); - g_context.setDrawCoordinates(_clut8Vertices, _clut8Texture.getTexCoords()); + g_context.activePipeline->setDrawCoordinates(_clut8Vertices, _clut8Texture.getTexCoords()); GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); // Restore old state. |