summary refs log tree commit diff
path: root/src/Shader/Shader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Shader/Shader.hpp')
-rw-r--r--src/Shader/Shader.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Shader/Shader.hpp b/src/Shader/Shader.hpp
new file mode 100644
index 0000000..75c4f14
--- /dev/null
+++ b/src/Shader/Shader.hpp
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <cstdint>
+#include "ShaderSources.hpp"
+
+namespace MC {
+
+class Shader {
+
+public:
+    uint32_t get() const {
+        return m_shader;
+    }
+
+    static Shader create_vertex() {
+        return {GL_VERTEX_SHADER, ShaderSources::vertex_shader};
+    }
+
+    static Shader create_fragment() {
+        return {GL_FRAGMENT_SHADER, ShaderSources::fragment_shader};
+    }
+
+private:
+    Shader(uint32_t type, const char* source);
+
+    uint32_t m_shader;
+};
+
+}
\ No newline at end of file