simvx.graphics.renderer.render_target

Offscreen render target with colour + depth attachments.

Module Contents

Classes

RenderTarget

Manages an offscreen render target for render-to-texture.

Data

API

simvx.graphics.renderer.render_target.log

‘getLogger(…)’

simvx.graphics.renderer.render_target.__all__

[‘RenderTarget’]

class simvx.graphics.renderer.render_target.RenderTarget(device: Any, physical_device: Any, width: int, height: int, colour_format: int = vk.VK_FORMAT_R8G8B8A8_UNORM, use_depth: bool = True, samplable_depth: bool = False, *, initial_layout: int = vk.VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, queue: Any = None, command_pool: Any = None)[source]

Manages an offscreen render target for render-to-texture.

The colour image is transitioned to initial_layout at construction so it is safe to sample (or bind to a descriptor) before the first render pass writes to it. The default :data:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL matches the offscreen render pass’s finalLayout: the render pass itself uses initialLayout=UNDEFINED with LOAD_OP_CLEAR, so the pre-transition is discarded harmlessly on the first frame.

Initialization

destroy() None[source]

Clean up all resources.