Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/imgui_backend_sea.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""
An example demonstrating a wgpu app with imgui backend.
# run_example = false
"""

# run_example = true

from rendercanvas.auto import RenderCanvas, loop
import wgpu
import time
Expand All @@ -23,7 +24,7 @@

# Prepare present context
present_context = canvas.get_wgpu_context()
render_texture_format = wgpu.TextureFormat.bgra8unorm
render_texture_format = present_context.get_preferred_format(adapter)
present_context.configure(device=device, format=render_texture_format)

module = device.create_shader_module(
Expand Down
3 changes: 2 additions & 1 deletion examples/imgui_basic_example.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""
An example demonstrating a wgpu app with basic imgui usage and events.

# run_example = false
"""

# run_example = true

import wgpu
import sys
from imgui_bundle import imgui, imgui_ctx
Expand Down
1 change: 1 addition & 0 deletions examples/imgui_renderer_sea.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from imgui_bundle import imgui
from wgpu.utils.imgui import ImguiRenderer, Stats


# Create a canvas to render to, the framerate is unlocked by using the "fastest" update mode and disabling vsync
canvas = RenderCanvas(
title="imgui_sea", size=(800, 450), update_mode="fastest", vsync=False
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tests = [
"trio",
"rendercanvas>=2.4.0",
]
examples = ["pypng", "rendercanvas", "glfw"]
examples = ["pypng", "rendercanvas", "glfw", "imgui_bundle"]
docs = ["sphinx>7.2", "sphinx_rtd_theme"]
dev = ["wgpu[build,codegen,lint,tests,examples,docs]"]

Expand Down
Loading