summaryrefslogtreecommitdiff
path: root/src/common/client/assets.rs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-01-28 12:03:11 -0500
committerLLLL Colonq <llll@colonq>2025-01-28 12:03:11 -0500
commit23d651bbad510f14484cf1c0a8081ffff890565e (patch)
tree3645723cb9383bcf8ea3733d50d76ba1fe86e131 /src/common/client/assets.rs
parentf448de77d84b985047a332150c0382adc1836899 (diff)
Working overlay
Diffstat (limited to 'src/common/client/assets.rs')
-rw-r--r--src/common/client/assets.rs23
1 files changed, 23 insertions, 0 deletions
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")),
+ }
+ }
+}