summaryrefslogtreecommitdiff
path: root/src/SFML/Graphics/RenderTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFML/Graphics/RenderTexture.cpp')
-rw-r--r--src/SFML/Graphics/RenderTexture.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp
index 51abee9..95cfa55 100644
--- a/src/SFML/Graphics/RenderTexture.cpp
+++ b/src/SFML/Graphics/RenderTexture.cpp
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
+// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -58,6 +58,9 @@ bool RenderTexture::create(unsigned int width, unsigned int height, bool depthBu
////////////////////////////////////////////////////////////
bool RenderTexture::create(unsigned int width, unsigned int height, const ContextSettings& settings)
{
+ // Set texture to be in sRGB scale if requested
+ m_texture.setSrgb(settings.sRgbCapable);
+
// Create the texture
if (!m_texture.create(width, height))
{
@@ -178,6 +181,13 @@ Vector2u RenderTexture::getSize() const
////////////////////////////////////////////////////////////
+bool RenderTexture::isSrgb() const
+{
+ return m_impl->isSrgb();
+}
+
+
+////////////////////////////////////////////////////////////
const Texture& RenderTexture::getTexture() const
{
return m_texture;