|
|
пре 1 недеља | |
|---|---|---|
| .. | ||
| __pycache__ | пре 1 недеља | |
| examples | пре 1 недеља | |
| examples_disabled | пре 1 недеља | |
| python_backends_disabled | пре 1 недеља | |
| LICENSE_pyimgui.txt | пре 1 недеља | |
| Readme.md | пре 1 недеља | |
| __init__.py | пре 1 недеља | |
| glfw_backend.py | пре 1 недеља | |
| opengl_backend_programmable.py | пре 1 недеља | |
| opengl_base_backend.py | пре 1 недеља | |
| pygame_backend.py | пре 1 недеља | |
| pyglet_backend.py | пре 1 недеља | |
| sdl2_backend.py | пре 1 недеља | |
| sdl3_backend.py | пре 1 недеља | |
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).
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
imgui_md (Markdown) without HelloImGuiimgui_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.