From 3881abdfade04f992208296491498f0736e5ac81 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 10 Dec 2015 16:01:10 +0300 Subject: Add pointer to OpenGL function glBindAttribLocation. --- src/graphicsmanager.cpp | 6 ++++++ src/render/mgl.hpp | 2 +- src/render/mgltypes.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 05e4de782..bd7347e53 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -978,6 +978,12 @@ void GraphicsManager::initOpenGLFunctions() } } + if (is20 || supportExtension("GL_ARB_explicit_attrib_location")) + { + logger->log1("found GL_ARB_explicit_attrib_location"); + assignFunction(glBindAttribLocation); + } + if (is12 && (is42 || supportExtension("GL_ARB_texture_storage"))) { logger->log1("found GL_ARB_texture_storage"); diff --git a/src/render/mgl.hpp b/src/render/mgl.hpp index c97dcfe59..47ad276d3 100644 --- a/src/render/mgl.hpp +++ b/src/render/mgl.hpp @@ -102,7 +102,7 @@ defName(glGetQueryObjectui64v); defName(glTextureSubImage2D); defName(glClearTexImage); defName(glClearTexSubImage); - +defName(glBindAttribLocation); #ifdef WIN32 defName(wglGetExtensionsString); #endif diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 5d033abf3..6b55f4430 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -185,6 +185,8 @@ typedef void (APIENTRY *glClearTexImage_t) (GLuint texture, GLint level, typedef void (APIENTRY *glClearTexSubImage_t) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); +typedef void (APIENTRY *glBindAttribLocation_t) (GLuint program, + GLuint index, const GLchar *name); // callback typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, -- cgit v1.2.3-70-g09d2