diff options
Diffstat (limited to 'engine/src/renderer')
-rw-r--r-- | engine/src/renderer/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index 304c38b..ef653a2 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -40,7 +40,7 @@ use crate::opengl::vertex_array::{PrimitiveKind, VertexArray}; use crate::opengl::{clear_buffers, enable, BufferClearMask, Capability}; use crate::projection::new_perspective; use crate::shader::Program as ShaderProgram; -use crate::texture::{Id as TextureId, Map as TextureMap, Texture}; +use crate::texture::{Id as TextureId, List as TextureMap, Texture}; use crate::transform::Transform; use crate::vector::{Vec2, Vec3}; use crate::vertex::Vertex; @@ -146,14 +146,14 @@ fn render( &shader_program_curr_bound, ); - for (texture_id, texture) in &texture_map.inner { + for texture in &texture_map.list { let gl_texture = gl_textures - .entry(*texture_id) + .entry(texture.id()) .or_insert_with(|| create_gl_texture(texture)); - let texture_unit = TextureUnit::from_texture_id(*texture_id) + let texture_unit = TextureUnit::from_texture_id(texture.id()) .unwrap_or_else(|| { - panic!("Texture id {texture_id} is a invalid texture unit"); + panic!("Texture id {} is a invalid texture unit", texture.id()); }); set_active_texture_unit(texture_unit); |