SFML-haskell / SFML

Low level Haskell bindings for SFML 2.x
MIT License
41 stars 11 forks source link

fix: was no longer building due to function being deprecated #29

Open MartinFillon opened 9 months ago

jeannekamikaze commented 9 months ago

Hi, thank you.

I believe this alone is not sufficient to bring the bindings up-to-date with a more recent SFML. Specifically, these C helper functions are used from the Shader module here and here, for example. So you would need to change those too and also rename the Haskell functions accordingly.

The reality also is that the bindings have not been updated in a while, and there are probably other modules aside from Shader that need updates. If you are interested in helping out, you are more than welcome.

MartinFillon commented 9 months ago

Well I made the pr for the sake of doing it as I wanted to try and compile it on my machine, but later saw it was far out of date. We can close this. But its strange that it doesn't fail from compilling, it was even the other way when I tried changing the ccall it was failling to compile again.

jeannekamikaze commented 9 months ago

Yep, indeed, the bindings are several minor versions behind.

I think by changing the cbits you fixed the error with, e.g., sfShader_setVector2Parameter not being declared in the SFML headers anymore. But on the other hand the Haskell's ccall is dynamically linking the SFML library and you won't encounter the link error until you run an application.

MartinFillon commented 9 months ago

It is still declared, and will still work with something that allows deprecated usage, its just marked with the CSFML_DEPRECATED