Skip to content

Commit

Permalink
Update to latest SFML 3 API
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Sep 8, 2024
1 parent 2453a1a commit acf6e4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ SpriteTextureData getSpriteTextureData(const sf::Sprite& sprite) {
const sf::Vector2f textureSize(texture.getSize());
const sf::FloatRect textureRect(sprite.getTextureRect());

return {toImVec2(textureRect.position.cwiseDiv(textureSize)),
toImVec2((textureRect.position + textureRect.size).cwiseDiv(textureSize)),
return {toImVec2(textureRect.position.componentWiseDiv(textureSize)),
toImVec2((textureRect.position + textureRect.size).componentWiseDiv(textureSize)),
convertGLTextureHandleToImTextureID(texture.getNativeHandle())};
}

Expand Down

0 comments on commit acf6e4b

Please sign in to comment.