Crate astrelis_render

Crate astrelis_render 

Source
Expand description

Astrelis Render - Modular rendering framework for Astrelis

This crate provides:

  • Graphics context management
  • Window rendering contexts
  • Frame and render pass management
  • Compute pass management
  • Framebuffer abstraction for offscreen rendering
  • Render target abstraction (Surface/Framebuffer)
  • Blend mode presets for common scenarios
  • GPU feature detection and management
  • Indirect draw buffer support for GPU-driven rendering
  • Texture blitting for fullscreen quad rendering
  • Sprite sheet support for animations
  • Low-level extensible Renderer for WGPU resource management
  • Building blocks for higher-level renderers (TextRenderer, SceneRenderer, etc.)

Re-exports§

pub use wgpu;

Structs§

AtlasEntry
An entry in the texture atlas.
AtlasKey
Unique key for an atlas entry.
AtlasRect
Rectangle for atlas packing (not coordinate-space aware).
BlitOptions
Options for configuring the blit renderer.
BlitRenderer
A renderer for blitting textures to the screen.
Camera
A camera with view and projection matrices.
CameraUniform
Camera uniform buffer data for shaders.
Color
Color represented as RGBA (0.0 - 1.0).
ComputePass
A compute pass wrapper that automatically returns the encoder to the frame context.
ComputePassBuilder
Builder for creating compute passes.
ComputePipelineBuilder
Builder for creating a compute pipeline with common defaults.
DispatchIndirect
Indirect dispatch command.
DrawIndexedIndirect
Indirect draw command for indexed geometry.
DrawIndirect
Indirect draw command for non-indexed geometry.
ExecutionPlan
Execution plan for the render graph.
FrameContext
Context for a single frame of rendering.
FrameStats
Statistics for a rendered frame.
Framebuffer
An offscreen render target with optional depth and MSAA attachments.
FramebufferBuilder
Builder for creating framebuffers with optional attachments.
GpuFeatures
GPU features that can be requested or required.
GpuProfiler
High-level GPU profiler for measuring execution times.
GpuReadback
GPU readback handle for async data retrieval.
GpuTexture
A GPU texture with cached view and metadata.
GraphicsContext
A globally shared graphics context.
GraphicsContextDescriptor
Descriptor for configuring graphics context creation.
IndirectBuffer
A type-safe GPU buffer for indirect draw commands.
Material
A material manages shader parameters, textures, and pipeline state.
MaterialBuilder
Builder for creating materials with a fluent API.
MaterialTexture
Texture binding information for a material.
Mesh
A mesh containing vertex and optional index data.
MeshBuilder
Builder for creating meshes.
PassId
Pass identifier in the render graph.
PendingReconfigure
PipelineState
Pipeline state configuration for a material.
ProfileRegion
A handle to a profiling region.
QueryResultBuffer
Buffer for storing and reading query results.
QuerySet
A wrapper around wgpu::QuerySet with metadata.
RenderContext
Render context passed to pass execution functions.
RenderGraph
Render graph managing passes and resources.
RenderGraphPass
A render pass in the graph.
RenderPass
A render pass wrapper that automatically returns the encoder to the frame context.
RenderPassBuilder
Builder for creating render passes.
RenderPipelineBuilder
Builder for creating a render pipeline with common defaults.
RenderableWindow
A renderable window that combines a window with a rendering context.
Renderer
Low-level extensible renderer that simplifies WGPU resource management.
ResourceId
Resource identifier in the render graph.
ResourceInfo
Resource information in the render graph.
RingBuffer
A ring buffer for streaming per-frame data.
RingBufferAllocation
A region allocated from a ring buffer.
SpriteAnimation
Animation state for cycling through sprite sheet frames.
SpriteSheet
A sprite sheet containing uniformly-sized sprites in a grid layout.
SpriteSheetDescriptor
Descriptor for creating a sprite sheet.
SpriteUV
UV coordinates for a sprite (normalized 0-1 range).
StagingBuffer
A staging buffer for CPU-to-GPU transfers.
StagingBufferPool
A pool of staging buffers for reuse.
StorageTexture
A texture for compute shader read/write access.
Surface
Surface texture and view for rendering.
TextureAtlas
Texture atlas with dynamic rectangle packing.
TextureUploader
Helper to upload texture data from CPU to GPU.
TypedBuffer
A GPU buffer with type-safe element tracking.
Viewport
Viewport definition for rendering.
WindowContext
Window rendering context that manages a surface and its configuration.
WindowContextDescriptor
Descriptor for configuring a window’s rendering context.
WindowManager
Manages multiple renderable windows with automatic event handling.

Enums§

BlendMode
Predefined blend modes for common use cases.
ClearOp
Clear operation for a render pass.
DepthClearOp
Depth clear operation for a render pass.
FeatureSupportResult
Result of checking feature support.
GraphicsError
Errors that can occur during graphics context creation.
MaterialParameter
A material parameter value that can be bound to a shader.
ProjectionMode
Projection mode for a camera.
QueryType
Types of GPU queries.
ReadbackError
GPU readback error.
RenderGraphError
Render graph error.
RenderTarget
A render target that can be either a window surface or an offscreen framebuffer.
ResourceType
Resource type in the render graph.
StorageTextureAccess
Access mode for storage textures in compute shaders.
VertexFormat
Vertex format specification.

Constants§

DEPTH_FORMAT
Depth format used by framebuffers.

Traits§

AsWgpu
Access the underlying wgpu type (immutable).
AsWgpuMut
Access the underlying wgpu type (mutable).
ComputePassExt
Helper trait for creating compute passes from FrameContext.
ComputePassRawExt
Extended access to ComputePass internals.
FrameContextExt
Extended access to FrameContext internals.
GraphicsContextExt
Extended access to GraphicsContext internals.
IndirectCommand
Marker trait for indirect draw command types.
IntoWgpu
Consume and return the underlying wgpu type.
ReadbackExt
Extension trait for convenient screenshot capture.
RenderPassExt
Helper trait for creating render passes with common configurations.
RenderPassIndirectExt
Extension trait for render passes to use indirect buffers.
RenderPassMultiDrawIndirectExt
Extension trait for multi-draw indirect operations.
RenderPassRawExt
Extended access to RenderPass internals.

Type Aliases§

UniformBuffer
A uniform buffer for shader uniforms.