From 23d651bbad510f14484cf1c0a8081ffff890565e Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 28 Jan 2025 12:03:11 -0500 Subject: Working overlay --- src/common/client/assets.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/common/client/assets.rs (limited to 'src/common/client/assets.rs') diff --git a/src/common/client/assets.rs b/src/common/client/assets.rs new file mode 100644 index 0000000..742f9ea --- /dev/null +++ b/src/common/client/assets.rs @@ -0,0 +1,23 @@ +use teleia::*; + +pub struct Assets { + pub font: font::Bitmap, + pub shader_flat: shader::Shader, + pub mesh_square: mesh::Mesh, + pub texture_test: texture::Texture, +} + +impl Assets { + pub fn new(ctx: &context::Context) -> Self { + Self { + font: font::Bitmap::new(ctx), + shader_flat: shader::Shader::new( + ctx, + include_str!("assets/shaders/flat/vert.glsl"), + include_str!("assets/shaders/flat/frag.glsl"), + ), + mesh_square: mesh::Mesh::from_obj(ctx, include_bytes!("assets/meshes/square.obj")), + texture_test: texture::Texture::new(ctx, include_bytes!("assets/textures/test.png")), + } + } +} -- cgit v1.2.3