Skip to main content

Module texture

Module texture 

Source
Expand description

Texture handles and render-target descriptors: TextureDesc, Texture, RenderTarget/Attachment, and the two id types a texture crosses a layer boundary under.

TextureId is a caller-assigned handle for an external binding (a plugin import, a platform surface’s backing texture); SceneTextureId is minted by Texture::as_scene_texture and is the key a future render-engine TextureRegistry resolves Command::SceneTexture against — the same process-wide-AtomicU64, stable-across-Clone mechanism frust_scene::ShaderProgram::id uses.

Structs§

Attachment
One attachment of a RenderTarget: the view rendered into, and the load/store ops framing that render pass’s access to it.
RenderTarget
The set of attachments a render pass targets: zero or more color attachments plus an optional depth attachment.
SceneTextureId
A process-unique id Texture::as_scene_texture mints once per Texture and shares across Clone — the TextureRegistry key Command::SceneTexture resolves against.
Texture
A GPU texture: the underlying texture/view pair, the TextureDesc it was created from, and a SceneTextureId minted once at construction and shared across Clone.
TextureDesc
Describes a texture to create: dimensions, format, usage, and an optional debug label.
TextureId
A caller-assigned id for a texture crossing an external binding boundary — a plugin’s imported texture, or a platform surface’s backing texture.
TextureRegistry
The engine’s live map from a minted SceneTextureId to the view Command::SceneTexture resolves against.

Type Aliases§

ColorAttachment
A RenderTarget’s color attachment: clear value is wgpu::Color.
DepthAttachment
A RenderTarget’s depth attachment: clear value is a plain f32 depth, matching wgpu::RenderPassDepthStencilAttachment’s depth op.