From 8bc4460d15a9c095df7cd2eb1e9a996c9ddd8b3b Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Sun, 22 Nov 2009 22:15:56 +0000 Subject: [PATCH] Added an automatic Flush() when drawing with a shader (temporary workaround to make shaders parameters work properly) git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1283 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Graphics/RenderTarget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index b0b8ab101..70777eb5b 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -118,6 +118,10 @@ void RenderTarget::Draw(const Drawable& object, const Shader& shader) // Restore the previous render states myRenderQueue.PopStates(); + + // For now, drawing with a shader cannot be batched because of the shader's parameters + // @todo Find a better solution! + Flush(); }