pre facing switch
This commit is contained in:
parent
3f4656939c
commit
dd568a75e3
5 changed files with 117 additions and 33 deletions
src/scene
|
@ -6,7 +6,7 @@ use anyhow::Ok;
|
|||
use vulkanalia::prelude::v1_0::*;
|
||||
use anyhow::Result;
|
||||
|
||||
use cgmath::{vec2, vec3};
|
||||
use cgmath::{vec2, vec3, Vector3};
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
@ -14,6 +14,7 @@ use std::rc::Rc;
|
|||
use crate::app_data;
|
||||
use crate::app_data::AppData;
|
||||
use crate::buffer;
|
||||
use crate::primitives::rec_cuboid::Cuboid;
|
||||
use crate::vertex;
|
||||
use crate::primitives::cube::Cube;
|
||||
use crate::primitives::drawable::Drawable;
|
||||
|
@ -117,6 +118,15 @@ impl Scene {
|
|||
None => {}
|
||||
}
|
||||
}
|
||||
|
||||
let cube = Cuboid {
|
||||
pos: vec3(11.0, 11.0, 11.0),
|
||||
color: vec3(shade, 1.0, shade),
|
||||
tex_coord: vec2(0.0, 0.0),
|
||||
size: Vector3 {x: 0.5, y: 0.5, z: 0.5}
|
||||
};
|
||||
let index = self.sized_vertices.len();
|
||||
cube.draw(&data.topology, index, self);
|
||||
|
||||
let mut memory_index = 1; // zero should be the location for the overall length (also will be the invalid memory allocation for pointing to a nonexistant neighbor)
|
||||
for light in &mut self.point_lights {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue