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

Python MXVK prism model and post-processing demonstration. More...

Go to the source code of this file.

Classes

class  darkside.DarkWindow

Namespaces

namespace  darkside

Functions

np.ndarray darkside.identity_matrix ()
np.ndarray darkside.look_at_matrix (tuple[float, float, float] eye, tuple[float, float, float] center, tuple[float, float, float] up)
int darkside.main ()
list[float] darkside.matrix_values (np.ndarray matrix)
np.ndarray darkside.normalize_vector (np.ndarray vector)
 darkside.parse_args ()
tuple[int, int] darkside.parse_resolution (str value)
np.ndarray darkside.perspective_matrix (float fov_radians, float aspect, float near_plane, float far_plane)
np.ndarray darkside.rotation_y_matrix (float angle)
np.ndarray darkside.scale_matrix (float x, float y, float z)
np.ndarray darkside.translation_matrix (float x, float y, float z)

Variables

 darkside.EXAMPLE_DIR = Path(__file__).resolve().parent

Detailed Description

Python MXVK prism model and post-processing demonstration.

Demonstrates NumPy matrix construction, model rendering, camera interaction, and shader-driven presentation in a VK_Window subclass. It can load an OBJ or MXMOD asset supplied on the command line, otherwise it uses the model and shader resources staged beneath the selected path.

Running the example

python3 python-examples/darkside/darkside.py --resolution 1280x720
python3 python-examples/darkside/darkside.py --input model.mxmod --enable-vsync

Controls

  • Drag with the left mouse button: orbit the camera.
  • Mouse wheel: adjust camera distance.
  • Escape: exit.

Lifecycle

DarkWindow constructs NumPy view and projection matrices for every draw, then releases the model before its parent Vulkan window during shutdown.

Definition in file darkside.py.