picogl.backend.render ===================== .. py:module:: picogl.backend.render .. autoapi-nested-parse:: Declarative render passes and frame-graph execution. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/picogl/backend/render/executor/index /autoapi/picogl/backend/render/graph/index /autoapi/picogl/backend/render/pass_/index /autoapi/picogl/backend/render/pipeline/index /autoapi/picogl/backend/render/resources/index Classes ------- .. autoapisummary:: picogl.backend.render.RenderGraphExecutor picogl.backend.render.DependencyGraph picogl.backend.render.RenderGraph picogl.backend.render.RenderPass picogl.backend.render.RenderPipeline picogl.backend.render.FrameResources picogl.backend.render.RenderTarget picogl.backend.render.Texture Functions --------- .. autoapisummary:: picogl.backend.render.topo_sort Package Contents ---------------- .. py:class:: RenderGraphExecutor(backend: picogl.backend.gl.backend.GLBackend) Resolve pass order and execute through a gl backend. .. py:attribute:: backend .. py:method:: execute(graph: picogl.backend.render.graph.RenderGraph) -> None .. py:class:: DependencyGraph Build pass ordering edges from resource read/write dependencies. .. py:attribute:: edges :type: dict[str, set[str]] .. py:method:: build(passes: list[picogl.backend.render.pass_.RenderPass]) -> None .. py:class:: RenderGraph Collection of render passes. .. py:attribute:: passes :type: list[picogl.backend.render.pass_.RenderPass] :value: [] .. py:method:: add(render_pass: picogl.backend.render.pass_.RenderPass) -> None .. py:function:: topo_sort(nodes: list[str], edges: dict[str, set[str]]) -> list[str] Topologically sort pass names; raise ValueError on cycles. .. py:class:: RenderPass Declarative render pass with attached state and optional resource deps. .. py:attribute:: name :type: str .. py:attribute:: state :type: picogl.backend.state.RenderState .. py:attribute:: execute_fn :type: Callable[[], None] .. py:attribute:: reads :type: list[picogl.backend.render.resources.Texture] :value: [] .. py:attribute:: writes :type: list[picogl.backend.render.resources.Texture] :value: [] .. py:method:: execute(backend: picogl.backend.gl.backend.GLBackend) -> None .. py:class:: RenderPipeline Execute render passes in registration order. .. py:attribute:: passes :type: list[picogl.backend.render.pass_.RenderPass] :value: [] .. py:method:: add(render_pass: picogl.backend.render.pass_.RenderPass) -> None .. py:method:: execute(backend: picogl.backend.gl.backend.GLBackend) -> None .. py:class:: FrameResources Allocator for per-frame transient GPU resources. .. py:attribute:: textures :type: dict[str, Texture] .. py:attribute:: render_targets :type: dict[str, RenderTarget] .. py:method:: create_texture(name: str, width: int, height: int, fmt: int) -> Texture .. py:method:: create_render_target(name: str, color: Texture, depth: Optional[Texture] = None) -> RenderTarget .. py:class:: RenderTarget Color/depth render target. .. py:attribute:: name :type: str .. py:attribute:: color :type: Texture .. py:attribute:: depth :type: Optional[Texture] :value: None .. py:class:: Texture GPU texture node in a render graph. .. py:attribute:: name :type: str .. py:attribute:: width :type: int .. py:attribute:: height :type: int .. py:attribute:: format :type: int .. py:attribute:: handle :type: Optional[int] :value: None