Closed Froyok closed 2 years ago
The crash is happening because AddImage
is a method of the ImDrawList
, so it should be called with a colon
DrawList:AddImage(
CANVAS,
IMGUI.ImVec2_Float( 0.0, 0.0 ), -- Start
IMGUI.ImVec2_Float( 256.0, 32.0 ), -- End
IMGUI.ImVec2_Float( 0.0, 0.0 ), -- UV min
IMGUI.ImVec2_Float( 1.0, 1.0 ) -- UV max
)
That fixed it, thx ! :)
Other than that you are using the DrawList correctly, just passing a LÖVE texture where ImGui expects a ImTextureID
should work with all functions.
Hi,
Love2D crash as soon as I try to draw an image via a DrawList in a window. Regular widgets (text, image, separator, etc) work fine.
Maybe I'm doing something wrong and there is actually no bugs, but without documentation regarding DrawList it's a bit hard to be sure if there should be specific setup compared to normal Imgui commands. Usually an incorrect setup lead to an Imgui assert or similar.
System and version:
Steps to reproduce:
With the following script, Love2D starts but freeze before drawing anything and then crash without any callstack/imgui error message: