灵符lingfu

ling-lang

↓ 0 downloads

Ling - The Omniglot Systems Language

Keywords systems, polyglot, ai, crypto, game
lingfu install ling-lang
LicenseApache-2.0 OR MIT
AuthorsLing Lin, Sanny Lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

Code / Files (995)

crates/ling-graphics/src/viewport.rs
use crate::color::Color;

/// A logical render area (pixel dimensions + clear color).
///
/// This is renderer-agnostic: it can back a software framebuffer,
/// and later map to a real GPU/window viewport.
#[derive(Debug, Clone)]
pub struct Viewport {
    pub width: u32,
    pub height: u32,
    pub clear_color: Color,
}

impl Viewport {
    pub fn new(width: u32, height: u32, clear_color: Color) -> Self {
        Self { width, height, clear_color }
    }
}

← Back to index