Skip to main content

Module window

Module window 

Source
Expand description

§SDK Window Management API

Provides methods on GoudGame for window lifecycle management: polling events, swapping buffers, querying window state, and clearing the screen. Also provides static lifecycle functions on Window for creating and destroying windowed contexts from FFI.

§Availability

This module requires the native feature (desktop platform with GLFW). Window methods are only available when GoudGame has been initialized with a platform backend (i.e., when running on desktop, not in headless/test mode).

§Example

use goud_engine::sdk::{GoudGame, GameConfig};

let mut game = GoudGame::new(GameConfig::default()).unwrap();

// Main game loop
while !game.should_close() {
    let dt = game.poll_events();
    // ... update game logic with dt ...
    // ... render ...
    game.swap_buffers();
}

Structs§

Window
Zero-sized type that hosts window lifecycle functions.