summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphicsmanager.cpp7
-rw-r--r--src/render/mgl.cpp3
-rw-r--r--src/render/mgl.h3
-rw-r--r--src/render/mgltypes.h6
4 files changed, 19 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index c7e4777e1..7e7e4230f 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -1029,6 +1029,13 @@ void GraphicsManager::initOpenGLFunctions()
assignFunction(glProgramUniform3f, "glProgramUniform3f");
assignFunction(glProgramUniform4f, "glProgramUniform4f");
}
+ if (checkGLVersion(4, 3)
+ || supportExtension("GL_ARB_vertex_attrib_binding"))
+ {
+ assignFunction(glBindVertexBuffer, "glBindVertexBuffer");
+ assignFunction(glVertexAttribBinding, "glVertexAttribBinding");
+ assignFunction(glVertexAttribFormat, "glVertexAttribFormat");
+ }
}
else
{
diff --git a/src/render/mgl.cpp b/src/render/mgl.cpp
index fc67c36cd..a7d79f6b0 100644
--- a/src/render/mgl.cpp
+++ b/src/render/mgl.cpp
@@ -88,6 +88,9 @@ defName(glProgramUniform1f);
defName(glProgramUniform2f);
defName(glProgramUniform3f);
defName(glProgramUniform4f);
+defName(glBindVertexBuffer);
+defName(glVertexAttribBinding);
+defName(glVertexAttribFormat);
#ifdef WIN32
defName(wglGetExtensionsString);
diff --git a/src/render/mgl.h b/src/render/mgl.h
index 2bc275629..450c6946a 100644
--- a/src/render/mgl.h
+++ b/src/render/mgl.h
@@ -91,6 +91,9 @@ defNameE(glProgramUniform1f);
defNameE(glProgramUniform2f);
defNameE(glProgramUniform3f);
defNameE(glProgramUniform4f);
+defNameE(glBindVertexBuffer);
+defNameE(glVertexAttribBinding);
+defNameE(glVertexAttribFormat);
#ifdef WIN32
defNameE(wglGetExtensionsString);
diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h
index b4b300a96..690255541 100644
--- a/src/render/mgltypes.h
+++ b/src/render/mgltypes.h
@@ -131,6 +131,12 @@ typedef void (APIENTRY *glProgramUniform3f_t) (GLuint program,
GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
typedef void (APIENTRY *glProgramUniform4f_t) (GLuint program,
GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRY *glBindVertexBuffer_t) (GLuint bindingindex,
+ GLuint buffer, GLintptr offset, GLintptr stride);
+typedef void (APIENTRY *glVertexAttribBinding_t) (GLuint attribindex,
+ GLuint bindingindex);
+typedef void (APIENTRY *glVertexAttribFormat_t) (GLuint attribindex,
+ GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
// callback
typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id,