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

Use sf::Shader::Bind() correctly after latest update of the SFML's API. #2

Merged
merged 1 commit into from Apr 12, 2021
Merged

Use sf::Shader::Bind() correctly after latest update of the SFML's API. #2

merged 1 commit into from Apr 12, 2021

Conversation

SylvainBoilard
Copy link
Contributor

Hi,

In latests revisions of SFML, to bind a shader, one now needs to call the static method sf::Shader::bind() giving it a pointer to the desired shader as a parameter, and unbinding is done by passing NULL to this method. It's also not necessary to check for the shader to be non-NULL before calling the method anymore, except if you want to avoid unnecessary GL calls at all when shader is NULL.

Attached patch allows to use the latest version of SFML and removes the non-NULL tests before calling sf::Shader::bind().

Bye,

Sylvain

@SylvainBoilard
Copy link
Contributor Author

Hi,

So I see a bit of activity happened two days ago but this pull request hasn’t been merged yet. Incidentally the game still won’t build against the official release of SFML 2.0 .

Is there something I should modify in this patch to get it merged ?

@bigfatbird
Copy link
Contributor

Well, the game in my setup only compiles with the fix commited by @DeathlyDeep.

@rekado
Copy link

rekado commented Oct 16, 2013

I confirm that the patch by @DeathlyDeep does indeed fix the compilation issues on Fedora 19 with the released version of SFML 2.0.

@Mailaender
Copy link
Contributor

👍 I can confirm that this fixes #13 on @openSUSE 13.1

@carstene1ns
Copy link

We are using a git build of SFML 2.1 on Arch Linux, a user of the m.a.r.s. AUR package created a similar patch some time ago to allow building. It seems like the patch here is better, though.

jwrdegoede pushed a commit to jwrdegoede/M.A.R.S. that referenced this pull request Jan 2, 2016
@eXpl0it3r eXpl0it3r merged commit 9a8be5e into thelaui:master Apr 12, 2021
@eXpl0it3r
Copy link
Collaborator

Thanks for the fix! 🙂

@eXpl0it3r eXpl0it3r added the bug label Apr 12, 2021
@SylvainBoilard SylvainBoilard deleted the fix_for_sfml_latest branch April 13, 2021 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Repository Reactivation
Merged / Applied
Development

Successfully merging this pull request may close these issues.

None yet

6 participants