summaryrefslogtreecommitdiff
path: root/gfx/gl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-28 11:45:01 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-28 11:45:01 +0100
commit3c1c392ab177566f09d11a380210e1937741fad2 (patch)
tree67b12689c60dc2e75a5587988dd11bf36c12da9a /gfx/gl
parentAdd glad submodule and build a glad library (diff)
downloadilt-3c1c392ab177566f09d11a380210e1937741fad2.tar.bz2
ilt-3c1c392ab177566f09d11a380210e1937741fad2.tar.xz
ilt-3c1c392ab177566f09d11a380210e1937741fad2.zip
Swap GLEW for more modern glad
Diffstat (limited to 'gfx/gl')
-rw-r--r--gfx/gl/program.h2
-rw-r--r--gfx/gl/shader.h4
-rw-r--r--gfx/gl/uiShader.h2
-rw-r--r--gfx/gl/vertexArrayObject.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/gfx/gl/program.h b/gfx/gl/program.h
index 2708ff0..76b6742 100644
--- a/gfx/gl/program.h
+++ b/gfx/gl/program.h
@@ -1,8 +1,8 @@
#pragma once
#include "shader.h"
-#include <GL/glew.h>
#include <glRef.h>
+#include <glad/gl.h>
#include <glm/mat4x4.hpp>
#include <special_members.h>
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h
index cb8065b..0810e6b 100644
--- a/gfx/gl/shader.h
+++ b/gfx/gl/shader.h
@@ -1,13 +1,13 @@
#pragma once
-#include <GL/glew.h>
#include <glRef.h>
+#include <glad/gl.h>
#include <optional>
#include <string_view>
class Shader {
public:
- using ShaderRef = glRef<GLuint, &__glewCreateShader, &__glewDeleteShader>;
+ using ShaderRef = glRef<GLuint, &glCreateShader, &glDeleteShader>;
constexpr Shader(const GLchar * text, GLint len, GLuint type) : text {text}, len {len}, type {type} { }
[[nodiscard]] ShaderRef compile() const;
diff --git a/gfx/gl/uiShader.h b/gfx/gl/uiShader.h
index 054c944..2766af8 100644
--- a/gfx/gl/uiShader.h
+++ b/gfx/gl/uiShader.h
@@ -1,8 +1,8 @@
#pragma once
#include "program.h"
-#include <GL/glew.h>
#include <cstddef>
+#include <glad/gl.h>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
diff --git a/gfx/gl/vertexArrayObject.h b/gfx/gl/vertexArrayObject.h
index 1d27588..fa6baa3 100644
--- a/gfx/gl/vertexArrayObject.h
+++ b/gfx/gl/vertexArrayObject.h
@@ -3,7 +3,7 @@
#include "collections.h"
#include "gl_traits.h"
#include "special_members.h"
-#include <GL/glew.h>
+#include <glad/gl.h>
class VertexArrayObject {
public: