Permalink
Browse files

Merge pull request #363 from Foaly/repeatedRenderTexture

Added repeating to sf::RenderTexture
  • Loading branch information...
2 parents ef78b6d + ba2d086 commit f5b9c7e2160e758f32aa6453c9f6b001fabbcca8 @LaurentGomila LaurentGomila committed Mar 6, 2013
Showing with 37 additions and 0 deletions.
  1. +23 −0 include/SFML/Graphics/RenderTexture.hpp
  2. +14 −0 src/SFML/Graphics/RenderTexture.cpp
@@ -109,6 +109,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
///
/// This function makes the render-texture's context current for
@@ -100,6 +100,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)
{
return m_impl && m_impl->activate(active);

0 comments on commit f5b9c7e

Please sign in to comment.