aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/draw
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
commit83e4ac1499b548957c554f740934b9b2a02310aa (patch)
treec890dc4ca220a4ee53b88a729472050e6da0b9b9 /stockton-render/src/draw
parent95708732572431dc057a9fd71fa8bd8571a336a2 (diff)
refactor(all): 2018 edition
Diffstat (limited to 'stockton-render/src/draw')
-rw-r--r--stockton-render/src/draw/camera.rs2
-rw-r--r--stockton-render/src/draw/draw_buffers.rs9
-rw-r--r--stockton-render/src/draw/target.rs4
-rw-r--r--stockton-render/src/draw/texture/image.rs2
-rw-r--r--stockton-render/src/draw/texture/loader.rs4
5 files changed, 11 insertions, 10 deletions
diff --git a/stockton-render/src/draw/camera.rs b/stockton-render/src/draw/camera.rs
index 7333152..11bf617 100644
--- a/stockton-render/src/draw/camera.rs
+++ b/stockton-render/src/draw/camera.rs
@@ -200,7 +200,7 @@ impl WorkingCamera {
#[cfg(test)]
mod tests {
- use draw::camera::WorkingCamera;
+ use crate::draw::camera::WorkingCamera;
use stockton_types::Matrix4;
use stockton_types::Vector3;
diff --git a/stockton-render/src/draw/draw_buffers.rs b/stockton-render/src/draw/draw_buffers.rs
index 2fdfa10..faf9c4e 100644
--- a/stockton-render/src/draw/draw_buffers.rs
+++ b/stockton-render/src/draw/draw_buffers.rs
@@ -15,10 +15,11 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-use crate::types::*;
-use draw::buffer::StagedBuffer;
-use draw::UVPoint;
-use error::CreationError;
+use crate::{
+ draw::{buffer::StagedBuffer, UVPoint},
+ error::CreationError,
+ types::*,
+};
use hal::buffer::Usage;
use std::mem::ManuallyDrop;
diff --git a/stockton-render/src/draw/target.rs b/stockton-render/src/draw/target.rs
index f8b9bd7..65e03a2 100644
--- a/stockton-render/src/draw/target.rs
+++ b/stockton-render/src/draw/target.rs
@@ -21,9 +21,9 @@ use crate::types::*;
use core::{iter::once, mem::ManuallyDrop};
+use crate::draw::buffer::ModifiableBuffer;
+use crate::draw::draw_buffers::DrawBuffers;
use arrayvec::ArrayVec;
-use draw::buffer::ModifiableBuffer;
-use draw::draw_buffers::DrawBuffers;
use hal::{
format::{ChannelType, Format, Swizzle},
image::{Extent, Usage as ImgUsage, ViewKind},
diff --git a/stockton-render/src/draw/texture/image.rs b/stockton-render/src/draw/texture/image.rs
index 9a196a7..4a0fa08 100644
--- a/stockton-render/src/draw/texture/image.rs
+++ b/stockton-render/src/draw/texture/image.rs
@@ -31,8 +31,8 @@ use hal::{
use image::RgbaImage;
use std::{convert::TryInto, iter::once};
+use crate::draw::buffer::create_buffer;
use crate::types::*;
-use draw::buffer::create_buffer;
/// The size of each pixel in an image
const PIXEL_SIZE: usize = size_of::<image::Rgba<u8>>();
diff --git a/stockton-render/src/draw/texture/loader.rs b/stockton-render/src/draw/texture/loader.rs
index d71aa26..dbd9d70 100644
--- a/stockton-render/src/draw/texture/loader.rs
+++ b/stockton-render/src/draw/texture/loader.rs
@@ -18,9 +18,9 @@
//! Deals with loading textures into GPU memory
use super::chunk::TextureChunk;
+use crate::draw::texture::chunk::CHUNK_SIZE;
+use crate::draw::texture::resolver::BasicFSResolver;
use core::mem::ManuallyDrop;
-use draw::texture::chunk::CHUNK_SIZE;
-use draw::texture::resolver::BasicFSResolver;
use std::path::Path;
use log::debug;