Added new methods to set uniforms in sf::Shader
Implements a new design for the shader uniform API. * Added Shader::setUniform() and Shader::setUniformArray() overloads for the following types: -> scalars: float, int, bool -> vectors: 2D, 3D, 4D -> matrices: 3x3, 4x4 -> arrays of basic types -> samplers (sf::Texture) -> conversions for SFML types (sf::Transform, sf::Color) * Added sf::Glsl namespace with GLSL-equivalent types * Deprecated Shader::setParameter() overloads Other related changes: * Refactored sf::Shader internals to avoid code duplication * Improved documentation * Added SFML_DEPRECATED macro to Doxyfile * Defined _SCL_SECURE_NO_WARNINGS to disable std::copy() warnings on MSVC
This commit is contained in:
parent
fcb05fb975
commit
9c5c750e60
10 changed files with 1272 additions and 321 deletions
|
@ -125,9 +125,9 @@ if(NOT BUILD_SHARED_LIBS)
|
|||
add_definitions(-DSFML_STATIC)
|
||||
endif()
|
||||
|
||||
# remove SL security warnings with Visual C++
|
||||
# Visual C++: remove warnings regarding SL security and algorithms on pointers
|
||||
if(SFML_COMPILER_MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# define SFML_OPENGL_ES if needed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue