mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
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
|
||||
/// 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
|
||||
|
Loading…
Reference in New Issue
Block a user