From 16aee7e951a63492548380517eb550be93ce4369 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Jun 2014 12:04:01 +0300 Subject: Add OpenGL glBindVertexBuffers. Add info about missing and found OpenGL functions. --- src/graphicsmanager.cpp | 19 +++++++++++++++++++ src/render/mgl.cpp | 1 + src/render/mgl.h | 1 + src/render/mgltypes.h | 2 ++ 4 files changed, 23 insertions(+) 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, -- cgit v1.2.3-60-g2f50