1 #include "arb_uniform_buffer_object.h"
6 PFNGLBINDBUFFERBASEPROC glBindBufferBase = 0;
7 PFNGLBINDBUFFERRANGEPROC glBindBufferRange = 0;
8 PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName = 0;
9 PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv = 0;
10 PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName = 0;
11 PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv = 0;
12 PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex = 0;
13 PFNGLGETUNIFORMINDICESPROC glGetUniformIndices = 0;
14 PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding = 0;
16 Extension::SupportLevel init_arb_uniform_buffer_object()
18 if(is_version_at_least(3, 0) || is_supported("GL_ARB_uniform_buffer_object"))
20 glBindBufferBase = reinterpret_cast<PFNGLBINDBUFFERBASEPROC>(get_proc_address("glBindBufferBase"));
21 glBindBufferRange = reinterpret_cast<PFNGLBINDBUFFERRANGEPROC>(get_proc_address("glBindBufferRange"));
22 glGetActiveUniformBlockName = reinterpret_cast<PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC>(get_proc_address("glGetActiveUniformBlockName"));
23 glGetActiveUniformBlockiv = reinterpret_cast<PFNGLGETACTIVEUNIFORMBLOCKIVPROC>(get_proc_address("glGetActiveUniformBlockiv"));
24 glGetActiveUniformName = reinterpret_cast<PFNGLGETACTIVEUNIFORMNAMEPROC>(get_proc_address("glGetActiveUniformName"));
25 glGetActiveUniformsiv = reinterpret_cast<PFNGLGETACTIVEUNIFORMSIVPROC>(get_proc_address("glGetActiveUniformsiv"));
26 glGetUniformBlockIndex = reinterpret_cast<PFNGLGETUNIFORMBLOCKINDEXPROC>(get_proc_address("glGetUniformBlockIndex"));
27 glGetUniformIndices = reinterpret_cast<PFNGLGETUNIFORMINDICESPROC>(get_proc_address("glGetUniformIndices"));
28 glUniformBlockBinding = reinterpret_cast<PFNGLUNIFORMBLOCKBINDINGPROC>(get_proc_address("glUniformBlockBinding"));
29 return Extension::CORE;
31 return Extension::UNSUPPORTED;
34 Extension ARB_uniform_buffer_object("GL_ARB_uniform_buffer_object", init_arb_uniform_buffer_object);