slages / love-imgui

imgui module for the LÖVE game engine
MIT License
318 stars 61 forks source link

expose draw list user callback #14

Open shakesoda opened 7 years ago

shakesoda commented 7 years ago

I've got a bunch of custom views, but without a way to set callbacks on the draw lists I have to draw them to a canvas and draw them as images... it's awkward and a lot slower than just being able to give it a draw function.

image

^ this involves a ton of canvases, but most of them wouldn't be needed if I had a render callback (I'd just need the one for shaded view)

short of fully exposing ImDrawList, something like imgui.AddCallback(fn) which just gets the window draw list and adds the callback (i.e.GetWindowDrawList()->AddCallback(...)) would be wonderful