From 35dc4c496075df44efeba617e6283b6425dcc133 Mon Sep 17 00:00:00 2001 From: "Alejandro W. Sior" Date: Sun, 25 Jun 2023 11:13:48 +0200 Subject: initial commit --- chisel/backends/opengl/gfx.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 chisel/backends/opengl/gfx.h (limited to 'chisel/backends/opengl/gfx.h') 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 +#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 -- cgit v1.2.3