summaryrefslogtreecommitdiff
path: root/chisel/backends/opengl/gfx.h
diff options
context:
space:
mode:
authorAlejandro W. Sior <aho@sior.be>2023-06-25 11:13:48 +0200
committerAlejandro W. Sior <aho@sior.be>2023-06-25 11:13:48 +0200
commit35dc4c496075df44efeba617e6283b6425dcc133 (patch)
tree87ba1f51d8e21b4fde08b4eb1eb9a710781b1c4f /chisel/backends/opengl/gfx.h
initial commitHEADmaster
Diffstat (limited to 'chisel/backends/opengl/gfx.h')
-rw-r--r--chisel/backends/opengl/gfx.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/chisel/backends/opengl/gfx.h b/chisel/backends/opengl/gfx.h
new file mode 100644
index 0000000..e84ad5b
--- /dev/null
+++ b/chisel/backends/opengl/gfx.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <glad/glad.h>
+#include "drawable.h"
+#include "program.h"
+
+namespace gfx {
+ extern class Shaders {
+ Program* _standard = nullptr;
+ public:
+ Program* standard();
+ } shaders;
+
+ namespace state {
+ extern GLuint current_program_id;
+ extern float width;
+ extern float height;
+ }
+
+ enum constants {
+ VERTEX_SHADER = GL_VERTEX_SHADER,
+ FRAGMENT_SHADER = GL_FRAGMENT_SHADER
+ };
+
+ void viewport(int w, int h);
+ void draw(Drawable& object);
+} \ No newline at end of file