summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-13 00:44:20 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-13 00:44:20 +0100
commit936f54e86f71d8e4af4784ebb32b6518c6fc3a01 (patch)
treeee7f0bd50c21ce31fbd53f46b5bd8a470f46ab44 /gfx
parentMove the vertex/fragment shader interface for materials into an include (diff)
downloadilt-936f54e86f71d8e4af4784ebb32b6518c6fc3a01.tar.bz2
ilt-936f54e86f71d8e4af4784ebb32b6518c6fc3a01.tar.xz
ilt-936f54e86f71d8e4af4784ebb32b6518c6fc3a01.zip
Fix submitting of integer values via vertex arrays
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gl/shaders/lightingShader.vs2
-rw-r--r--gfx/gl/vertexArrayObject.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/gfx/gl/shaders/lightingShader.vs b/gfx/gl/shaders/lightingShader.vs
index 2271d2e..e07cd0a 100644
--- a/gfx/gl/shaders/lightingShader.vs
+++ b/gfx/gl/shaders/lightingShader.vs
@@ -1,6 +1,6 @@
#version 330 core
-in vec4 position;
+in ivec4 position;
out vec2 TexCoords;
diff --git a/gfx/gl/vertexArrayObject.hpp b/gfx/gl/vertexArrayObject.hpp
index c0273c0..5b9fc60 100644
--- a/gfx/gl/vertexArrayObject.hpp
+++ b/gfx/gl/vertexArrayObject.hpp
@@ -61,7 +61,7 @@ private:
{
glEnableVertexAttribArray(vertexArrayId);
using traits = gl_traits<T>;
- glVertexAttribPointer(vertexArrayId, traits::size, traits::type, GL_FALSE, sizeof(Vertex), ptr);
+ traits::vertexAttribFunc(vertexArrayId, traits::size, traits::type, sizeof(Vertex), ptr);
}
template<auto Vertex::*attrib>