Dear ImGui’s platform and renderer backends for GLFW, OpenGL 3 and OpenGL 2, for an app that runs its own loop.
Most apps do not need them: immapp.run and hello_imgui.run set up the backends. An app that creates its window
itself (with GLFW, pygame, pyglet...) calls them at each frame: see imgui_bundle/python_backends/examples.
The module imgui_bundle.imgui.backends, the Python API of Dear ImGui, from bindings/imgui_bundle/imgui/backends.pyi: 30 functions, 0 classes, 0 enums. Each entry gives the Python signature, then the C++ one, then the doc of the C++ header. The sections are the header’s.
opengl3_init¶
def opengl3_init(glsl_version: str) -> bool<bindings for imgui_impl_opengl3.h
opengl3_shutdown¶
def opengl3_shutdown() -> Noneopengl3_new_frame¶
def opengl3_new_frame() -> Noneopengl3_render_draw_data¶
def opengl3_render_draw_data(draw_data: ImDrawData) -> None(Optional) Called by Init/NewFrame/Shutdown¶
opengl3_create_fonts_texture¶
def opengl3_create_fonts_texture() -> boolopengl3_destroy_fonts_texture¶
def opengl3_destroy_fonts_texture() -> Noneopengl3_create_device_objects¶
def opengl3_create_device_objects() -> boolopengl3_destroy_device_objects¶
def opengl3_destroy_device_objects() -> Noneopengl2_init¶
def opengl2_init() -> bool<bindings for imgui_impl_opengl2.h
opengl2_shutdown¶
def opengl2_shutdown() -> Noneopengl2_new_frame¶
def opengl2_new_frame() -> Noneopengl2_render_draw_data¶
def opengl2_render_draw_data(draw_data: ImDrawData) -> NoneCalled by Init/NewFrame/Shutdown¶
opengl2_create_fonts_texture¶
def opengl2_create_fonts_texture() -> boolopengl2_destroy_fonts_texture¶
def opengl2_destroy_fonts_texture() -> Noneopengl2_create_device_objects¶
def opengl2_create_device_objects() -> boolopengl2_destroy_device_objects¶
def opengl2_destroy_device_objects() -> Noneglfw_init_for_opengl¶
def glfw_init_for_opengl(window_address: int, install_callbacks: bool) -> bool<bindings for imgui_impl_glfw.h
glfw_init_for_vulkan¶
def glfw_init_for_vulkan(window_address: int, install_callbacks: bool) -> boolglfw_init_for_other¶
def glfw_init_for_other(window_address: int, install_callbacks: bool) -> boolglfw_shutdown¶
def glfw_shutdown() -> Noneglfw_new_frame¶
def glfw_new_frame() -> NoneGLFW callbacks (installer)¶
When calling Init with ‘install_callbacks=True’: ImGui_ImplGlfw_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user’s previously installed callbacks, if any.
When calling Init with ‘install_callbacks=False’: GLFW callbacks won’t be installed. You will need to call individual function yourself from your own GLFW callbacks.
glfw_install_callbacks¶
def glfw_install_callbacks(window_address: int) -> Noneglfw_restore_callbacks¶
def glfw_restore_callbacks(window_address: int) -> Noneglfw_window_focus_callback¶
def glfw_window_focus_callback(window_address: int, focused: int) -> NoneSince 1.84
GLFW callbacks (individual callbacks to call if you didn’t install callbacks)
glfw_cursor_enter_callback¶
def glfw_cursor_enter_callback(window_address: int, entered: int) -> NoneSince 1.84
glfw_cursor_pos_callback¶
def glfw_cursor_pos_callback(window_address: int, x: float, y: float) -> NoneSince 1.87
glfw_mouse_button_callback¶
def glfw_mouse_button_callback(window_address: int, button: int, action: int, mods: int) -> Noneglfw_scroll_callback¶
def glfw_scroll_callback(window_address: int, xoffset: float, yoffset: float) -> Noneglfw_key_callback¶
def glfw_key_callback(window_address: int, key: int, scancode: int, action: int, mods: int) -> Noneglfw_char_callback¶
def glfw_char_callback(window_address: int, c: int) -> None