Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ImTextureID type #298

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Fix ImTextureID type #298

merged 2 commits into from
Oct 15, 2024

Conversation

pifopi
Copy link
Contributor

@pifopi pifopi commented Oct 15, 2024

Hello !

I just wanted to report an issue with latest ImGUI. More specifically
ocornut/imgui@92b9498

I do know that my current solution means older ImGUI version wouldn't work anymore so I'm wondering what would be the best solution in your opinion (Check the type of ImTextureID and assign it accordingly ? Force the type of ImTextureID to be void* ?)

Thanks in advance

@pifopi pifopi marked this pull request as draft October 15, 2024 09:55
@peytonk132
Copy link
Contributor

I had the same problem and I made it a reinterpret_cast so it becomes reinterpret_cast<ImTextureID>(nullptr);

@pifopi
Copy link
Contributor Author

pifopi commented Oct 15, 2024

After thinking a bit more, using the {} constructor would make it work no matter what the underlying type is (no matter if the user pick a different type, is on a previous version or the current version). Also, it avoids relying on define

@pifopi pifopi marked this pull request as ready for review October 15, 2024 16:22
@ChrisThrasher
Copy link
Member

After thinking a bit more, using the {} constructor would make it work no matter what the underlying type is (no matter if the user pick a different type, is on a previous version or the current version). Also, it avoids relying on define

Sounds good to me

@ChrisThrasher ChrisThrasher merged commit 560baa9 into SFML:master Oct 15, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants