haskell-game / dear-imgui.hs

Haskell bindings to Dear ImGui, an immediate mode GUI toolkit
BSD 3-Clause "New" or "Revised" License
143 stars 31 forks source link

Add support for SDL2 Renderer backend #193

Closed jship closed 11 months ago

jship commented 11 months ago

Closes #191. Here is a gif showing the added example program using the SDL2 renderer:

sdlrenderer

There are a couple stray commits included that add a withCloseableWindow variant and framerate as the SDL2 Renderer example uses these bits. Let me know if there is a preference on splitting those out into separate PRs.

dpwiz commented 11 months ago

error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function

Hm... This prompts us to use a distinct flag for the renderer. Something like sdl-renderer (default=true, manual=false). The Hackage, Stackage and a bunch of LTS distros (ubuntu 20.04 still on 2.0.10) don't have it.

jship commented 11 months ago

Nice catch! 84ae15007dfd405486dea8d7a1b1b4ff92a713ef has the new flag.