turion / rhine

Haskell Functional Reactive Programming framework with type-level clocks
http://hackage.haskell.org/package/rhine
123 stars 21 forks source link

Add SDL wrappers #35

Open turion opened 6 years ago

turion commented 6 years ago

@ivanperez-keera which SDL bindings are the best to work with for us?

ivanperez-keera commented 6 years ago

I always found SDL1.2 easiest to use. If you care about performance, SDL2 has graphics acceleration.

You can find SDL2 bindings here: https://github.com/haskell-game/sdl2/

ivanperez-keera commented 6 years ago

What is there to do? In Yampa, the answer is nothing, really: everything happens externally.

turion commented 6 years ago

This is too big an issue for right now, since quite some care needs to be taken in order to use SDL in the right way. All the more important to have a good abstraction that handles all the pitfalls correctly.

ivanperez-keera commented 6 years ago

Just for documentation, and to facilitate working on this in the future, perhaps you could include a minimal example that shows where you are (stuck?) right now?

turion commented 6 years ago

I have some notes on the feature_sdl2 branch. Basically, every SDL subsystem (audio, video, events etc.) or maybe even every device should have an associated clock. But I ran into too many pitfalls with SDL now already that I want to understand SDL better before I attempt it. Or maybe someone else wants to give it a try.