diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-09 20:09:35 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-09 20:23:13 -0700 |
| commit | bbe9d5993bb922ad6b33a21c3557143cecaf960d (patch) | |
| tree | 387488a0a6b35aa5ba1fef1adcdc400d0f4935b6 /src/graphics | |
| parent | 677b697eb18b9abb252eacff320aa48314075a0e (diff) | |
abstract over bundled assets
yay build script stuff :) Force-Push: yes Change-Id: I694651febb02f42dac904f0dfbf4089c33ef937e
Diffstat (limited to 'src/graphics')
| -rw-r--r-- | src/graphics/render.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/graphics/render.rs b/src/graphics/render.rs index 0b4a12a..7318574 100644 --- a/src/graphics/render.rs +++ b/src/graphics/render.rs @@ -1,5 +1,6 @@ #![deny(unsafe_code)] use crate::error::*; +use crate::assets::asset; use crate::graphics::{ Permanent, ForReinit, WindowDressing, Model, Texture }; use crate::shader_data::{ Vertex, UniformBlock, VertexPushBlock }; @@ -260,10 +261,8 @@ fn init_pipeline(device: &Device, render_pass: &vk::RenderPass) -> Result<(vk::PipelineLayout, vk::Pipeline)> { - let vertex_binary = include_bytes!( - concat!(env!("OUT_DIR"), "/shader.vert.spv")); - let fragment_binary = include_bytes!( - concat!(env!("OUT_DIR"), "/shader.frag.spv")); + let vertex_binary = asset("shaders/shader.vert.spv")?; + let fragment_binary = asset("shaders/shader.frag.spv")?; let vertex_module = Permanent::load_spirv_shader_module( device, vertex_binary)?; |