a-star
mitchellhansen 4 years ago
parent 165a90eba1
commit c0b1c2e135

@ -32,3 +32,4 @@ winit = "0.22.0"
hprof = "0.1.3"
rusttype = { version = "0.7.0", features = ["gpu_cache"] }
vulkano_text = "0.12.0"
petgraph = "0.5.1"

@ -47,6 +47,8 @@ use crate::util::vertex::{TextureVertex3D, VertexTypeContainer};
use crate::vkprocessor::VkProcessor;
use crate::compu_system::{CompuSystem, Compu};
use crate::event_system::{EventSystem, Evented};
use petgraph::Graph;
use petgraph::graph::NodeIndex;
pub mod util;
pub mod vkprocessor;
@ -146,6 +148,39 @@ pub fn main() {
compu_frame: CompuFrame::new((0, 0)),
});
let mut g = Graph::new();
let mut matrix : Vec<Vec<NodeIndex<u32>>> = vec![vec![NodeIndex::new(1); 20]; 20];
for x in 0..20 {
for y in 0..20 {
matrix[x][y] = g.add_node(((x, y), 0.));
}
}
for x in 0..20 {
for y in 0..20 {
matrix[x][y] = g.add_node(((x, y), 0.));
}
}
g.extend_with_edges(&[
(a, b, 1),
(a, d, 1),
(b, c, 1),
(b, f, 1),
(c, e, 1),
(e, f, 1),
(d, e, 1),
]);
// and the thing that renders it
world.create_entity()
.with(Compu { kernels: vec![compute_kernel], buffers: vec![compute_buffer] })// just a drawable
@ -244,7 +279,6 @@ pub fn main() {
}
accumulator_time += delta_time;
world.
// This dispatches all the systems in parallel (but blocking).
world.write_resource::<PersistentState>()

Loading…
Cancel
Save