From 121cfeb6a3685e2529b717d5667ee6601533c30e Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Sat, 20 Oct 2012 23:38:39 +0200 Subject: [PATCH] Removed Shader::unbind (was not used internally, less consistent with sf::Texture and could be confusing for users) --- include/SFML/Graphics/Shader.hpp | 15 --------------- src/SFML/Graphics/Shader.cpp | 9 --------- 2 files changed, 24 deletions(-) diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index 897d7d63..8fb95c00 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -457,26 +457,11 @@ public : /// window.setActive(); /// shader.bind(); /// ... render OpenGL geometry ... - /// shader.unbind(); /// \endcode /// - /// \see unbind - /// //////////////////////////////////////////////////////////// void bind() const; - //////////////////////////////////////////////////////////// - /// \brief Unbind the shader (deactivate it) - /// - /// This function is normally for internal use only, unless - /// you want to use the shader with a custom OpenGL rendering - /// instead of a SFML drawable. - /// - /// \see bind - /// - //////////////////////////////////////////////////////////// - void unbind() const; - //////////////////////////////////////////////////////////// /// \brief Tell whether or not the system supports shaders /// diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index d219aa66..be6dc1d8 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -429,15 +429,6 @@ void Shader::bind() const } -//////////////////////////////////////////////////////////// -void Shader::unbind() const -{ - ensureGlContext(); - - glCheck(glUseProgramObjectARB(0)); -} - - //////////////////////////////////////////////////////////// bool Shader::isAvailable() {