summaryrefslogtreecommitdiff
path: root/engine/src/opengl
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-02-19 23:06:17 +0100
committerHampusM <hampus@hampusmat.com>2024-02-19 23:06:17 +0100
commit88d6ae3e4854c5fb4b37f75a29aba4f13dcfb382 (patch)
tree033431187e1f6fc4aa4f36a7f46490af5ef338ce /engine/src/opengl
parente8c6c096b2068f4ea71b021bf02f56d266ed671c (diff)
refactor(engine): create shaders on start
Diffstat (limited to 'engine/src/opengl')
-rw-r--r--engine/src/opengl/shader.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/engine/src/opengl/shader.rs b/engine/src/opengl/shader.rs
index 224a9bc..2312adc 100644
--- a/engine/src/opengl/shader.rs
+++ b/engine/src/opengl/shader.rs
@@ -3,6 +3,7 @@ use std::ptr::null_mut;
use crate::matrix::Matrix;
use crate::opengl::currently_bound::CurrentlyBound;
+use crate::shader::Kind;
use crate::vector::Vec3;
#[derive(Debug)]
@@ -90,14 +91,6 @@ impl Drop for Shader
}
}
-/// Shader kind.
-#[derive(Debug, Clone, Copy)]
-pub enum Kind
-{
- Vertex,
- Fragment,
-}
-
impl Kind
{
fn into_gl(self) -> gl::types::GLenum
@@ -110,7 +103,7 @@ impl Kind
}
/// Shader program
-#[derive(Debug)]
+#[derive(Debug, PartialEq, Eq, Hash)]
pub struct Program
{
program: gl::types::GLuint,