summaryrefslogtreecommitdiffstats
path: root/Project/Renderer.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-07-07 23:12:04 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-07-07 23:12:04 -0300
commitab30228b1a57053323363674fa7f137c0329a180 (patch)
tree50849a3680d61a2428665cc1035f1f4215870acb /Project/Renderer.h
parent6c0e98a2727d07e1fbb38b78c27d68e98ad09465 (diff)
downloadPSP.git-ab30228b1a57053323363674fa7f137c0329a180.tar.gz
PSP.git-ab30228b1a57053323363674fa7f137c0329a180.tar.xz
PSP.git-ab30228b1a57053323363674fa7f137c0329a180.zip
Voltage heat map implemented
Voltage heat map implemented using modern OpenGL =) New external library required: -GLEW -GLFW -GLM (incorporeted at the source) Old memory leaks fixed =)
Diffstat (limited to 'Project/Renderer.h')
-rw-r--r--Project/Renderer.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Project/Renderer.h b/Project/Renderer.h
new file mode 100644
index 0000000..29b5bf8
--- /dev/null
+++ b/Project/Renderer.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <GL/glew.h>
+#include <GL/glu.h>
+#include <GLFW/glfw3.h>
+
+#include "VertexArray.h"
+#include "IndexBuffer.h"
+#include "Shader.h"
+
+#define ASSERT(x) if (!(x)) __debugbreak();
+#define GLCall(x) GLClearError();\
+ x;\
+ ASSERT(GLCheckError())
+
+void GLClearError();
+bool GLCheckError();
+
+class Renderer
+{
+public:
+ void Draw(const VertexArray& va, const IndexBuffer& ib, const Shader& shader) const;
+ void Clear();
+ void Ortho2D(float* mat, float left, float right, float bottom, float top);
+}; \ No newline at end of file