mirror of
https://github.com/lisk77/comet.git
synced 2025-10-23 21:38:50 +00:00
fix: forgot renaming component in render_scene_2d which of course lead to errors
This commit is contained in:
parent
a3df3f4f17
commit
4ada207b3b
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ use winit::{
|
|||
};
|
||||
use winit::dpi::Position;
|
||||
use comet_colors::LinearRgba;
|
||||
use comet_ecs::{Component, ComponentSet, Render, Renderer2D as R2D, Transform2D, World};
|
||||
use comet_ecs::{Component, ComponentSet, Render, Render2D, Transform2D, World};
|
||||
use comet_log::*;
|
||||
use comet_math;
|
||||
use comet_math::{Mat4, Point3, Vec2, Vec3};
|
||||
|
@ -556,12 +556,12 @@ impl<'a> Renderer2D<'a> {
|
|||
}
|
||||
|
||||
pub fn render_scene_2d(&mut self, world: &World) {
|
||||
let entities = world.get_entities_with(ComponentSet::from_ids(vec![R2D::type_id()]));
|
||||
let entities = world.get_entities_with(ComponentSet::from_ids(vec![Render2D::type_id()]));
|
||||
let mut vertex_buffer: Vec<Vertex> = Vec::new();
|
||||
let mut index_buffer: Vec<u16> = Vec::new();
|
||||
|
||||
for entity in entities {
|
||||
let renderer_component = world.get_component::<R2D>(entity as usize);
|
||||
let renderer_component = world.get_component::<Render2D>(entity as usize);
|
||||
let transform_component = world.get_component::<Transform2D>(entity as usize);
|
||||
|
||||
if renderer_component.is_visible() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue