Directories | |
| examples | |
Files | |
| __init__.py | |
Friendly Python façade for the mxvk_ext nanobind module. | |
| _native.py | |
| Imports the optional native MXVK extension with an actionable error. | |
| app.py | |
| Application and window helpers. | |
| config.py | |
| Friendly persistent settings wrapper. | |
| example.py | |
Minimal application using the mxvk_wrap package. | |
| graphics.py | |
| Simple drawable, model, and GPU-resource wrappers. | |
| input.py | |
| Joystick and game-controller convenience wrappers. | |
| media.py | |
| Optional media and timing wrappers. | |
This folder is a small, pure-Python façade over mxvk_ext. It covers the main nanobind modules with friendly application, drawing, model, input, settings, media, timer, and GPU-resource classes. Every wrapper keeps the raw binding at .native when an advanced MXVK feature is needed. The full usage guide is in the root Simple Python Wrappers documentation section.
Run the example from the repository root after building the extension:
App owns cleanup. Create graphics resources with the app, implement draw, and call run(). example.py is the smallest complete reference.
Use the package as import mxvk_wrap as mx, then construct values such as mx.App, mx.Sprite, and mx.Font. For one-off text styles, use mx.Font(path, size) with app.draw_text(text, x, y, font, color). This does not modify the font selected by app.set_font().
After editing an example GLSL file, regenerate all Python-example SPIR-V assets with python3 python-examples/compile_shaders.py. Pass --glslc /path/to/glslc to choose a specific compiler.
If an app-owned Sprite, Sprite3D, Model, GpuBuffer, or GpuTexture fails to load or allocate, its wrapper closes the owning App before raising the original exception. This releases resources that were created earlier in the same application setup.