feat: dmatex!! (sorta, borken)

This commit is contained in:
Nova
2025-07-10 10:13:38 -07:00
parent 929ea054f3
commit 63cf0db448
12 changed files with 146 additions and 277 deletions

View File

@@ -1,6 +1,5 @@
use super::{
client_state::{CLIENT_STATES, ClientStateParsed},
destroy_queue,
scenegraph::Scenegraph,
};
use crate::{
@@ -231,9 +230,6 @@ impl Client {
if let Some(flush_join_handle) = self.flush_join_handle.get() {
flush_join_handle.abort();
}
if let Some(client) = CLIENTS.remove(self) {
destroy_queue::add(client);
}
}
}
impl Debug for Client {

View File

@@ -1,23 +0,0 @@
use parking_lot::Mutex;
use std::{any::Any, sync::LazyLock};
use tokio::sync::mpsc::{self, unbounded_channel};
type Anything = Box<dyn Any + Send + Sync>;
static MAIN_DESTROY_QUEUE: LazyLock<(
mpsc::UnboundedSender<Anything>,
Mutex<mpsc::UnboundedReceiver<Anything>>,
)> = LazyLock::new(|| {
let (tx, rx) = unbounded_channel();
(tx, Mutex::new(rx))
});
pub fn add<T: Any + Sync + Send>(thing: T) {
MAIN_DESTROY_QUEUE.0.send(Box::new(thing)).unwrap();
}
pub fn clear() {
while let Ok(thing) = MAIN_DESTROY_QUEUE.1.lock().try_recv() {
drop(thing)
}
}

View File

@@ -1,7 +0,0 @@
use bevy::asset::Assets;
use bevy::ecs::world::Mut;
use bevy::image::Image;
pub struct GraphicsInfo<'w> {
pub _images: Mut<'w, Assets<Image>>,
}

View File

@@ -3,10 +3,8 @@ pub mod client;
pub mod client_state;
pub mod color;
pub mod delta;
pub mod destroy_queue;
pub mod entity_handle;
pub mod error;
pub mod graphics_info;
pub mod registry;
pub mod resource;
pub mod scenegraph;