veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.21k stars 221 forks source link

refactor: RenderGeometryRaw to use exactly same API #546

Closed firodj closed 1 year ago

firodj commented 1 year ago

I saw different parameters for RenderGeometryRaw with actual SDL2 API. This change enables ImGui to use SDL Renderer.

veeableful commented 1 year ago

Hi @firodj, thanks for the PR! Could you help me see the reason for introducing this change? I'm not familiar with ImGui so more elaboration would be appreciated.

firodj commented 1 year ago

here is how to use (taken from ImGUI C Examples):

https://github.com/firodj/imgui-go-examples/blob/sdlrenderer/internal/renderers/SDL.go#L152

veeableful commented 1 year ago

Thanks @firodj! I think I see the issue now. I will merge it to master and v0.4.x branches and also create a new tag v0.4.28 with this change.