pub(crate) mod after_gpu;
pub(crate) mod atlas_binding;
pub(crate) mod buffer;
pub(crate) mod context;
pub(crate) mod draws;
pub(crate) mod dynamic_texture;
pub(crate) mod dynamic_texture_atlas;
pub(crate) mod identity;
pub(crate) mod indexes;
pub(crate) mod mesh;
pub(crate) mod objects;
pub(crate) mod owned;
pub(crate) mod quads;
pub(crate) mod release;
pub(crate) mod resources;
pub(crate) mod segment;
pub(crate) mod store;
pub(crate) mod target;
pub(crate) mod texture2d;
pub(crate) mod tile_render_data;
pub(crate) mod uniform_buffer;
pub(crate) mod upload;
pub(crate) mod vertex_attribute;
pub(crate) mod vertices;
#[must_use]
pub fn cast_matrix(m: &glam::DMat4) -> [f32; 16] {
m.as_mat4().to_cols_array()
}
pub fn refresh_paint_attributes(
mesh: &Mesh,
context: &mut Context,
changes: crate::layer::BucketChanges,
refresh: impl FnOnce(&mut Context, &mut VertexAttributeArray),
) {
if !changes.paint {
return;
}
mesh.update(context, |objects, context| refresh(context, objects.paint_attributes_mut()));
}
#[must_use]
pub fn texture_size(size: mln_style::size::Size) -> mln_gfx::Size {
mln_gfx::Size::new(size.width, size.height)
}
pub use crate::draw::after_gpu::{AfterGpu, GpuEnd};
pub use crate::draw::atlas_binding::AtlasBinding;
pub use crate::draw::context::Context;
pub use crate::draw::draws::{Depth, Draw, Draws, Group, LayerFrame, LendAt, Lent};
pub use crate::draw::identity::SimpleIdentity;
pub use crate::draw::indexes::{DrawIndexes, Indexes};
pub use crate::draw::mesh::{Indexed, add_point_quads};
pub use crate::draw::objects::{DrawGeometry, Mesh, Textures, copy_shared_attributes, raw_vertices};
pub use crate::draw::quads::{RasterLayoutVertex, StoredQuads, mask_quads};
pub use crate::draw::resources::Resources;
pub use crate::draw::segment::{MAX_SEGMENT_VERTICES, SegmentBase};
pub use crate::draw::store::{SharedIndexes, SharedTexture};
pub use crate::draw::target::Target;
pub use crate::draw::texture2d::Texture2D;
pub use crate::draw::vertex_attribute::{SharedAttribute, Uniforms, VertexAttributeArray};
pub use crate::draw::vertices::{SharedVertices, TypedVertices, Vertices};
pub use crate::render::frame_projection::zero_to_one_clip_z;
pub use crate::render::layer_composite::Composite;
pub use crate::render::light::EvaluatedLight;
pub use crate::render::pass::RenderPass;
pub use crate::render::static_data::RenderStaticData;
pub use crate::render::tile::RenderTile;
pub use crate::render::tile_matrix::{globe_extrude_scale, projection_data, to_projection_ubo};
pub use crate::text::atlas::{ImagePosition, ImagePositions, RectU16};
pub mod globe {
pub use crate::render::globe::globe_tile_mesh::{GlobeTileMeshCache, RawGlobeTileMesh, raw_globe_tile_mesh};
pub use crate::render::globe::{NORTH_POLE_Y, SOUTH_POLE_Y};
}
pub mod ground {
pub use crate::render::terrain::programs::{GROUND_DEM, GROUND_DEPTH, GROUND_HEIGHT, TERRAIN_SURFACE};
pub use crate::render::terrain::{
FrameGround, GroundHeights, StandingDraw, TerrainElevation, TileGround, height_attribute, point_center,
};
pub mod glsl {
pub use crate::{
terrain_glsl_ground_height as ground_height, terrain_glsl_ground_visibility as ground_visibility,
terrain_glsl_hillshade_shading as hillshade_shading, terrain_glsl_terrain_fog as terrain_fog,
terrain_glsl_terrain_props as terrain_props,
};
}
pub mod glsl_es {
pub use crate::render::terrain::glsl_es::TERRAIN_NAMES;
pub use crate::{
terrain_glsl_es_ground_height as ground_height, terrain_glsl_es_ground_visibility as ground_visibility,
terrain_glsl_es_hillshade_shading as hillshade_shading, terrain_glsl_es_terrain_props as terrain_props,
};
}
pub mod msl {
pub use crate::{
terrain_msl_ground_height as ground_height, terrain_msl_ground_visibility as ground_visibility,
terrain_msl_hillshade_shading as hillshade_shading,
};
}
pub mod wgsl {
pub use crate::render::terrain::wgsl::TERRAIN_PRELUDE;
pub use crate::{
terrain_wgsl_ground_height as ground_height, terrain_wgsl_ground_visibility as ground_visibility,
terrain_wgsl_hillshade_shading as hillshade_shading,
};
}
}