hulk smashing all these states together for da world

This commit is contained in:
2020-08-09 22:36:10 -07:00
parent c10115e7b9
commit c52bdc1441
13 changed files with 192 additions and 234 deletions

View File

@@ -28,8 +28,8 @@ use winit::window::WindowBuilder;
use crate::canvas::canvas_frame::{CanvasFrame, Drawable, Eventable, Updatable};
use crate::canvas::canvas_state::CanvasState;
use crate::canvas::managed::handles::{CanvasFontHandle, CanvasTextureHandle, Handle};
use crate::compute::compu_frame::CompuFrame;
use crate::compute::managed::handles::{CompuBufferHandle, CompuKernelHandle};
use canvas::compu_frame::CompuFrame;
use crate::canvas::managed::handles::{CompuBufferHandle, CompuKernelHandle};
use crate::drawables::compu_sprite::CompuSprite;
use crate::drawables::rect::Rect;
use crate::drawables::sprite::Sprite;
@@ -45,7 +45,6 @@ pub mod util;
pub mod vkprocessor;
pub mod drawables;
pub mod canvas;
pub mod compute;
extern crate specs;
@@ -102,10 +101,11 @@ impl<'a> System<'a> for RenderSystem {
struct SysA;
impl<'a> System<'a> for SysA {
// These are the resources required for execution.
// You can also define a struct and `#[derive(SystemData)]`,
// see the `full` example.
type SystemData = (WriteStorage<'a, Pos>, ReadStorage<'a, Vel>);
type SystemData = (
WriteStorage<'a, Pos>,
ReadStorage<'a, Vel>
);
fn run(&mut self, (mut pos, vel): Self::SystemData) {
// The `.join()` combines multiple components,
@@ -198,8 +198,13 @@ pub fn main() {
// So I would have to go full in on the ECS in order to do rendering...
// That would probably look like a canvasFrame and compuFrame component which would
// be added to the world.
// Though canvasFrame and compuFrame have to share the command_buffer
// which means I should just keep the vk processor lol
// The `World` is our
// container for components