Expand description
§Sable GPU
GPU abstraction layer providing cross-platform rendering primitives using wgpu.
§Modules
context— GPU context and device managementbuffer— GPU buffer types (vertex, index, uniform)pipeline— Render pipeline buildershader— Shader loading and managementvertex— Vertex type definitions and layouts
§Quick Start
ⓘ
use sable_gpu::prelude::*;
use sable_platform::prelude::*;
async fn setup(window: &Window) -> GpuContext {
GpuContext::new(window).await.unwrap()
}§Backend Selection
By default, wgpu selects the best available backend:
- Windows: DirectX 12 or Vulkan
- macOS/iOS: Metal
- Linux: Vulkan
- Web: WebGPU or WebGL
Modules§
- buffer
- GPU buffer types for vertex, index, and uniform data.
- context
- GPU context and device management.
- pipeline
- Render pipeline builder and management.
- prelude
- Prelude module for convenient imports.
- shader
- Shader loading and management.
- vertex
- Vertex type definitions and layouts.
Enums§
- GpuError
- GPU-specific errors.
Type Aliases§
- Result
- Result type alias for GPU operations.