From 88d6ae3e4854c5fb4b37f75a29aba4f13dcfb382 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 19 Feb 2024 23:06:17 +0100 Subject: refactor(engine): create shaders on start --- engine/src/opengl/shader.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'engine/src/opengl/shader.rs') 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, -- cgit v1.2.3-18-g5258