add gear renderer module
authoralfadur
Thu, 28 Mar 2019 00:38:53 +0300
changeset 14750 6aa8080b3b39
parent 14749 069291842d52
child 14751 5631c81217dc
add gear renderer module
rust/lib-hedgewars-engine/src/render.rs
rust/lib-hedgewars-engine/src/render/gear.rs
--- a/rust/lib-hedgewars-engine/src/render.rs	Thu Mar 28 00:33:36 2019 +0300
+++ b/rust/lib-hedgewars-engine/src/render.rs	Thu Mar 28 00:38:53 2019 +0300
@@ -1,7 +1,9 @@
 pub mod atlas;
 pub mod camera;
+mod gear;
 mod gl;
 mod map;
 
 use self::gl::*;
 pub use self::map::*;
+pub use gear::*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rust/lib-hedgewars-engine/src/render/gear.rs	Thu Mar 28 00:38:53 2019 +0300
@@ -0,0 +1,15 @@
+use super::atlas::AtlasCollection;
+use integral_geometry::Size;
+
+struct GearRenderer {
+    atlas: AtlasCollection,
+}
+
+const ATLAS_SIZE: Size = Size::square(2048);
+
+impl GearRenderer {
+    pub fn new() -> Self {
+        let atlas = AtlasCollection::new(ATLAS_SIZE);
+        Self { atlas }
+    }
+}