Note
Go to the end to download the full example code.
Use gfx.show
Demonstrates show utility

Unable to find extension: VK_EXT_physical_device_drm
No windowing system present. Using surfaceless platform
No config found!
No config found!
import pygfx as gfx
cube = gfx.Mesh(
gfx.box_geometry(100, 100, 100),
gfx.MeshPhongMaterial(color="red"),
)
if __name__ == "__main__":
disp = gfx.Display()
disp.show(cube)
Total running time of the script: (0 minutes 7.938 seconds)
Gallery generated by Sphinx-Gallery
Interactive example
Try this example in your browser using Pyodide. Might not work with all examples and all devices. Check the output and your browser’s console for details.