Skip to content

Fix SFML example to build with SFML 3.0 #163

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

Merged
merged 1 commit into from
May 20, 2025
Merged

Conversation

jjuhl
Copy link
Contributor

@jjuhl jjuhl commented Mar 15, 2025

No real functional changes, just small tweaks to make the SFML example build with SFML 3.0

@fallahn
Copy link
Owner

fallahn commented Mar 15, 2025

Thanks! I've not kept up with SFML for a while... I assume this isn't compatible with 2.x? If so it might be worth making this a separate example as some people are still using the old version.

@jjuhl
Copy link
Contributor Author

jjuhl commented Mar 15, 2025

I haven't tested with SFML 2.x since the only system I have access to ATM only has SFML 3.0.

@fallahn
Copy link
Owner

fallahn commented Mar 16, 2025

OK, well I'll hold off on this until I know for sure - I don't want to break anything for existing users! Thanks 😁

@GuidoBisocoli
Copy link

GuidoBisocoli commented Apr 15, 2025

Just wanting to suggest that you could make another folder like SFML3Example and upload this. For the people that is migrating, like me, I downloaded tmxLite for migrating my project and did the migration of tmxLite example just to later see this pull request. I should have checked but still, it can help others :D

I haven't tested with SFML 2.x since the only system I have access to ATM only has SFML 3.0.

I can confirm it won't work on SFML 2.x, there is some code that's not compatible with 2.x like Primitives::Triangles for example.

@jjuhl
Copy link
Contributor Author

jjuhl commented Apr 30, 2025

I've managed to get a chance to test with SFML 2 myself and no, it doesn't work. But then again, the original code doesn't work with SFML 3 either.
In my opinion you should either add a SFML 3 example that works or just do a new release that drops support for SFML 2 (and fixes the code to work for SFML3). But, your library, your choice :)
You have my contribution, you can do with it whatever you like :)

@fallahn
Copy link
Owner

fallahn commented Apr 30, 2025

Sure, I'll be happy to have two examples included. If you want to rename yours/move it to its own directory I'll merge the PR 👍

Copy the existing SFML example to a new directory "SFML3Example" and make it build and run with SFML 3.

No real functional changes, just small tweaks to make the SFML example build with SFML 3.0
@jjuhl
Copy link
Contributor Author

jjuhl commented May 20, 2025

Ok. I changed it to create a new example in a new directory ("SFML3Example") and it's now up there as commit aa2fd8d

@fallahn fallahn merged commit 20785a1 into fallahn:master May 20, 2025
9 checks passed
@fallahn
Copy link
Owner

fallahn commented May 20, 2025

Fantastic, thank you!

@jjuhl
Copy link
Contributor Author

jjuhl commented May 20, 2025

Whoops, there are a few places where I screwed up while rebasing and editing my commit, so in (for example) "SFML3Example/SFMLExample/CMakeLists.txt" I forgot to change the "PROJECT_NAME" to "SFML3_example" and there may be other errors I missed. Sorry about that.

@fallahn
Copy link
Owner

fallahn commented May 20, 2025

No worries! I can tidy it up when I have a chance, or you can always submit another PR 😁 Thanks again!

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