engine/physics: separate into rust_library
parent
f46c925e1f
commit
081db95b45
|
@ -19,9 +19,6 @@ rust_library(
|
|||
"input.rs",
|
||||
"scripting.rs",
|
||||
|
||||
"physics/mod.rs",
|
||||
"physics/color.rs",
|
||||
|
||||
"render/mod.rs",
|
||||
"render/light.rs",
|
||||
"render/material.rs",
|
||||
|
@ -42,6 +39,7 @@ rust_library(
|
|||
],
|
||||
deps = [
|
||||
"//engine/util",
|
||||
"//engine/physics",
|
||||
"//lib/ecs",
|
||||
"//third_party/cargo:cgmath",
|
||||
"//third_party/cargo:image",
|
||||
|
|
|
@ -17,5 +17,4 @@
|
|||
pub mod globals;
|
||||
pub mod input;
|
||||
pub mod render;
|
||||
pub mod physics;
|
||||
pub mod scripting;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
load("@rules_rust//rust:rust.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "physics",
|
||||
crate_name = "engine_physics",
|
||||
edition = "2018",
|
||||
rustc_flags = [
|
||||
"-C", "opt-level=3",
|
||||
"-C", "overflow-checks=n",
|
||||
"-C", "force-frame-pointers=y",
|
||||
"-C", "lto=off",
|
||||
"-Zpolonius",
|
||||
"-Zborrowck=mir",
|
||||
],
|
||||
srcs = [
|
||||
"lib.rs",
|
||||
"color.rs",
|
||||
],
|
||||
deps = [
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
|
@ -18,7 +18,8 @@ use std::time;
|
|||
|
||||
use cgmath as cgm;
|
||||
|
||||
use crate::physics::color;
|
||||
use engine_physics::color;
|
||||
|
||||
use crate::render::vulkan::data;
|
||||
|
||||
/// An Omni point light, with position in 3d space, and 'color' defined in lumens per CIE XYZ
|
||||
|
|
|
@ -24,8 +24,8 @@ use vulkano::format as vf;
|
|||
use vulkano::image as vm;
|
||||
|
||||
use engine_util::file;
|
||||
use engine_physics::color;
|
||||
|
||||
use crate::physics::color;
|
||||
use crate::render::vulkan::data;
|
||||
use crate::render::vulkan::material::ChannelLayoutVulkan;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ use vulkano::sampler as vs;
|
|||
use vulkano::sync::GpuFuture;
|
||||
use vulkano::command_buffer::CommandBuffer;
|
||||
|
||||
use crate::physics::color;
|
||||
use engine_physics::color as color;
|
||||
|
||||
/// Construct a mipmapped vulkan image from an iterator of raw data.
|
||||
fn mipmapped_from_iter<P, I, F>(
|
||||
|
|
|
@ -21,6 +21,7 @@ rust_binary(
|
|||
deps = [
|
||||
"//engine",
|
||||
"//engine/util",
|
||||
"//engine/physics",
|
||||
"//lib/ecs",
|
||||
"//third_party/cargo:cgmath",
|
||||
"//third_party/cargo:env_logger",
|
||||
|
|
|
@ -5,8 +5,8 @@ use ecs_macros::Access;
|
|||
use engine::{globals, input, render, scripting};
|
||||
use engine::render::material;
|
||||
use engine::render::vulkan::data;
|
||||
use engine::physics;
|
||||
|
||||
use engine_physics as physics;
|
||||
use engine_util as util;
|
||||
|
||||
struct Main {
|
||||
|
|
Loading…
Reference in New Issue