summaryrefslogtreecommitdiff
path: root/chisel/backends/opengl/gfx.h
diff options
context:
space:
mode:
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