mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 12:51:05 +08:00
Minor updates in the documentation of sf::Shader
This commit is contained in:
parent
226be57589
commit
7656693013
@ -547,7 +547,7 @@ private :
|
||||
///
|
||||
/// A sf::Shader can be composed of either a vertex shader
|
||||
/// alone, a fragment shader alone, or both combined
|
||||
/// (see the variants of the Load functions).
|
||||
/// (see the variants of the load functions).
|
||||
///
|
||||
/// Shaders are written in GLSL, which is a C-like
|
||||
/// language dedicated to OpenGL shaders. You'll probably
|
||||
@ -556,17 +556,19 @@ private :
|
||||
///
|
||||
/// Like any C/C++ program, a shader has its own variables
|
||||
/// that you can set from your C++ application. sf::Shader
|
||||
/// handles 4 different types of variables:
|
||||
/// handles 5 different types of variables:
|
||||
/// \li floats
|
||||
/// \li vectors (2, 3 or 4 components)
|
||||
/// \li colors
|
||||
/// \li textures
|
||||
/// \li transforms (matrices)
|
||||
///
|
||||
/// The value of the variables can be changed at any time
|
||||
/// with either the various overloads of the setParameter function:
|
||||
/// with the various overloads of the setParameter function:
|
||||
/// \code
|
||||
/// shader.setParameter("offset", 2.f);
|
||||
/// shader.setParameter("color", 0.5f, 0.8f, 0.3f);
|
||||
/// shader.setParameter("point", 0.5f, 0.8f, 0.3f);
|
||||
/// shader.setParameter("color", sf::Color(128, 50, 255));
|
||||
/// shader.setParameter("matrix", transform); // transform is a sf::Transform
|
||||
/// shader.setParameter("overlay", texture); // texture is a sf::Texture
|
||||
/// shader.setParameter("texture", sf::Shader::CurrentTexture);
|
||||
|
Loading…
Reference in New Issue
Block a user