Skip to main content

Crate sable_gpu

Crate sable_gpu 

Source
Expand description

§Sable GPU

GPU abstraction layer providing cross-platform rendering primitives using wgpu.

§Modules

  • context — GPU context and device management
  • buffer — GPU buffer types (vertex, index, uniform)
  • pipeline — Render pipeline builder
  • shader — Shader loading and management
  • vertex — 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.