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"
members = [
"ConfigHandler",
"Networking",
"config_handler",
"networking",
"asset",
"context",
"controllable_thread",

View file

@ -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 {

View file

@ -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"] }

View file

@ -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

View file

@ -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

View file

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

View file

@ -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()
}

View file

@ -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 }

View file

@ -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(())
}
}