mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Updated CSFML
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1813 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
f632253adc
commit
10a782b871
@ -115,11 +115,20 @@ CSFML_API void sfShader_SetParameter4(sfShader* shader, const char* name, float
|
|||||||
///
|
///
|
||||||
/// \param shader : Shader to modify
|
/// \param shader : Shader to modify
|
||||||
/// \param name : Texture name in the effect
|
/// \param name : Texture name in the effect
|
||||||
/// \param texture : Image to set (pass NULL to use the texture of the object being drawn)
|
/// \param texture : Image to set
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_API void sfShader_SetTexture(sfShader* shader, const char* name, const sfImage* texture);
|
CSFML_API void sfShader_SetTexture(sfShader* shader, const char* name, const sfImage* texture);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// Set the current texture parameter in a shader
|
||||||
|
///
|
||||||
|
/// \param shader : Shader to modify
|
||||||
|
/// \param name : Texture name in the effect
|
||||||
|
///
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
CSFML_API void sfShader_SetCurrentTexture(sfShader* shader, const char* name);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// Bind a shader for rendering
|
/// Bind a shader for rendering
|
||||||
///
|
///
|
||||||
|
@ -126,7 +126,17 @@ void sfShader_SetParameter4(sfShader* shader, const char* name, float x, float y
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void sfShader_SetTexture(sfShader* shader, const char* name, const sfImage* texture)
|
void sfShader_SetTexture(sfShader* shader, const char* name, const sfImage* texture)
|
||||||
{
|
{
|
||||||
CSFML_CALL(shader, SetTexture(name, texture && texture->This ? *texture->This : sf::Shader::CurrentTexture))
|
CSFML_CHECK(texture);
|
||||||
|
CSFML_CALL(shader, SetTexture(name, *texture->This))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// Set the current texture parameter in a shader
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
void sfShader_SetCurrentTexture(sfShader* shader, const char* name)
|
||||||
|
{
|
||||||
|
CSFML_CALL(shader, SetCurrentTexture(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user