--- /dev/null
+#include "extension.h"
+#include "arb_uniform_buffer_object.h"
+
+namespace Msp {
+namespace GL {
+
+PFNGLGETUNIFORMINDICESPROC glGetUniformIndices = 0;
+PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv = 0;
+PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName = 0;
+PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex = 0;
+PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv = 0;
+PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName = 0;
+PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding = 0;
+
+void init_arb_uniform_buffer_object()
+{
+ glGetUniformIndices = reinterpret_cast<PFNGLGETUNIFORMINDICESPROC>(get_proc_address("glGetUniformIndices"));
+ glGetActiveUniformsiv = reinterpret_cast<PFNGLGETACTIVEUNIFORMSIVPROC>(get_proc_address("glGetActiveUniformsiv"));
+ glGetActiveUniformName = reinterpret_cast<PFNGLGETACTIVEUNIFORMNAMEPROC>(get_proc_address("glGetActiveUniformName"));
+ glGetUniformBlockIndex = reinterpret_cast<PFNGLGETUNIFORMBLOCKINDEXPROC>(get_proc_address("glGetUniformBlockIndex"));
+ glGetActiveUniformBlockiv = reinterpret_cast<PFNGLGETACTIVEUNIFORMBLOCKIVPROC>(get_proc_address("glGetActiveUniformBlockiv"));
+ glGetActiveUniformBlockName = reinterpret_cast<PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC>(get_proc_address("glGetActiveUniformBlockName"));
+ glUniformBlockBinding = reinterpret_cast<PFNGLUNIFORMBLOCKBINDINGPROC>(get_proc_address("glUniformBlockBinding"));
+}
+
+} // namespace GL
+} // namespace Msp
--- /dev/null
+#ifndef MSP_GL_ARB_UNIFORM_BUFFER_OBJECT_
+#define MSP_GL_ARB_UNIFORM_BUFFER_OBJECT_
+
+#include "gl.h"
+#include <GL/glext.h>
+
+namespace Msp {
+namespace GL {
+
+extern PFNGLGETUNIFORMINDICESPROC glGetUniformIndices;
+extern PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv;
+extern PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName;
+extern PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex;
+extern PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv;
+extern PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName;
+extern PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding;
+
+void init_arb_uniform_buffer_object();
+
+} // namespace GL
+} // namespace Msp
+
+#endif
#include <msp/strings/format.h>
#include <msp/strings/utils.h>
#include "arb_shader_objects.h"
+#include "arb_uniform_buffer_object.h"
#include "arb_vertex_buffer_object.h"
#include "arb_vertex_program.h"
#include "arb_vertex_shader.h"
init_arb_vertex_buffer_object();
if(extensions.count("GL_NV_primitive_restart"))
init_nv_primitive_restart();
+ if(extensions.count("GL_ARB_uniform_buffer_object"))
+ init_arb_uniform_buffer_object();
init_done = true;
}