summaryrefslogtreecommitdiffstats
path: root/src/Renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Renderer.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Renderer.cpp b/src/Renderer.cpp
new file mode 100644
index 0000000..5fc8c2e
--- /dev/null
+++ b/src/Renderer.cpp
@@ -0,0 +1,15 @@
+#include "Renderer.hpp"
+
+void RenderState::SetActiveVao(GLuint Vao) {
+ if (Vao != ActiveVao) {
+ glBindVertexArray(Vao);
+ ActiveVao = Vao;
+ }
+}
+
+void RenderState::SetActiveShader(GLuint Shader) {
+ if (Shader != ActiveShader) {
+ glUseProgram(Shader);
+ ActiveShader = Shader;
+ }
+} \ No newline at end of file