1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From: Sylvain BOILARD <boilard@crans.org>
Date: Wed, 23 Jan 2013 02:02:47 +0100
Subject: Use sf::Shader::Bind() correctly
Forwarded: https://github.com/thelaui/M.A.R.S./pull/2
---
src/System/window.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/System/window.cpp b/src/System/window.cpp
index e9a099a..3ffcf65 100644
--- a/src/System/window.cpp
+++ b/src/System/window.cpp
@@ -307,13 +307,11 @@ namespace window {
window_.setActive(true);
glEnable(GL_TEXTURE_2D);
- if (shader)
- shader->bind();
+ sf::Shader::bind(shader);
window_.draw(toBeDrawn, states);
- if (shader)
- shader->unbind();
+ sf::Shader::bind(NULL);
window_.popGLStates();
glPopMatrix();
|