#![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 globaluniform; mod gpustate; mod pipeline; mod positionanchor; mod renderinput; mod renderstate; mod shaderprocessor; mod starfield; mod texturearray; mod ui; mod vertexbuffer; use renderstate::*; pub use gpustate::GPUState; pub use positionanchor::PositionAnchor; pub use renderinput::RenderInput; use nalgebra::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] #[allow(dead_code)] 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, );