mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 21:36:13 +01:00
Added missing SetSmooth / IsSmooth for sfRenderTexture
This commit is contained in:
1 parent
17e5d60619
commit
a56471ad0f
2 files changed
+36
No files matched your search
@@ -245,5 +245,24 @@ CSFML_GRAPHICS_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTex
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture);
|
CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// \brief Enable or disable the smooth filter on a render texture
|
||||||
|
///
|
||||||
|
/// \param renderTexture Render texture object
|
||||||
|
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
|
||||||
|
///
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
CSFML_GRAPHICS_API void sfRenderTexture_SetSmooth(sfRenderTexture* renderTexture, sfBool smooth);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
/// \brief Tell whether the smooth filter is enabled or not for a render texture
|
||||||
|
///
|
||||||
|
/// \param renderTexture Render texture object
|
||||||
|
///
|
||||||
|
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
|
||||||
|
///
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
CSFML_GRAPHICS_API sfBool sfRenderTexture_IsSmooth(const sfRenderTexture* renderTexture);
|
||||||
|
|
||||||
|
|
||||||
#endif // SFML_RENDERTEXTURE_H
|
#endif // SFML_RENDERTEXTURE_H
|
||||||
@@ -226,3 +226,20 @@ const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture
|
|||||||
|
|
||||||
return renderTexture->Target;
|
return renderTexture->Target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
void sfRenderTexture_SetSmooth(sfRenderTexture* renderTexture, sfBool smooth)
|
||||||
|
{
|
||||||
|
CSFML_CALL(renderTexture, SetSmooth(smooth == sfTrue));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
sfBool sfRenderTexture_IsSmooth(const sfRenderTexture* renderTexture)
|
||||||
|
{
|
||||||
|
CSFML_CHECK_RETURN(renderTexture, sfFalse);
|
||||||
|
CSFML_CHECK_RETURN(renderTexture->This, sfFalse);
|
||||||
|
|
||||||
|
return renderTexture->This.IsSmooth();
|
||||||
|
}
|
||||||
Reference in new issue
Block a user