From 8eb5073c33312995047055b576147b122457ddbe Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Wed, 30 May 2012 17:22:13 +0200 Subject: [PATCH] Minor correction the API doc of sf::Shader --- include/SFML/Graphics/Shader.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index fc4a1983e..8b8633a42 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -579,16 +579,19 @@ private : /// To apply a shader to a drawable, you must pass it as an /// additional parameter to the Draw function: /// \code -/// window.draw(sprite, shader); +/// window.draw(sprite, &shader); /// \endcode /// /// ... which is in fact just a shortcut for this: /// \code /// sf::RenderStates states; -/// states.shader = shader; +/// states.shader = &shader; /// window.draw(sprite, states); /// \endcode /// +/// In the code above we pass a pointer to the shader, because it may +/// be null (which means "no shader"). +/// /// Shaders can be used on any drawable, but some combinations are /// not interesting. For example, using a vertex shader on a sf::Sprite /// is limited because there are only 4 vertices, the sprite would