Graphics¶
The X-Plane SDK provides a few ways of drawing:
Instance Drawing: Place objects at a location and manipulate these objects through datarefs. See XPLMInstance with the use of
xp.createInstance()
.Direct Drawing (SDK only): Using a
xp.registerDrawCallback()
draw strings on the display. Seexp.drawString()
.Direct Drawing (OpenGL): Using a
xp.registerDrawCallback()
draw whatever you like using OpenGL. X-Plane manipulates the graphics context so you can use OpenGL within the Vulkan/Metal environment supported by X-Plane. See Using OpenGL for examples.Windows with Widgets: Create a widget window and attach user-interaction widgets to it. See XPWidgets and XPStandardWidgets.
Additionally, XPPython3 has wrapped the Dear IMGUI library to provide:
Windows with ImGui Widgets: Create a window and attach Dear IMGUI widgets to it. See Using ImGui.
For details on non-SDK drawing, see: