aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:21 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:21 +0100
commit4cfa1bf05616089e166e252c5f583f20274658e9 (patch)
treebbce28bb7284289fec185398421db6a0519e9837 /stockton-render/src
parent9f6b7a10e7e00edf6ab50a9cf162b377d84a43f6 (diff)
refactor(all): remove render-quad and optimise imports
Diffstat (limited to 'stockton-render/src')
-rw-r--r--stockton-render/src/draw/camera.rs15
-rw-r--r--stockton-render/src/draw/context.rs4
2 files changed, 3 insertions, 16 deletions
diff --git a/stockton-render/src/draw/camera.rs b/stockton-render/src/draw/camera.rs
index 1a16803..0e9011a 100644
--- a/stockton-render/src/draw/camera.rs
+++ b/stockton-render/src/draw/camera.rs
@@ -15,19 +15,10 @@
//! Things related to converting 3D world space to 2D screen space
-use std::iter::once;
-use std::f32::consts::PI;
-use hal::prelude::*;
-use hal::buffer::Usage;
-use na::{look_at_lh, perspective_lh_zo};
-
-use core::mem::ManuallyDrop;
-
-use crate::error;
-use crate::types::*;
-use super::buffer::{StagedBuffer, ModifiableBuffer};
use stockton_types::{Vector3, Matrix4};
-use na::{Mat4, Vec4};
+
+use std::f32::consts::PI;
+use na::{look_at_lh, perspective_lh_zo, Mat4, Vec4};
/// 90 degrees in radians
const R89: f32 = (PI / 180.0) * 89.0;
diff --git a/stockton-render/src/draw/context.rs b/stockton-render/src/draw/context.rs
index d4b1f84..b76bed7 100644
--- a/stockton-render/src/draw/context.rs
+++ b/stockton-render/src/draw/context.rs
@@ -25,7 +25,6 @@ use std::{
};
use winit::window::Window;
use arrayvec::ArrayVec;
-use image::RgbaImage;
use hal::{
prelude::*,
@@ -56,9 +55,6 @@ const COLOR_RANGE: hal::image::SubresourceRange = hal::image::SubresourceRange {
layers: 0..1,
};
-/// Size of texturestore. This needs to sync up with the array size in the fragment shader
-const INITIAL_TEX_SIZE: usize = 2;
-
/// Initial size of vertex buffer. TODO: Way of overriding this
const INITIAL_VERT_SIZE: u64 = 3 * 3000;