#![warn(missing_docs)] //! This crate contains all drawing logic. //! It converts game state to a nice picture. //! //! [`GPUState`] is the main struct this crate provides, //! and the only one external code should interact with. //! (Excluding data structs, like [`ObjectSprite`]) mod globaldata; mod gpustate; mod pipeline; mod sprite; mod starfield; mod texturearray; mod vertexbuffer; use galactica_content as content; pub use gpustate::GPUState; pub use sprite::{AnchoredUiPosition, ObjectSprite, ObjectSubSprite, ParticleBuilder, UiSprite}; use cgmath::Matrix4; /// Shader entry points pub(crate) const SHADER_MAIN_VERTEX: &'static str = "vertex_main"; pub(crate) const SHADER_MAIN_FRAGMENT: &'static str = "fragment_main"; #[rustfmt::skip] pub(crate) const OPENGL_TO_WGPU_MATRIX: Matrix4 = Matrix4::new( 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0, );