MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
main.py File Reference

Minimal textured-sprite MXVK Python example. More...

Go to the source code of this file.

Classes

class  main.SpriteWindow

Namespaces

namespace  main

Functions

int main.main ()
argparse.Namespace main.parse_args ()

Detailed Description

Minimal textured-sprite MXVK Python example.

Creates a Python VK_Window subclass, loads a sprite and font, stretches the sprite to the swapchain, and exits when Escape is pressed. It is the smallest example of the native window-owned sprite lifetime model.

Running the example

python3 python-examples/sprite/main.py --width 1280 --height 720 --vsync

Controls

  • Escape: exit.

Lifecycle

SpriteWindow releases its Python sprite handle before release() so the native window/sprite reference relationship cannot form a shutdown cycle.

Definition in file main.py.