diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-11 12:04:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-11 12:04:01 +0300 |
commit | 16aee7e951a63492548380517eb550be93ce4369 (patch) | |
tree | 30727de9a1cc21c0b136cae0aa9a0e6d9e032f4e | |
parent | 1d9fa814bd0eff8fe5d892141ee731f95143766f (diff) | |
download | plus-16aee7e951a63492548380517eb550be93ce4369.tar.gz plus-16aee7e951a63492548380517eb550be93ce4369.tar.bz2 plus-16aee7e951a63492548380517eb550be93ce4369.tar.xz plus-16aee7e951a63492548380517eb550be93ce4369.zip |
Add OpenGL glBindVertexBuffers.
Add info about missing and found OpenGL functions.
-rw-r--r-- | src/graphicsmanager.cpp | 19 | ||||
-rw-r--r-- | src/render/mgl.cpp | 1 | ||||
-rw-r--r-- | src/render/mgl.h | 1 | ||||
-rw-r--r-- | src/render/mgltypes.h | 2 |
4 files changed, 23 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 7e7e4230f..cfed98cb1 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -1024,18 +1024,37 @@ void GraphicsManager::initOpenGLFunctions() if (checkGLVersion(4, 1) || supportExtension("GL_ARB_separate_shader_objects")) { + logger->log1("found GL_ARB_separate_shader_objects"); assignFunction(glProgramUniform1f, "glProgramUniform1f"); assignFunction(glProgramUniform2f, "glProgramUniform2f"); assignFunction(glProgramUniform3f, "glProgramUniform3f"); assignFunction(glProgramUniform4f, "glProgramUniform4f"); } + else + { + logger->log1("GL_ARB_separate_shader_objects not supported"); + } if (checkGLVersion(4, 3) || supportExtension("GL_ARB_vertex_attrib_binding")) { + logger->log1("found GL_ARB_vertex_attrib_binding"); assignFunction(glBindVertexBuffer, "glBindVertexBuffer"); assignFunction(glVertexAttribBinding, "glVertexAttribBinding"); assignFunction(glVertexAttribFormat, "glVertexAttribFormat"); } + else + { + logger->log1("GL_ARB_vertex_attrib_binding not supported"); + } + if (checkGLVersion(4, 4) || supportExtension("GL_ARB_multi_bind")) + { + logger->log1("found GL_ARB_multi_bind"); + assignFunction(glBindVertexBuffers, "glBindVertexBuffers"); + } + else + { + logger->log1("GL_ARB_multi_bind not supported"); + } } else { diff --git a/src/render/mgl.cpp b/src/render/mgl.cpp index a7d79f6b0..88f413ea2 100644 --- a/src/render/mgl.cpp +++ b/src/render/mgl.cpp @@ -91,6 +91,7 @@ defName(glProgramUniform4f); defName(glBindVertexBuffer); defName(glVertexAttribBinding); defName(glVertexAttribFormat); +defName(glBindVertexBuffers); #ifdef WIN32 defName(wglGetExtensionsString); diff --git a/src/render/mgl.h b/src/render/mgl.h index 450c6946a..0f918ff02 100644 --- a/src/render/mgl.h +++ b/src/render/mgl.h @@ -94,6 +94,7 @@ defNameE(glProgramUniform4f); defNameE(glBindVertexBuffer); defNameE(glVertexAttribBinding); defNameE(glVertexAttribFormat); +defNameE(glBindVertexBuffers); #ifdef WIN32 defNameE(wglGetExtensionsString); diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 690255541..3b481e586 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -137,6 +137,8 @@ typedef void (APIENTRY *glVertexAttribBinding_t) (GLuint attribindex, GLuint bindingindex); typedef void (APIENTRY *glVertexAttribFormat_t) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRY *glBindVertexBuffers_t) (GLuint first, GLsizei count, + const GLuint *buffers, const GLuint *offsets, const GLsizei *strides); // callback typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, |