File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -185,12 +185,24 @@ CSFML_GRAPHICS_API void sfTexture_destroy(const sfTexture* texture);
185185///
186186/// \param texture Texture to resize
187187/// \param size Width and height of the texture
188- /// \param sRgb `true` to enable sRGB conversion, `false` to disable it
189188///
190189/// \return `true` if resizing was successful, `false` if it failed
191190///
192191////////////////////////////////////////////////////////////
193- CSFML_GRAPHICS_API bool sfTexture_resize (sfTexture * texture , sfVector2u size , bool sRgb );
192+ CSFML_GRAPHICS_API bool sfTexture_resize (sfTexture * texture , sfVector2u size );
193+
194+ ////////////////////////////////////////////////////////////
195+ /// \brief Resize the texture with sRGB-enabled
196+ ///
197+ /// If this function fails, the texture is left unchanged.
198+ ///
199+ /// \param texture Texture to resize
200+ /// \param size Width and height of the texture
201+ ///
202+ /// \return `true` if resizing was successful, `false` if it failed
203+ ///
204+ ////////////////////////////////////////////////////////////
205+ CSFML_GRAPHICS_API bool sfTexture_resizeSrgb (sfTexture * texture , sfVector2u size );
194206
195207////////////////////////////////////////////////////////////
196208/// \brief Return the size of the texture
Original file line number Diff line number Diff line change @@ -171,11 +171,20 @@ void sfTexture_destroy(const sfTexture* texture)
171171
172172
173173// //////////////////////////////////////////////////////////
174- bool sfTexture_resize (sfTexture* texture, sfVector2u size, bool sRgb )
174+ bool sfTexture_resize (sfTexture* texture, sfVector2u size)
175175{
176176 assert (texture);
177177 assert (texture->This );
178- return texture->This ->resize (convertVector2 (size), sRgb );
178+ return texture->This ->resize (convertVector2 (size), false );
179+ }
180+
181+
182+ // //////////////////////////////////////////////////////////
183+ bool sfTexture_resizeSrgb (sfTexture* texture, sfVector2u size)
184+ {
185+ assert (texture);
186+ assert (texture->This );
187+ return texture->This ->resize (convertVector2 (size), true );
179188}
180189
181190
You can’t perform that action at this time.
0 commit comments