From c0af511ed1494ff6ed56b34123d2a8167fc8edfe Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Sat, 31 Dec 2011 11:42:05 +0100 Subject: [PATCH] Fixed glBindProgramObject used on systems that don't support shaders --- src/SFML/Graphics/RenderTarget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index 113e666e4..9c1a055fe 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -270,7 +270,8 @@ void RenderTarget::ResetGLStates() ApplyBlendMode(BlendAlpha); ApplyTransform(Transform::Identity); ApplyTexture(NULL); - ApplyShader(NULL); + if (Shader::IsAvailable()) + ApplyShader(NULL); myCache.UseVertexCache = false; // Set the default view