diff --git a/include/SFML/Graphics/RenderTexture.hpp b/include/SFML/Graphics/RenderTexture.hpp index da33e098..501c530d 100644 --- a/include/SFML/Graphics/RenderTexture.hpp +++ b/include/SFML/Graphics/RenderTexture.hpp @@ -108,6 +108,29 @@ public : //////////////////////////////////////////////////////////// bool isSmooth() const; + //////////////////////////////////////////////////////////// + /// \brief Enable or disable texture repeating + /// + /// This function is similar to Texture::setRepeated. + /// This parameter is disabled by default. + /// + /// \param repeated True to enable repeating, false to disable it + /// + /// \see isRepeated + /// + //////////////////////////////////////////////////////////// + void setRepeated(bool repeated); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the texture is repeated or not + /// + /// \return True if texture is repeated + /// + /// \see setRepeated + /// + //////////////////////////////////////////////////////////// + bool isRepeated() const; + //////////////////////////////////////////////////////////// /// \brief Activate of deactivate the render-texture for rendering /// diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp index 601784a0..763839aa 100644 --- a/src/SFML/Graphics/RenderTexture.cpp +++ b/src/SFML/Graphics/RenderTexture.cpp @@ -99,6 +99,20 @@ bool RenderTexture::isSmooth() const } +//////////////////////////////////////////////////////////// +void RenderTexture::setRepeated(bool repeated) +{ + m_texture.setRepeated(repeated); +} + + +//////////////////////////////////////////////////////////// +bool RenderTexture::isRepeated() const +{ + return m_texture.isRepeated(); +} + + //////////////////////////////////////////////////////////// bool RenderTexture::setActive(bool active) {