Minor correction the API doc of sf::Shader
This commit is contained in:
parent
ac9bda51ca
commit
8eb5073c33
@ -579,16 +579,19 @@ private :
|
|||||||
/// To apply a shader to a drawable, you must pass it as an
|
/// To apply a shader to a drawable, you must pass it as an
|
||||||
/// additional parameter to the Draw function:
|
/// additional parameter to the Draw function:
|
||||||
/// \code
|
/// \code
|
||||||
/// window.draw(sprite, shader);
|
/// window.draw(sprite, &shader);
|
||||||
/// \endcode
|
/// \endcode
|
||||||
///
|
///
|
||||||
/// ... which is in fact just a shortcut for this:
|
/// ... which is in fact just a shortcut for this:
|
||||||
/// \code
|
/// \code
|
||||||
/// sf::RenderStates states;
|
/// sf::RenderStates states;
|
||||||
/// states.shader = shader;
|
/// states.shader = &shader;
|
||||||
/// window.draw(sprite, states);
|
/// window.draw(sprite, states);
|
||||||
/// \endcode
|
/// \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
|
/// Shaders can be used on any drawable, but some combinations are
|
||||||
/// not interesting. For example, using a vertex shader on a sf::Sprite
|
/// not interesting. For example, using a vertex shader on a sf::Sprite
|
||||||
/// is limited because there are only 4 vertices, the sprite would
|
/// is limited because there are only 4 vertices, the sprite would
|
||||||
|
Loading…
Reference in New Issue
Block a user