2024-02-03 21:52:42 -08:00
|
|
|
use std::sync::Arc;
|
2024-02-02 22:32:03 -08:00
|
|
|
|
2024-02-05 18:29:05 -08:00
|
|
|
use galactica_content::{Content, System};
|
2024-01-17 10:17:18 -08:00
|
|
|
use galactica_playeragent::PlayerAgent;
|
2024-01-23 15:53:50 -08:00
|
|
|
use galactica_system::phys::PhysImage;
|
2024-01-17 10:17:18 -08:00
|
|
|
use galactica_util::timing::Timing;
|
|
|
|
|
|
|
|
/// Bundles parameters passed to a single call to GPUState::render
|
2024-02-03 11:24:17 -08:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct RenderInput {
|
2024-01-17 10:17:18 -08:00
|
|
|
/// Player ship data
|
2024-02-08 20:40:12 -08:00
|
|
|
pub player: PlayerAgent,
|
2024-01-17 10:17:18 -08:00
|
|
|
|
|
|
|
/// The system we're currently in
|
2024-02-05 18:29:05 -08:00
|
|
|
pub current_system: Arc<System>,
|
2024-01-17 10:17:18 -08:00
|
|
|
|
|
|
|
/// The world state to render
|
2024-02-08 20:40:12 -08:00
|
|
|
pub phys_img: PhysImage,
|
2024-01-17 10:17:18 -08:00
|
|
|
|
|
|
|
// TODO: handle overflow. is it a problem?
|
|
|
|
/// The current time, in seconds
|
|
|
|
pub current_time: f32,
|
|
|
|
|
|
|
|
/// Game content
|
2024-02-03 21:52:42 -08:00
|
|
|
pub ct: Arc<Content>,
|
2024-01-17 10:17:18 -08:00
|
|
|
|
|
|
|
/// Time we spent in each part of the game loop
|
|
|
|
pub timing: Timing,
|
|
|
|
}
|