simvx.graphics._frame_capture

Framebuffer capture — reads swapchain image pixels back to CPU.

Module Contents

Functions

capture_swapchain_frame

Capture a swapchain image as an RGBA numpy array.

Data

API

simvx.graphics._frame_capture.__all__

[‘capture_swapchain_frame’]

simvx.graphics._frame_capture.capture_swapchain_frame(device: Any, physical_device: Any, graphics_queue: Any, command_pool: Any, swapchain_images: list, image_index: int, extent: tuple[int, int], image_format: int) numpy.ndarray[source]

Capture a swapchain image as an RGBA numpy array.

Returns (height, width, 4) uint8 array. Must be called after the frame has been rendered.