diff --git a/include/SFML/Graphics/RenderTexture.h b/include/SFML/Graphics/RenderTexture.h index e81dd8a..c0ee44c 100644 --- a/include/SFML/Graphics/RenderTexture.h +++ b/include/SFML/Graphics/RenderTexture.h @@ -245,5 +245,24 @@ CSFML_GRAPHICS_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTex //////////////////////////////////////////////////////////// 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 diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp index dbab4d0..1091716 100644 --- a/src/SFML/Graphics/RenderTexture.cpp +++ b/src/SFML/Graphics/RenderTexture.cpp @@ -226,3 +226,20 @@ const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture 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(); +}