bracket-terminal 0.8.7

ASCII/Codepage 437 terminal emulator with a game loop. Defaults to OpenGL, also support WebGPU (for Vulkan/Metal/WGPU), Curses and Crossterm for output. Part of the bracket-lib family.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Helper to load a shader from WGSL
use wgpu::ShaderModule;

pub struct Shader(pub ShaderModule);

impl Shader {
    pub fn new(device: &wgpu::Device, source: &str) -> Self {
        let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
            label: None,
            source: wgpu::ShaderSource::Wgsl(source.into()),
        });

        Shader(shader)
    }
}