Rename crates

This commit is contained in:
hodasemi 2025-03-01 06:43:44 +01:00
parent e22381b8e9
commit f90dfb6236
27 changed files with 34 additions and 27 deletions

View file

@ -2,8 +2,8 @@
resolver = "2" resolver = "2"
members = [ members = [
"ConfigHandler", "config_handler",
"Networking", "networking",
"asset", "asset",
"context", "context",
"controllable_thread", "controllable_thread",

View file

@ -86,17 +86,10 @@ impl VulkanCore {
// device extensions // device extensions
let mut dev_exts = DeviceExtensions::default(); let mut dev_exts = DeviceExtensions::default();
presentation_core.activate_vulkan_device_extensions(&mut dev_exts, &physical_device)?; presentation_core.activate_vulkan_device_extensions(&mut dev_exts, &physical_device)?;
dev_exts.memory_requirements2 = true;
dev_exts.amd_rasterization_order = true; dev_exts.amd_rasterization_order = true;
dev_exts.descriptor_indexing = true;
dev_exts.maintenance3 = true;
dev_exts.ray_tracing_pipeline = true; dev_exts.ray_tracing_pipeline = true;
dev_exts.deferred_host_operations = 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.acceleration_structure = true;
dev_exts.shader_float_controls = true;
dev_exts.pipeline_library = true; dev_exts.pipeline_library = true;
if vulkan_debug_info.renderdoc { if vulkan_debug_info.renderdoc {

View file

@ -17,7 +17,7 @@ utilities = { workspace = true }
assetpath = { workspace = true } assetpath = { workspace = true }
shaderc = { workspace = true } shaderc = { workspace = true }
config_handler = { path = "../ConfigHandler" } config_handler = { path = "../config_handler" }
asset = { path = "../asset" } asset = { path = "../asset" }
loading_screen = { path = "../loading-screen" } loading_screen = { path = "../loading-screen" }
context = { path = "../context", features = ["bundle_sdl2", "sound"] } context = { path = "../context", features = ["bundle_sdl2", "sound"] }

View file

@ -9,13 +9,13 @@ use utilities::prelude::cgmath::{Vector3, Zero};
use super::{ use super::{
super::{ super::{
shared::{bufferhandler::*, safecommandbuffer::SafeCommandBuffer},
ExtensionCheck, RasterizerDescriptorLayouts, RenderingFrontEnd, ExtensionCheck, RasterizerDescriptorLayouts, RenderingFrontEnd,
shared::{bufferhandler::*, safecommandbuffer::SafeCommandBuffer},
}, },
SceneInfo,
lights::light_wrapper::LightHandler, lights::light_wrapper::LightHandler,
pipelines::RasterizerPipelines, pipelines::RasterizerPipelines,
rasterizershader::RasterizerShader, rasterizershader::RasterizerShader,
SceneInfo,
}; };
use deferredhandler::{DeferredHandler, FallbackInfo}; use deferredhandler::{DeferredHandler, FallbackInfo};
@ -352,10 +352,6 @@ impl Rasterizer {
impl ExtensionCheck for Rasterizer { impl ExtensionCheck for Rasterizer {
fn check(device: &Arc<Device>) -> bool { fn check(device: &Arc<Device>) -> bool {
if !device.enabled_extensions().descriptor_indexing {
return false;
}
let physical_device = device.physical_device(); let physical_device = device.physical_device();
if physical_device if physical_device

View file

@ -5,12 +5,12 @@ use utilities::{impl_reprc, prelude::cgmath::Vector3};
use super::{ use super::{
super::{ super::{
shared::position_buffer_reader::PositionBuffer, ExtensionCheck, RaytracerDesciptorLayouts, ExtensionCheck, RaytracerDesciptorLayouts, RenderingFrontEnd,
RenderingFrontEnd, shared::position_buffer_reader::PositionBuffer,
}, },
RenderingCore,
animator::ComputeBasedAnimator, animator::ComputeBasedAnimator,
light::{LightData, RayTracerLight}, light::{LightData, RayTracerLight},
RenderingCore,
}; };
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
@ -488,10 +488,6 @@ where
T: RenderingCore, T: RenderingCore,
{ {
fn check(device: &Arc<Device>) -> bool { fn check(device: &Arc<Device>) -> bool {
if !device.enabled_extensions().descriptor_indexing {
return false;
}
let physical_device = device.physical_device(); let physical_device = device.physical_device();
if physical_device if physical_device

View file

@ -9,3 +9,4 @@ anyhow.workspace = true
ecs = { path = "../../ecs" } ecs = { path = "../../ecs" }
engine = { path = "../../engine" } engine = { path = "../../engine" }
skybox = { path = "../../skybox" }

View file

@ -1,7 +1,10 @@
use std::path::Path;
use anyhow::Result; use anyhow::Result;
use ecs::*; use ecs::*;
use engine::prelude::*; use engine::prelude::*;
use skybox::SkyBox;
fn main() -> Result<()> { fn main() -> Result<()> {
let mut world_builder = World::builder(); let mut world_builder = World::builder();
@ -11,6 +14,20 @@ fn main() -> Result<()> {
world_builder.add_system(GameState::update); world_builder.add_system(GameState::update);
world_builder.resources.insert(GameState::Startup); 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() world_builder.build().run()
} }

View file

@ -7,7 +7,7 @@ edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
config_handler = { path = "../ConfigHandler" } config_handler = { path = "../config_handler" }
anyhow = { workspace = true } anyhow = { workspace = true }
chrono = { workspace = true } chrono = { workspace = true }

View file

@ -33,9 +33,10 @@ pub struct SkyBox {
} }
impl 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 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([ let cube_map = Image::cube_map([
images.left.try_into()?, images.left.try_into()?,
@ -49,7 +50,10 @@ impl SkyBox {
.attach_pretty_sampler(context.device())? .attach_pretty_sampler(context.device())?
.build(context.device(), context.queue())?; .build(context.device(), context.queue())?;
Ok(Self { cube_map }) let me = Self { cube_map };
world.resources.insert(me);
Ok(())
} }
} }