| 165 | }; |
| 166 | |
| 167 | [[nodiscard]] SpriteTextureData getSpriteTextureData(const sf::Sprite& sprite) |
| 168 | { |
| 169 | const sf::Texture& texture(sprite.getTexture()); |
| 170 | const sf::Vector2f textureSize(texture.getSize()); |
| 171 | const sf::FloatRect textureRect(sprite.getTextureRect()); |
| 172 | |
| 173 | return {toImVec2(textureRect.position.componentWiseDiv(textureSize)), |
| 174 | toImVec2((textureRect.position + textureRect.size).componentWiseDiv(textureSize)), |
| 175 | convertGLTextureHandleToImTextureID(texture.getNativeHandle())}; |
| 176 | } |
| 177 | |
| 178 | void RenderDrawLists(ImDrawData* draw_data); // rendering callback function prototype |
| 179 |
no test coverage detected