Skip to content

Commit 29dbc25

Browse files
Support SFML 3 API (#208)
1 parent 291c33f commit 29dbc25

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

imgui-SFML.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,15 @@ bool UpdateFontTexture() {
784784
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
785785

786786
sf::Texture& texture = s_currWindowCtx->fontTexture;
787+
#if SFML_VERSION_MAJOR >= 3
788+
if (!texture.create(sf::Vector2u(width, height))) {
789+
return false;
790+
}
791+
#else
787792
if (!texture.create(width, height)) {
788793
return false;
789794
}
795+
#endif
790796

791797
texture.update(pixels);
792798

0 commit comments

Comments
 (0)