Rename crates
This commit is contained in:
parent
e22381b8e9
commit
f90dfb6236
27 changed files with 34 additions and 27 deletions
|
@ -2,8 +2,8 @@
|
|||
resolver = "2"
|
||||
|
||||
members = [
|
||||
"ConfigHandler",
|
||||
"Networking",
|
||||
"config_handler",
|
||||
"networking",
|
||||
"asset",
|
||||
"context",
|
||||
"controllable_thread",
|
||||
|
|
|
@ -86,17 +86,10 @@ impl VulkanCore {
|
|||
// device extensions
|
||||
let mut dev_exts = DeviceExtensions::default();
|
||||
presentation_core.activate_vulkan_device_extensions(&mut dev_exts, &physical_device)?;
|
||||
dev_exts.memory_requirements2 = true;
|
||||
dev_exts.amd_rasterization_order = true;
|
||||
dev_exts.descriptor_indexing = true;
|
||||
dev_exts.maintenance3 = true;
|
||||
|
||||
dev_exts.ray_tracing_pipeline = true;
|
||||
dev_exts.deferred_host_operations = true;
|
||||
dev_exts.spirv_1_4 = true;
|
||||
dev_exts.buffer_device_address = true;
|
||||
dev_exts.acceleration_structure = true;
|
||||
dev_exts.shader_float_controls = true;
|
||||
dev_exts.pipeline_library = true;
|
||||
|
||||
if vulkan_debug_info.renderdoc {
|
||||
|
|
|
@ -17,7 +17,7 @@ utilities = { workspace = true }
|
|||
assetpath = { workspace = true }
|
||||
shaderc = { workspace = true }
|
||||
|
||||
config_handler = { path = "../ConfigHandler" }
|
||||
config_handler = { path = "../config_handler" }
|
||||
asset = { path = "../asset" }
|
||||
loading_screen = { path = "../loading-screen" }
|
||||
context = { path = "../context", features = ["bundle_sdl2", "sound"] }
|
||||
|
|
|
@ -9,13 +9,13 @@ use utilities::prelude::cgmath::{Vector3, Zero};
|
|||
|
||||
use super::{
|
||||
super::{
|
||||
shared::{bufferhandler::*, safecommandbuffer::SafeCommandBuffer},
|
||||
ExtensionCheck, RasterizerDescriptorLayouts, RenderingFrontEnd,
|
||||
shared::{bufferhandler::*, safecommandbuffer::SafeCommandBuffer},
|
||||
},
|
||||
SceneInfo,
|
||||
lights::light_wrapper::LightHandler,
|
||||
pipelines::RasterizerPipelines,
|
||||
rasterizershader::RasterizerShader,
|
||||
SceneInfo,
|
||||
};
|
||||
|
||||
use deferredhandler::{DeferredHandler, FallbackInfo};
|
||||
|
@ -352,10 +352,6 @@ impl Rasterizer {
|
|||
|
||||
impl ExtensionCheck for Rasterizer {
|
||||
fn check(device: &Arc<Device>) -> bool {
|
||||
if !device.enabled_extensions().descriptor_indexing {
|
||||
return false;
|
||||
}
|
||||
|
||||
let physical_device = device.physical_device();
|
||||
|
||||
if physical_device
|
||||
|
|
|
@ -5,12 +5,12 @@ use utilities::{impl_reprc, prelude::cgmath::Vector3};
|
|||
|
||||
use super::{
|
||||
super::{
|
||||
shared::position_buffer_reader::PositionBuffer, ExtensionCheck, RaytracerDesciptorLayouts,
|
||||
RenderingFrontEnd,
|
||||
ExtensionCheck, RaytracerDesciptorLayouts, RenderingFrontEnd,
|
||||
shared::position_buffer_reader::PositionBuffer,
|
||||
},
|
||||
RenderingCore,
|
||||
animator::ComputeBasedAnimator,
|
||||
light::{LightData, RayTracerLight},
|
||||
RenderingCore,
|
||||
};
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -488,10 +488,6 @@ where
|
|||
T: RenderingCore,
|
||||
{
|
||||
fn check(device: &Arc<Device>) -> bool {
|
||||
if !device.enabled_extensions().descriptor_indexing {
|
||||
return false;
|
||||
}
|
||||
|
||||
let physical_device = device.physical_device();
|
||||
|
||||
if physical_device
|
||||
|
|
|
@ -9,3 +9,4 @@ anyhow.workspace = true
|
|||
|
||||
ecs = { path = "../../ecs" }
|
||||
engine = { path = "../../engine" }
|
||||
skybox = { path = "../../skybox" }
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
use std::path::Path;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use ecs::*;
|
||||
use engine::prelude::*;
|
||||
use skybox::SkyBox;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let mut world_builder = World::builder();
|
||||
|
@ -11,6 +14,20 @@ fn main() -> Result<()> {
|
|||
world_builder.add_system(GameState::update);
|
||||
world_builder.resources.insert(GameState::Startup);
|
||||
|
||||
let dir = Path::new("/home/michaelh/Sync/skybox");
|
||||
SkyBox::new(
|
||||
&mut world_builder,
|
||||
[
|
||||
dir.join("left.png"),
|
||||
dir.join("right.png"),
|
||||
dir.join("front.png"),
|
||||
dir.join("back.png"),
|
||||
dir.join("top.png"),
|
||||
dir.join("bottom.png"),
|
||||
]
|
||||
.into_iter(),
|
||||
)?;
|
||||
|
||||
world_builder.build().run()
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2024"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
config_handler = { path = "../ConfigHandler" }
|
||||
config_handler = { path = "../config_handler" }
|
||||
anyhow = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
|
@ -33,9 +33,10 @@ pub struct SkyBox {
|
|||
}
|
||||
|
||||
impl SkyBox {
|
||||
pub fn new(world: &mut WorldBuilder, images: impl Into<SkyBoxImages>) -> Result<Self> {
|
||||
pub fn new(world: &mut WorldBuilder, images: impl Into<SkyBoxImages>) -> Result<()> {
|
||||
let images = images.into();
|
||||
let context = world.resources.get::<Context>();
|
||||
let context = world.resources.get_mut::<Context>();
|
||||
context.render_core_mut().add_render_routine::<Self>(1);
|
||||
|
||||
let cube_map = Image::cube_map([
|
||||
images.left.try_into()?,
|
||||
|
@ -49,7 +50,10 @@ impl SkyBox {
|
|||
.attach_pretty_sampler(context.device())?
|
||||
.build(context.device(), context.queue())?;
|
||||
|
||||
Ok(Self { cube_map })
|
||||
let me = Self { cube_map };
|
||||
world.resources.insert(me);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue