diff options
Diffstat (limited to 'engine/src/renderer/mod.rs')
-rw-r--r-- | engine/src/renderer/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index af91257..fbb86f7 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -37,7 +37,7 @@ use crate::opengl::vertex_array::{ use crate::opengl::{clear_buffers, enable, BufferClearMask, Capability}; use crate::projection::{new_perspective_matrix, Projection}; use crate::shader::Program as ShaderProgram; -use crate::texture::{Id as TextureId, List as TextureMap, Texture}; +use crate::texture::{Id as TextureId, Texture}; use crate::transform::Transform; use crate::vector::{Vec2, Vec3}; use crate::vertex::{AttributeComponentType, Vertex}; @@ -91,7 +91,7 @@ fn initialize(window: Single<Window>) } fn render( - query: Query<(Mesh, TextureMap, ShaderProgram, Material, Transform)>, + query: Query<(Mesh, ShaderProgram, Material, Transform)>, light_source_query: Query<(LightSource, Transform)>, camera_query: Query<(Camera,)>, window: Single<Window>, @@ -124,7 +124,7 @@ fn render( clear_buffers(BufferClearMask::COLOR | BufferClearMask::DEPTH); - for (mesh, texture_list, shader_program, material, transform) in &query { + for (mesh, shader_program, material, transform) in &query { let shader_program = gl_shader_programs .entry(shader_program.u64_hash()) .or_insert_with(|| create_gl_shader_program(&shader_program).unwrap()); @@ -147,7 +147,7 @@ fn render( &camera, ); - for texture in &texture_list.list { + for texture in material.textures() { let gl_texture = gl_textures .entry(texture.id()) .or_insert_with(|| create_gl_texture(texture)); |