From 1a4003fcc0ce9f81d506ceee64d567a008d599d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sun, 12 May 2024 22:50:22 +0200 Subject: [PATCH] Add clarification about the RenderTexture state after creation --- include/SFML/Graphics/RenderTexture.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/SFML/Graphics/RenderTexture.hpp b/include/SFML/Graphics/RenderTexture.hpp index 8e75397af..959293f23 100644 --- a/include/SFML/Graphics/RenderTexture.hpp +++ b/include/SFML/Graphics/RenderTexture.hpp @@ -72,11 +72,15 @@ public: /// Before calling this function, the render-texture is in /// an invalid state, thus it is mandatory to call it before /// doing anything with the render-texture. + /// /// The last parameter, \a depthBuffer, is useful if you want /// to use the render-texture for 3D OpenGL rendering that requires /// a depth buffer. Otherwise it is unnecessary, and you should /// leave this parameter to false (which is its default value). /// + /// After creation, the contents of the render-texture are undefined. + /// Call `RenderTexture::clear` first to ensure a single color fill. + /// /// \param width Width of the render-texture /// \param height Height of the render-texture /// \param depthBuffer Do you want this render-texture to have a depth buffer? @@ -94,11 +98,15 @@ public: /// Before calling this function, the render-texture is in /// an invalid state, thus it is mandatory to call it before /// doing anything with the render-texture. + /// /// The last parameter, \a settings, is useful if you want to enable /// multi-sampling or use the render-texture for OpenGL rendering that /// requires a depth or stencil buffer. Otherwise it is unnecessary, and /// you should leave this parameter at its default value. /// + /// After creation, the contents of the render-texture are undefined. + /// Call `RenderTexture::clear` first to ensure a single color fill. + /// /// \param width Width of the render-texture /// \param height Height of the render-texture /// \param settings Additional settings for the underlying OpenGL texture and context