diff options
author | HampusM <hampus@hampusmat.com> | 2023-10-08 17:32:26 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-10-08 17:32:26 +0200 |
commit | be2b986a8466783f40b8627bbe6a3debbe147964 (patch) | |
tree | 6b6a783c34a308d641b1ec8ee546e2992928b940 /engine/src | |
parent | fefe6b84f0e94d8ea941964cd2f34cc159d990df (diff) |
feat(engine): add Debug derives
Diffstat (limited to 'engine/src')
-rw-r--r-- | engine/src/lib.rs | 1 | ||||
-rw-r--r-- | engine/src/object.rs | 1 | ||||
-rw-r--r-- | engine/src/renderer/mod.rs | 1 | ||||
-rw-r--r-- | engine/src/renderer/vertex_array.rs | 2 | ||||
-rw-r--r-- | engine/src/renderer/vertex_buffers.rs | 2 |
5 files changed, 7 insertions, 0 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 28cd2da..ebb635f 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -12,6 +12,7 @@ mod shader; pub mod object; pub mod vector; +#[derive(Debug)] pub struct Engine { window: Window, diff --git a/engine/src/object.rs b/engine/src/object.rs index ff84127..d1ac859 100644 --- a/engine/src/object.rs +++ b/engine/src/object.rs @@ -1,6 +1,7 @@ use crate::renderer::Renderable; use crate::shader::{Kind as ShaderKind, Program as ShaderProgram, Shader}; +#[derive(Debug)] pub struct Object { renderable: Renderable, diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index 3c42f93..a339ea8 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -50,6 +50,7 @@ pub fn render<'renderable>(renderables: impl IntoIterator<Item = &'renderable Re } } +#[derive(Debug)] pub struct Renderable { shader_program: crate::shader::Program, diff --git a/engine/src/renderer/vertex_array.rs b/engine/src/renderer/vertex_array.rs index e54f638..5862c7b 100644 --- a/engine/src/renderer/vertex_array.rs +++ b/engine/src/renderer/vertex_array.rs @@ -1,3 +1,4 @@ +#[derive(Debug)] pub struct VertexArray { array: gl::types::GLuint, @@ -46,6 +47,7 @@ impl Drop for VertexArray } } +#[derive(Debug)] pub enum PrimitiveKind { Triangles, diff --git a/engine/src/renderer/vertex_buffers.rs b/engine/src/renderer/vertex_buffers.rs index a6d1a2c..bb988d9 100644 --- a/engine/src/renderer/vertex_buffers.rs +++ b/engine/src/renderer/vertex_buffers.rs @@ -1,5 +1,6 @@ use std::mem::size_of_val; +#[derive(Debug)] pub struct VertexBuffers<const CNT: usize> { buffers: [gl::types::GLuint; CNT], @@ -57,6 +58,7 @@ impl<const CNT: usize> Drop for VertexBuffers<CNT> } } +#[derive(Debug)] #[allow(dead_code)] pub enum BufferUsage { |