pub(crate) mod after_gpu;
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 objects;
pub(crate) mod owned;
pub mod projection;
pub(crate) mod range;
pub(crate) mod release;
pub(crate) mod resources;
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;
pub(crate) mod vertex_attribute;
pub(crate) mod vertices;
use mln_gfx::gfx_types::AttributeDataType;
use mln_gfx::shaders::program::Attribute;
pub fn refresh_paint_attributes(
mesh: &Mesh,
res: &mut Resources<'_>,
changes: crate::layer::BucketChanges,
refresh: impl FnOnce(&mut Resources<'_>) -> Option<VertexBinding>,
) {
if changes.paint
&& let Some(paint) = refresh(res)
{
mesh.set_paint(res, &paint);
}
}
pub const POS: Attribute = Attribute::new("pos", AttributeDataType::Short2);
pub use crate::draw::after_gpu::{AfterGpu, GpuEnd};
pub use crate::draw::draws::{Depth, Draw, Draws, Group, LayerFrame, LendAt, Lent};
pub use crate::draw::objects::{Mesh, MeshDesc, Textures};
pub use crate::draw::range::DrawRange;
pub use crate::draw::resources::Resources;
pub use crate::draw::store::{IndexBuffer, Texture};
pub use crate::draw::target::Target;
pub use crate::draw::vertex::{Vertex, VertexAttribute, VertexBinding};
pub use crate::draw::vertex_attribute::Uniforms;
pub use crate::draw::vertices::VertexBuffer;
pub use crate::render::layer_composite::Composite;
pub use crate::render::light::EvaluatedLight;
pub use crate::render::pass::RenderPass;
pub use crate::render::tile::RenderTile;
pub mod globe {
pub use crate::render::globe::tile_mesh::{TileMesh, tile_mesh};
pub use crate::render::globe::{NORTH_POLE_Y, SOUTH_POLE_Y};
}
pub mod ground {
pub use crate::render::terrain::programs::{GROUND_DEPTH, GROUND_HEIGHT};
pub use crate::render::terrain::{
FrameGround, GroundHeights, StandingDraw, TerrainElevation, TileGround, height_binding, point_center,
};
pub mod glsl {
pub use crate::{
terrain_glsl_ground_visibility as ground_visibility, terrain_glsl_hillshade_shading as hillshade_shading,
};
}
pub mod glsl_es {
pub use crate::{
terrain_glsl_es_ground_visibility as ground_visibility,
terrain_glsl_es_hillshade_shading as hillshade_shading,
};
}
pub mod msl {
pub use crate::{
terrain_msl_ground_visibility as ground_visibility, terrain_msl_hillshade_shading as hillshade_shading,
};
}
pub mod wgsl {
pub use crate::{
terrain_wgsl_ground_visibility as ground_visibility, terrain_wgsl_hillshade_shading as hillshade_shading,
};
}
}