Drawing Coloured Verts


Hello! I’ve been working on haxe externs for ImGui and I’d like to get an openFL example going but can’t figure out how.

ImGui outputs a list of indexed verts with UV and colour for each so it remains render agnostic. I’ve been using the graphics API with the bitmap fill and draw triangles and I’ve managed to get the basic shapes drawing but it’s the per vertex colours I can’t figure out.

In my haxeflixel example I used FlxStrip which also uses draw triangles but since haxeflixel uses an older version of openfl they have an extra colour argument to change the colour of each vert. How would I go about drawing individually coloured verts in openfl?



I think OpenFL would get much nicer with a proper way to draw arbitrary vertex arrays with colors and uvs.

I am also waiting to write a reasonably efficient (latest) Spine renderer for OpenFL, but I can’t until this is solved.
That would be definitely helpful for your case of integrating imgui as well for sure.