moderngl / moderngl-window

A cross platform utility library for ModernGL making window creation and resource loading simple
MIT License
244 stars 57 forks source link

imgui images don't correctly render #94

Closed jrjbertram closed 4 years ago

jrjbertram commented 4 years ago

Issue: imgui images don't render correctly. In discord discussion, we figured out that textures need to be drawn in the command loop. The reproducer zip file contains a reproducer, a sample image, and a hack fix that we discussed. It should be unzipped into the examples directory.

image

Reproducer:

reproducer.zip

C:\Users\josh\divQ\moderngl-window\examples>unzip -l reproducer.zip
Archive:  reproducer.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     3835  2020-06-13 09:38   integration_imgui.py
        0  2020-06-13 09:32   data/
     8587  2020-06-13 09:42   ../moderngl_window/integrations/imgui.py
    20123  2020-06-13 09:32   data/fruit.jpg
---------                     -------
    32545                     4 files
einarf commented 4 years ago

Fixed. Example : https://github.com/moderngl/moderngl-window/blob/master/examples/integration_imgui_image.py