flyover / imgui-js

JavaScript bindings for Dear ImGui using Emscripten and TypeScript
https://flyover.github.io/imgui-js/example/
MIT License
915 stars 98 forks source link

ImGui.TextColored failed to change color when use CanvasRenderingContext2D #43

Open 40kg opened 2 years ago

40kg commented 2 years ago

I try to show text with red color by ImGui.TextColored, it works good with webgl, but failed with CanvasRenderingContext2D. I use imgui_imp.ts as my render code, and get canvas by getContext("2d"). Could you give me some help, Thanks a lot!

40kg commented 2 years ago

Well, I resolve it by use another canvas with webgl, then draw the new canvas as a image to main canvas.