summaryrefslogtreecommitdiff
path: root/engine/src/draw_flags.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-08-04 17:40:21 +0200
committerHampusM <hampus@hampusmat.com>2024-08-04 17:40:21 +0200
commita1649c20c7af13844f46b9da18a79a83a0fc01e1 (patch)
treefd0bc5cf36dbc4baede23a9bdc89f9bb583cb819 /engine/src/draw_flags.rs
parent1e2e8d585e06d51708d02162bee1a4bd16962626 (diff)
revert(engine): remove support for drawing objects as a bundle
This reverts commit 4793e4411d98d97f879023dc072f3847201d49da.
Diffstat (limited to 'engine/src/draw_flags.rs')
-rw-r--r--engine/src/draw_flags.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/engine/src/draw_flags.rs b/engine/src/draw_flags.rs
index 1352fe2..c8c11c9 100644
--- a/engine/src/draw_flags.rs
+++ b/engine/src/draw_flags.rs
@@ -1,11 +1,7 @@
-use std::sync::atomic::{AtomicUsize, Ordering};
-
use ecs::Component;
use crate::util::builder;
-static CURRENT_BUNDLE_ID: AtomicUsize = AtomicUsize::new(0);
-
builder! {
/// Flags for how a object should be drawn.
#[builder(name = Builder, derives = (Debug, Default, Clone))]
@@ -51,34 +47,3 @@ pub enum PolygonModeFace
#[default]
FrontAndBack,
}
-
-/// Metadata for how a object should be drawn together with other objects.
-#[derive(Debug, Clone, Component)]
-pub struct DrawingBundled
-{
- pub bundle_id: DrawingBundleId,
- pub order: usize,
-}
-
-/// The ID of a object drawing bundle.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
-pub struct DrawingBundleId
-{
- inner: usize,
-}
-
-impl DrawingBundleId
-{
- /// Creates a new unique bundle ID.
- pub fn new() -> Self
- {
- Self {
- inner: CURRENT_BUNDLE_ID.fetch_add(1, Ordering::Relaxed),
- }
- }
-
- pub fn inner(&self) -> usize
- {
- self.inner
- }
-}