S-IIIeix 8f0ccdbd32 Спортивные организации пре 1 недеља
..
__pycache__ 8f0ccdbd32 Спортивные организации пре 1 недеља
examples 8f0ccdbd32 Спортивные организации пре 1 недеља
examples_disabled 8f0ccdbd32 Спортивные организации пре 1 недеља
python_backends_disabled 8f0ccdbd32 Спортивные организации пре 1 недеља
LICENSE_pyimgui.txt 8f0ccdbd32 Спортивные организации пре 1 недеља
Readme.md 8f0ccdbd32 Спортивные организации пре 1 недеља
__init__.py 8f0ccdbd32 Спортивные организации пре 1 недеља
glfw_backend.py 8f0ccdbd32 Спортивные организации пре 1 недеља
opengl_backend_programmable.py 8f0ccdbd32 Спортивные организации пре 1 недеља
opengl_base_backend.py 8f0ccdbd32 Спортивные организации пре 1 недеља
pygame_backend.py 8f0ccdbd32 Спортивные организации пре 1 недеља
pyglet_backend.py 8f0ccdbd32 Спортивные организации пре 1 недеља
sdl2_backend.py 8f0ccdbd32 Спортивные организации пре 1 недеља
sdl3_backend.py 8f0ccdbd32 Спортивные организации пре 1 недеља

Readme.md

ImGui Bundle - Python backends

In this folder, you can find examples where the backend is programmed via python. You can use them if you want to control the full app cycle (i.e. not using ImmApp or HelloImGui).

Contents

python_backends/             # Backends implemented in pure python
    +-- base_backend.py
    +-- glfw_backend.py      # Those files are inspired from pyimgui bindings
    +-- opengl_backend.py    # (see https://github.com/pyimgui/pyimgui)
    +-- pyglet_backend.py
    +-- sdl2_backend.py
    +-- sdl3_backend.py
    +-- __init__.py
    +-- Readme.md
    +-- LICENSE_pyimgui.txt
    +-- examples/
        +-- example_python_backend_glfw3.py   # An example app with glfw
        +-- example_python_backend_pyglet.py  # An example app with pyglet
        +-- example_python_backend_sdl2.py    # An example app with sdl2
        +-- example_python_backend_sdl3.py    # An example app with sdl3

Notes

  • Those files are inspired from pyimgui bindings: for example, the python glfw backend is adapted from pyimgui's glfw integration
  • This is largely a work in progress, and thus incomplete. At the moment, only glfw, sdl2, sdl3 and pyglet are implemented.
  • Key binding needs to be improved (support for modifiers like Ctrl-Shift, etc.)

Using imgui_md (Markdown) without HelloImGui

imgui_md can be hosted inside a pure-python backend with no HelloImGui::Run() loop. Standard markdown features (text, headings, code blocks, tables, links) work everywhere; image and LaTeX-math rendering additionally need GPU texture uploads, which are supported only on OpenGL3 in the standalone path.

imgui_md.initialize_markdown() automatically initializes HelloImGui's GLAD function loader if you are not inside HelloImGui::Run(), so user code does not need to call hello_imgui.init_gl_loader() itself. imgui_md.de_initialize_markdown() similarly clears the asset image cache.

A complete working example lives at ../demos_python/sandbox/sandbox_md_without_hello_imgui.py (GLFW + PyOpenGL). The C++ counterpart is at bindings/imgui_bundle/demos_cpp/sandbox/sandbox_md_without_hello_imgui.cpp.

Limitations

  • Standalone use is OpenGL3 only. Metal, Vulkan, DirectX11/12 require device handles that HelloImGui's runner would normally create — they are not exposed for standalone injection.
  • Pyodide is not supported in the pure-backend mode (no PyOpenGL, no native glfw).