require "mspgui";
require "opengl";
+ generate "GLEX"
+ {
+ in_suffix ".glext";
+ out_suffix ".cpp";
+ out_suffix ".h";
+ command "scripts/extgen.py";
+ };
+
library "mspgl"
{
source "source";
+ source "extensions";
install true;
install_map
{
map "source" "include/msp/gl";
+ map "extensions" "include/msp/gl/extensions";
};
};
--- /dev/null
+extension ARB_draw_buffers
--- /dev/null
+extension ARB_fragment_shader
+core_version 2.0
--- /dev/null
+extension ARB_multitexture
--- /dev/null
+extension ARB_pixel_buffer_object
+core_version 2.1
--- /dev/null
+extension ARB_shader_objects
--- /dev/null
+extension ARB_texture_cube_map
+core_version 1.3
--- /dev/null
+extension ARB_texture_float
+core_version 3.0
--- /dev/null
+extension ARB_uniform_buffer_object
+core_version 3.0
--- /dev/null
+extension ARB_vertex_buffer_object
--- /dev/null
+extension ARB_vertex_shader
+secondary ARB_vertex_program
--- /dev/null
+extension EXT_bgra
+core_version 1.2
--- /dev/null
+extension EXT_blend_minmax
--- /dev/null
+extension EXT_blend_subtract
+core_version 1.2
--- /dev/null
+extension EXT_draw_range_elements
--- /dev/null
+extension EXT_framebuffer_blit
--- /dev/null
+extension EXT_framebuffer_multisample
--- /dev/null
+extension EXT_framebuffer_object
--- /dev/null
+extension EXT_texture3D
--- /dev/null
+extension EXT_texture_filter_anisotropic
--- /dev/null
+extension NV_primitive_restart
--- /dev/null
+extension SGIS_generate_mipmap
#!/usr/bin/python
import sys
+import os
if len(sys.argv)<2:
print """Usage:
sys.exit(0)
ext = sys.argv[1]
+out_base = None
+if ext.endswith(".glext"):
+ fn = ext
+ ext = None
+ ver = None
+ secondary = []
+ for line in open(fn):
+ parts = line.split()
+ if parts[0]=="extension":
+ ext = parts[1]
+ elif parts[0]=="core_version":
+ ver = parts[1]
+ elif parts[0]=="secondary":
+ secondary.append(parts[1])
+ if len(sys.argv)>=3:
+ out_base = os.path.splitext(sys.argv[2])[0]
+else:
+ secondary = sys.argv[2:]
+ ver = None
+ if secondary and secondary[0][0].isdigit():
+ ver = secondary.pop(0)
+
exttype = ext.split('_')[0]
-secondary = sys.argv[2:]
-ver = None
-if secondary and secondary[0][0].isdigit():
- ver = secondary.pop(0)
bp_ext = None
+if not out_base:
+ out_base = ext.lower()
+
class Function:
def __init__(self, name):
self.name = name
if ver:
ver = map(int, ver.split('.'))
-out = file(ext.lower()+".h", "w")
+out = file(out_base+".h", "w")
out.write("#ifndef MSP_GL_%s_\n"%ext.upper())
out.write("#define MSP_GL_%s_\n"%ext.upper())
out.write("""
-#include "extension.h"
-#include "gl.h"
+#include <msp/gl/extension.h>
+#include <msp/gl/gl.h>
#include <GL/glext.h>
namespace Msp {
#endif
""")
-out = file(ext.lower()+".cpp", "w")
+out = file(out_base+".cpp", "w")
out.write("#include \"%s.h\"\n"%ext.lower())
out.write("""
+++ /dev/null
-#include "arb_draw_buffers.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLDRAWBUFFERSPROC glDrawBuffers = 0;
-
-Extension::SupportLevel init_arb_draw_buffers()
-{
- if(is_version_at_least(2, 0))
- {
- glDrawBuffers = reinterpret_cast<PFNGLDRAWBUFFERSPROC>(get_proc_address("glDrawBuffers"));
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_draw_buffers"))
- {
- glDrawBuffers = reinterpret_cast<PFNGLDRAWBUFFERSPROC>(get_proc_address("glDrawBuffersARB"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_draw_buffers("GL_ARB_draw_buffers", init_arb_draw_buffers);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_DRAW_BUFFERS_
-#define MSP_GL_ARB_DRAW_BUFFERS_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLDRAWBUFFERSPROC glDrawBuffers;
-
-extern Extension ARB_draw_buffers;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_fragment_shader.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_arb_fragment_shader()
-{
- if(is_version_at_least(2, 0))
- {
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_fragment_shader"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_fragment_shader("GL_ARB_fragment_shader", init_arb_fragment_shader);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_FRAGMENT_SHADER_
-#define MSP_GL_ARB_FRAGMENT_SHADER_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension ARB_fragment_shader;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_multitexture.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLACTIVETEXTUREARBPROC glActiveTexture = 0;
-PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTexture = 0;
-PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1d = 0;
-PFNGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dv = 0;
-PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1f = 0;
-PFNGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fv = 0;
-PFNGLMULTITEXCOORD1IARBPROC glMultiTexCoord1i = 0;
-PFNGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1iv = 0;
-PFNGLMULTITEXCOORD1SARBPROC glMultiTexCoord1s = 0;
-PFNGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1sv = 0;
-PFNGLMULTITEXCOORD2DARBPROC glMultiTexCoord2d = 0;
-PFNGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dv = 0;
-PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2f = 0;
-PFNGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fv = 0;
-PFNGLMULTITEXCOORD2IARBPROC glMultiTexCoord2i = 0;
-PFNGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2iv = 0;
-PFNGLMULTITEXCOORD2SARBPROC glMultiTexCoord2s = 0;
-PFNGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2sv = 0;
-PFNGLMULTITEXCOORD3DARBPROC glMultiTexCoord3d = 0;
-PFNGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dv = 0;
-PFNGLMULTITEXCOORD3FARBPROC glMultiTexCoord3f = 0;
-PFNGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fv = 0;
-PFNGLMULTITEXCOORD3IARBPROC glMultiTexCoord3i = 0;
-PFNGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3iv = 0;
-PFNGLMULTITEXCOORD3SARBPROC glMultiTexCoord3s = 0;
-PFNGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3sv = 0;
-PFNGLMULTITEXCOORD4DARBPROC glMultiTexCoord4d = 0;
-PFNGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dv = 0;
-PFNGLMULTITEXCOORD4FARBPROC glMultiTexCoord4f = 0;
-PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fv = 0;
-PFNGLMULTITEXCOORD4IARBPROC glMultiTexCoord4i = 0;
-PFNGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4iv = 0;
-PFNGLMULTITEXCOORD4SARBPROC glMultiTexCoord4s = 0;
-PFNGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4sv = 0;
-
-Extension::SupportLevel init_arb_multitexture()
-{
- if(is_version_at_least(1, 3))
- {
- glActiveTexture = reinterpret_cast<PFNGLACTIVETEXTUREARBPROC>(get_proc_address("glActiveTexture"));
- glClientActiveTexture = reinterpret_cast<PFNGLCLIENTACTIVETEXTUREARBPROC>(get_proc_address("glClientActiveTexture"));
- glMultiTexCoord1d = reinterpret_cast<PFNGLMULTITEXCOORD1DARBPROC>(get_proc_address("glMultiTexCoord1d"));
- glMultiTexCoord1dv = reinterpret_cast<PFNGLMULTITEXCOORD1DVARBPROC>(get_proc_address("glMultiTexCoord1dv"));
- glMultiTexCoord1f = reinterpret_cast<PFNGLMULTITEXCOORD1FARBPROC>(get_proc_address("glMultiTexCoord1f"));
- glMultiTexCoord1fv = reinterpret_cast<PFNGLMULTITEXCOORD1FVARBPROC>(get_proc_address("glMultiTexCoord1fv"));
- glMultiTexCoord1i = reinterpret_cast<PFNGLMULTITEXCOORD1IARBPROC>(get_proc_address("glMultiTexCoord1i"));
- glMultiTexCoord1iv = reinterpret_cast<PFNGLMULTITEXCOORD1IVARBPROC>(get_proc_address("glMultiTexCoord1iv"));
- glMultiTexCoord1s = reinterpret_cast<PFNGLMULTITEXCOORD1SARBPROC>(get_proc_address("glMultiTexCoord1s"));
- glMultiTexCoord1sv = reinterpret_cast<PFNGLMULTITEXCOORD1SVARBPROC>(get_proc_address("glMultiTexCoord1sv"));
- glMultiTexCoord2d = reinterpret_cast<PFNGLMULTITEXCOORD2DARBPROC>(get_proc_address("glMultiTexCoord2d"));
- glMultiTexCoord2dv = reinterpret_cast<PFNGLMULTITEXCOORD2DVARBPROC>(get_proc_address("glMultiTexCoord2dv"));
- glMultiTexCoord2f = reinterpret_cast<PFNGLMULTITEXCOORD2FARBPROC>(get_proc_address("glMultiTexCoord2f"));
- glMultiTexCoord2fv = reinterpret_cast<PFNGLMULTITEXCOORD2FVARBPROC>(get_proc_address("glMultiTexCoord2fv"));
- glMultiTexCoord2i = reinterpret_cast<PFNGLMULTITEXCOORD2IARBPROC>(get_proc_address("glMultiTexCoord2i"));
- glMultiTexCoord2iv = reinterpret_cast<PFNGLMULTITEXCOORD2IVARBPROC>(get_proc_address("glMultiTexCoord2iv"));
- glMultiTexCoord2s = reinterpret_cast<PFNGLMULTITEXCOORD2SARBPROC>(get_proc_address("glMultiTexCoord2s"));
- glMultiTexCoord2sv = reinterpret_cast<PFNGLMULTITEXCOORD2SVARBPROC>(get_proc_address("glMultiTexCoord2sv"));
- glMultiTexCoord3d = reinterpret_cast<PFNGLMULTITEXCOORD3DARBPROC>(get_proc_address("glMultiTexCoord3d"));
- glMultiTexCoord3dv = reinterpret_cast<PFNGLMULTITEXCOORD3DVARBPROC>(get_proc_address("glMultiTexCoord3dv"));
- glMultiTexCoord3f = reinterpret_cast<PFNGLMULTITEXCOORD3FARBPROC>(get_proc_address("glMultiTexCoord3f"));
- glMultiTexCoord3fv = reinterpret_cast<PFNGLMULTITEXCOORD3FVARBPROC>(get_proc_address("glMultiTexCoord3fv"));
- glMultiTexCoord3i = reinterpret_cast<PFNGLMULTITEXCOORD3IARBPROC>(get_proc_address("glMultiTexCoord3i"));
- glMultiTexCoord3iv = reinterpret_cast<PFNGLMULTITEXCOORD3IVARBPROC>(get_proc_address("glMultiTexCoord3iv"));
- glMultiTexCoord3s = reinterpret_cast<PFNGLMULTITEXCOORD3SARBPROC>(get_proc_address("glMultiTexCoord3s"));
- glMultiTexCoord3sv = reinterpret_cast<PFNGLMULTITEXCOORD3SVARBPROC>(get_proc_address("glMultiTexCoord3sv"));
- glMultiTexCoord4d = reinterpret_cast<PFNGLMULTITEXCOORD4DARBPROC>(get_proc_address("glMultiTexCoord4d"));
- glMultiTexCoord4dv = reinterpret_cast<PFNGLMULTITEXCOORD4DVARBPROC>(get_proc_address("glMultiTexCoord4dv"));
- glMultiTexCoord4f = reinterpret_cast<PFNGLMULTITEXCOORD4FARBPROC>(get_proc_address("glMultiTexCoord4f"));
- glMultiTexCoord4fv = reinterpret_cast<PFNGLMULTITEXCOORD4FVARBPROC>(get_proc_address("glMultiTexCoord4fv"));
- glMultiTexCoord4i = reinterpret_cast<PFNGLMULTITEXCOORD4IARBPROC>(get_proc_address("glMultiTexCoord4i"));
- glMultiTexCoord4iv = reinterpret_cast<PFNGLMULTITEXCOORD4IVARBPROC>(get_proc_address("glMultiTexCoord4iv"));
- glMultiTexCoord4s = reinterpret_cast<PFNGLMULTITEXCOORD4SARBPROC>(get_proc_address("glMultiTexCoord4s"));
- glMultiTexCoord4sv = reinterpret_cast<PFNGLMULTITEXCOORD4SVARBPROC>(get_proc_address("glMultiTexCoord4sv"));
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_multitexture"))
- {
- glActiveTexture = reinterpret_cast<PFNGLACTIVETEXTUREARBPROC>(get_proc_address("glActiveTextureARB"));
- glClientActiveTexture = reinterpret_cast<PFNGLCLIENTACTIVETEXTUREARBPROC>(get_proc_address("glClientActiveTextureARB"));
- glMultiTexCoord1d = reinterpret_cast<PFNGLMULTITEXCOORD1DARBPROC>(get_proc_address("glMultiTexCoord1dARB"));
- glMultiTexCoord1dv = reinterpret_cast<PFNGLMULTITEXCOORD1DVARBPROC>(get_proc_address("glMultiTexCoord1dvARB"));
- glMultiTexCoord1f = reinterpret_cast<PFNGLMULTITEXCOORD1FARBPROC>(get_proc_address("glMultiTexCoord1fARB"));
- glMultiTexCoord1fv = reinterpret_cast<PFNGLMULTITEXCOORD1FVARBPROC>(get_proc_address("glMultiTexCoord1fvARB"));
- glMultiTexCoord1i = reinterpret_cast<PFNGLMULTITEXCOORD1IARBPROC>(get_proc_address("glMultiTexCoord1iARB"));
- glMultiTexCoord1iv = reinterpret_cast<PFNGLMULTITEXCOORD1IVARBPROC>(get_proc_address("glMultiTexCoord1ivARB"));
- glMultiTexCoord1s = reinterpret_cast<PFNGLMULTITEXCOORD1SARBPROC>(get_proc_address("glMultiTexCoord1sARB"));
- glMultiTexCoord1sv = reinterpret_cast<PFNGLMULTITEXCOORD1SVARBPROC>(get_proc_address("glMultiTexCoord1svARB"));
- glMultiTexCoord2d = reinterpret_cast<PFNGLMULTITEXCOORD2DARBPROC>(get_proc_address("glMultiTexCoord2dARB"));
- glMultiTexCoord2dv = reinterpret_cast<PFNGLMULTITEXCOORD2DVARBPROC>(get_proc_address("glMultiTexCoord2dvARB"));
- glMultiTexCoord2f = reinterpret_cast<PFNGLMULTITEXCOORD2FARBPROC>(get_proc_address("glMultiTexCoord2fARB"));
- glMultiTexCoord2fv = reinterpret_cast<PFNGLMULTITEXCOORD2FVARBPROC>(get_proc_address("glMultiTexCoord2fvARB"));
- glMultiTexCoord2i = reinterpret_cast<PFNGLMULTITEXCOORD2IARBPROC>(get_proc_address("glMultiTexCoord2iARB"));
- glMultiTexCoord2iv = reinterpret_cast<PFNGLMULTITEXCOORD2IVARBPROC>(get_proc_address("glMultiTexCoord2ivARB"));
- glMultiTexCoord2s = reinterpret_cast<PFNGLMULTITEXCOORD2SARBPROC>(get_proc_address("glMultiTexCoord2sARB"));
- glMultiTexCoord2sv = reinterpret_cast<PFNGLMULTITEXCOORD2SVARBPROC>(get_proc_address("glMultiTexCoord2svARB"));
- glMultiTexCoord3d = reinterpret_cast<PFNGLMULTITEXCOORD3DARBPROC>(get_proc_address("glMultiTexCoord3dARB"));
- glMultiTexCoord3dv = reinterpret_cast<PFNGLMULTITEXCOORD3DVARBPROC>(get_proc_address("glMultiTexCoord3dvARB"));
- glMultiTexCoord3f = reinterpret_cast<PFNGLMULTITEXCOORD3FARBPROC>(get_proc_address("glMultiTexCoord3fARB"));
- glMultiTexCoord3fv = reinterpret_cast<PFNGLMULTITEXCOORD3FVARBPROC>(get_proc_address("glMultiTexCoord3fvARB"));
- glMultiTexCoord3i = reinterpret_cast<PFNGLMULTITEXCOORD3IARBPROC>(get_proc_address("glMultiTexCoord3iARB"));
- glMultiTexCoord3iv = reinterpret_cast<PFNGLMULTITEXCOORD3IVARBPROC>(get_proc_address("glMultiTexCoord3ivARB"));
- glMultiTexCoord3s = reinterpret_cast<PFNGLMULTITEXCOORD3SARBPROC>(get_proc_address("glMultiTexCoord3sARB"));
- glMultiTexCoord3sv = reinterpret_cast<PFNGLMULTITEXCOORD3SVARBPROC>(get_proc_address("glMultiTexCoord3svARB"));
- glMultiTexCoord4d = reinterpret_cast<PFNGLMULTITEXCOORD4DARBPROC>(get_proc_address("glMultiTexCoord4dARB"));
- glMultiTexCoord4dv = reinterpret_cast<PFNGLMULTITEXCOORD4DVARBPROC>(get_proc_address("glMultiTexCoord4dvARB"));
- glMultiTexCoord4f = reinterpret_cast<PFNGLMULTITEXCOORD4FARBPROC>(get_proc_address("glMultiTexCoord4fARB"));
- glMultiTexCoord4fv = reinterpret_cast<PFNGLMULTITEXCOORD4FVARBPROC>(get_proc_address("glMultiTexCoord4fvARB"));
- glMultiTexCoord4i = reinterpret_cast<PFNGLMULTITEXCOORD4IARBPROC>(get_proc_address("glMultiTexCoord4iARB"));
- glMultiTexCoord4iv = reinterpret_cast<PFNGLMULTITEXCOORD4IVARBPROC>(get_proc_address("glMultiTexCoord4ivARB"));
- glMultiTexCoord4s = reinterpret_cast<PFNGLMULTITEXCOORD4SARBPROC>(get_proc_address("glMultiTexCoord4sARB"));
- glMultiTexCoord4sv = reinterpret_cast<PFNGLMULTITEXCOORD4SVARBPROC>(get_proc_address("glMultiTexCoord4svARB"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_multitexture("GL_ARB_multitexture", init_arb_multitexture);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_MULTITEXTURE_
-#define MSP_GL_ARB_MULTITEXTURE_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLACTIVETEXTUREARBPROC glActiveTexture;
-extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTexture;
-extern PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1d;
-extern PFNGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dv;
-extern PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1f;
-extern PFNGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fv;
-extern PFNGLMULTITEXCOORD1IARBPROC glMultiTexCoord1i;
-extern PFNGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1iv;
-extern PFNGLMULTITEXCOORD1SARBPROC glMultiTexCoord1s;
-extern PFNGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1sv;
-extern PFNGLMULTITEXCOORD2DARBPROC glMultiTexCoord2d;
-extern PFNGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dv;
-extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2f;
-extern PFNGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fv;
-extern PFNGLMULTITEXCOORD2IARBPROC glMultiTexCoord2i;
-extern PFNGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2iv;
-extern PFNGLMULTITEXCOORD2SARBPROC glMultiTexCoord2s;
-extern PFNGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2sv;
-extern PFNGLMULTITEXCOORD3DARBPROC glMultiTexCoord3d;
-extern PFNGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dv;
-extern PFNGLMULTITEXCOORD3FARBPROC glMultiTexCoord3f;
-extern PFNGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fv;
-extern PFNGLMULTITEXCOORD3IARBPROC glMultiTexCoord3i;
-extern PFNGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3iv;
-extern PFNGLMULTITEXCOORD3SARBPROC glMultiTexCoord3s;
-extern PFNGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3sv;
-extern PFNGLMULTITEXCOORD4DARBPROC glMultiTexCoord4d;
-extern PFNGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dv;
-extern PFNGLMULTITEXCOORD4FARBPROC glMultiTexCoord4f;
-extern PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fv;
-extern PFNGLMULTITEXCOORD4IARBPROC glMultiTexCoord4i;
-extern PFNGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4iv;
-extern PFNGLMULTITEXCOORD4SARBPROC glMultiTexCoord4s;
-extern PFNGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4sv;
-
-extern Extension ARB_multitexture;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_pixel_buffer_object.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_arb_pixel_buffer_object()
-{
- if(is_version_at_least(2, 1))
- {
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_pixel_buffer_object"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_pixel_buffer_object("GL_ARB_pixel_buffer_object", init_arb_pixel_buffer_object);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_PIXEL_BUFFER_OBJECT_
-#define MSP_GL_ARB_PIXEL_BUFFER_OBJECT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension ARB_pixel_buffer_object;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_shader_objects.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLATTACHOBJECTARBPROC glAttachShader = 0;
-PFNGLCOMPILESHADERARBPROC glCompileShader = 0;
-PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgram = 0;
-PFNGLCREATESHADEROBJECTARBPROC glCreateShader = 0;
-PFNGLDELETEOBJECTARBPROC glDeleteProgram = 0;
-PFNGLDELETEOBJECTARBPROC glDeleteShader = 0;
-PFNGLDETACHOBJECTARBPROC glDetachShader = 0;
-PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniform = 0;
-PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedShaders = 0;
-PFNGLGETINFOLOGARBPROC glGetProgramInfoLog = 0;
-PFNGLGETOBJECTPARAMETERIVARBPROC glGetProgramiv = 0;
-PFNGLGETINFOLOGARBPROC glGetShaderInfoLog = 0;
-PFNGLGETSHADERSOURCEARBPROC glGetShaderSource = 0;
-PFNGLGETOBJECTPARAMETERIVARBPROC glGetShaderiv = 0;
-PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation = 0;
-PFNGLGETUNIFORMFVARBPROC glGetUniformfv = 0;
-PFNGLGETUNIFORMIVARBPROC glGetUniformiv = 0;
-PFNGLLINKPROGRAMARBPROC glLinkProgram = 0;
-PFNGLSHADERSOURCEARBPROC glShaderSource = 0;
-PFNGLUNIFORM1FARBPROC glUniform1f = 0;
-PFNGLUNIFORM1FVARBPROC glUniform1fv = 0;
-PFNGLUNIFORM1IARBPROC glUniform1i = 0;
-PFNGLUNIFORM1IVARBPROC glUniform1iv = 0;
-PFNGLUNIFORM2FARBPROC glUniform2f = 0;
-PFNGLUNIFORM2FVARBPROC glUniform2fv = 0;
-PFNGLUNIFORM2IARBPROC glUniform2i = 0;
-PFNGLUNIFORM2IVARBPROC glUniform2iv = 0;
-PFNGLUNIFORM3FARBPROC glUniform3f = 0;
-PFNGLUNIFORM3FVARBPROC glUniform3fv = 0;
-PFNGLUNIFORM3IARBPROC glUniform3i = 0;
-PFNGLUNIFORM3IVARBPROC glUniform3iv = 0;
-PFNGLUNIFORM4FARBPROC glUniform4f = 0;
-PFNGLUNIFORM4FVARBPROC glUniform4fv = 0;
-PFNGLUNIFORM4IARBPROC glUniform4i = 0;
-PFNGLUNIFORM4IVARBPROC glUniform4iv = 0;
-PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fv = 0;
-PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fv = 0;
-PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fv = 0;
-PFNGLUSEPROGRAMOBJECTARBPROC glUseProgram = 0;
-PFNGLVALIDATEPROGRAMARBPROC glValidateProgram = 0;
-
-Extension::SupportLevel init_arb_shader_objects()
-{
- if(is_version_at_least(2, 0))
- {
- glAttachShader = reinterpret_cast<PFNGLATTACHOBJECTARBPROC>(get_proc_address("glAttachShader"));
- glCompileShader = reinterpret_cast<PFNGLCOMPILESHADERARBPROC>(get_proc_address("glCompileShader"));
- glCreateProgram = reinterpret_cast<PFNGLCREATEPROGRAMOBJECTARBPROC>(get_proc_address("glCreateProgram"));
- glCreateShader = reinterpret_cast<PFNGLCREATESHADEROBJECTARBPROC>(get_proc_address("glCreateShader"));
- glDeleteProgram = reinterpret_cast<PFNGLDELETEOBJECTARBPROC>(get_proc_address("glDeleteProgram"));
- glDeleteShader = reinterpret_cast<PFNGLDELETEOBJECTARBPROC>(get_proc_address("glDeleteShader"));
- glDetachShader = reinterpret_cast<PFNGLDETACHOBJECTARBPROC>(get_proc_address("glDetachShader"));
- glGetActiveUniform = reinterpret_cast<PFNGLGETACTIVEUNIFORMARBPROC>(get_proc_address("glGetActiveUniform"));
- glGetAttachedShaders = reinterpret_cast<PFNGLGETATTACHEDOBJECTSARBPROC>(get_proc_address("glGetAttachedShaders"));
- glGetProgramInfoLog = reinterpret_cast<PFNGLGETINFOLOGARBPROC>(get_proc_address("glGetProgramInfoLog"));
- glGetProgramiv = reinterpret_cast<PFNGLGETOBJECTPARAMETERIVARBPROC>(get_proc_address("glGetProgramiv"));
- glGetShaderInfoLog = reinterpret_cast<PFNGLGETINFOLOGARBPROC>(get_proc_address("glGetShaderInfoLog"));
- glGetShaderSource = reinterpret_cast<PFNGLGETSHADERSOURCEARBPROC>(get_proc_address("glGetShaderSource"));
- glGetShaderiv = reinterpret_cast<PFNGLGETOBJECTPARAMETERIVARBPROC>(get_proc_address("glGetShaderiv"));
- glGetUniformLocation = reinterpret_cast<PFNGLGETUNIFORMLOCATIONARBPROC>(get_proc_address("glGetUniformLocation"));
- glGetUniformfv = reinterpret_cast<PFNGLGETUNIFORMFVARBPROC>(get_proc_address("glGetUniformfv"));
- glGetUniformiv = reinterpret_cast<PFNGLGETUNIFORMIVARBPROC>(get_proc_address("glGetUniformiv"));
- glLinkProgram = reinterpret_cast<PFNGLLINKPROGRAMARBPROC>(get_proc_address("glLinkProgram"));
- glShaderSource = reinterpret_cast<PFNGLSHADERSOURCEARBPROC>(get_proc_address("glShaderSource"));
- glUniform1f = reinterpret_cast<PFNGLUNIFORM1FARBPROC>(get_proc_address("glUniform1f"));
- glUniform1fv = reinterpret_cast<PFNGLUNIFORM1FVARBPROC>(get_proc_address("glUniform1fv"));
- glUniform1i = reinterpret_cast<PFNGLUNIFORM1IARBPROC>(get_proc_address("glUniform1i"));
- glUniform1iv = reinterpret_cast<PFNGLUNIFORM1IVARBPROC>(get_proc_address("glUniform1iv"));
- glUniform2f = reinterpret_cast<PFNGLUNIFORM2FARBPROC>(get_proc_address("glUniform2f"));
- glUniform2fv = reinterpret_cast<PFNGLUNIFORM2FVARBPROC>(get_proc_address("glUniform2fv"));
- glUniform2i = reinterpret_cast<PFNGLUNIFORM2IARBPROC>(get_proc_address("glUniform2i"));
- glUniform2iv = reinterpret_cast<PFNGLUNIFORM2IVARBPROC>(get_proc_address("glUniform2iv"));
- glUniform3f = reinterpret_cast<PFNGLUNIFORM3FARBPROC>(get_proc_address("glUniform3f"));
- glUniform3fv = reinterpret_cast<PFNGLUNIFORM3FVARBPROC>(get_proc_address("glUniform3fv"));
- glUniform3i = reinterpret_cast<PFNGLUNIFORM3IARBPROC>(get_proc_address("glUniform3i"));
- glUniform3iv = reinterpret_cast<PFNGLUNIFORM3IVARBPROC>(get_proc_address("glUniform3iv"));
- glUniform4f = reinterpret_cast<PFNGLUNIFORM4FARBPROC>(get_proc_address("glUniform4f"));
- glUniform4fv = reinterpret_cast<PFNGLUNIFORM4FVARBPROC>(get_proc_address("glUniform4fv"));
- glUniform4i = reinterpret_cast<PFNGLUNIFORM4IARBPROC>(get_proc_address("glUniform4i"));
- glUniform4iv = reinterpret_cast<PFNGLUNIFORM4IVARBPROC>(get_proc_address("glUniform4iv"));
- glUniformMatrix2fv = reinterpret_cast<PFNGLUNIFORMMATRIX2FVARBPROC>(get_proc_address("glUniformMatrix2fv"));
- glUniformMatrix3fv = reinterpret_cast<PFNGLUNIFORMMATRIX3FVARBPROC>(get_proc_address("glUniformMatrix3fv"));
- glUniformMatrix4fv = reinterpret_cast<PFNGLUNIFORMMATRIX4FVARBPROC>(get_proc_address("glUniformMatrix4fv"));
- glUseProgram = reinterpret_cast<PFNGLUSEPROGRAMOBJECTARBPROC>(get_proc_address("glUseProgram"));
- glValidateProgram = reinterpret_cast<PFNGLVALIDATEPROGRAMARBPROC>(get_proc_address("glValidateProgram"));
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_shader_objects"))
- {
- glAttachShader = reinterpret_cast<PFNGLATTACHOBJECTARBPROC>(get_proc_address("glAttachObjectARB"));
- glCompileShader = reinterpret_cast<PFNGLCOMPILESHADERARBPROC>(get_proc_address("glCompileShaderARB"));
- glCreateProgram = reinterpret_cast<PFNGLCREATEPROGRAMOBJECTARBPROC>(get_proc_address("glCreateProgramObjectARB"));
- glCreateShader = reinterpret_cast<PFNGLCREATESHADEROBJECTARBPROC>(get_proc_address("glCreateShaderObjectARB"));
- glDeleteProgram = reinterpret_cast<PFNGLDELETEOBJECTARBPROC>(get_proc_address("glDeleteObjectARB"));
- glDeleteShader = reinterpret_cast<PFNGLDELETEOBJECTARBPROC>(get_proc_address("glDeleteObjectARB"));
- glDetachShader = reinterpret_cast<PFNGLDETACHOBJECTARBPROC>(get_proc_address("glDetachObjectARB"));
- glGetActiveUniform = reinterpret_cast<PFNGLGETACTIVEUNIFORMARBPROC>(get_proc_address("glGetActiveUniformARB"));
- glGetAttachedShaders = reinterpret_cast<PFNGLGETATTACHEDOBJECTSARBPROC>(get_proc_address("glGetAttachedObjectsARB"));
- glGetProgramInfoLog = reinterpret_cast<PFNGLGETINFOLOGARBPROC>(get_proc_address("glGetInfoLogARB"));
- glGetProgramiv = reinterpret_cast<PFNGLGETOBJECTPARAMETERIVARBPROC>(get_proc_address("glGetObjectParameterivARB"));
- glGetShaderInfoLog = reinterpret_cast<PFNGLGETINFOLOGARBPROC>(get_proc_address("glGetInfoLogARB"));
- glGetShaderSource = reinterpret_cast<PFNGLGETSHADERSOURCEARBPROC>(get_proc_address("glGetShaderSourceARB"));
- glGetShaderiv = reinterpret_cast<PFNGLGETOBJECTPARAMETERIVARBPROC>(get_proc_address("glGetObjectParameterivARB"));
- glGetUniformLocation = reinterpret_cast<PFNGLGETUNIFORMLOCATIONARBPROC>(get_proc_address("glGetUniformLocationARB"));
- glGetUniformfv = reinterpret_cast<PFNGLGETUNIFORMFVARBPROC>(get_proc_address("glGetUniformfvARB"));
- glGetUniformiv = reinterpret_cast<PFNGLGETUNIFORMIVARBPROC>(get_proc_address("glGetUniformivARB"));
- glLinkProgram = reinterpret_cast<PFNGLLINKPROGRAMARBPROC>(get_proc_address("glLinkProgramARB"));
- glShaderSource = reinterpret_cast<PFNGLSHADERSOURCEARBPROC>(get_proc_address("glShaderSourceARB"));
- glUniform1f = reinterpret_cast<PFNGLUNIFORM1FARBPROC>(get_proc_address("glUniform1fARB"));
- glUniform1fv = reinterpret_cast<PFNGLUNIFORM1FVARBPROC>(get_proc_address("glUniform1fvARB"));
- glUniform1i = reinterpret_cast<PFNGLUNIFORM1IARBPROC>(get_proc_address("glUniform1iARB"));
- glUniform1iv = reinterpret_cast<PFNGLUNIFORM1IVARBPROC>(get_proc_address("glUniform1ivARB"));
- glUniform2f = reinterpret_cast<PFNGLUNIFORM2FARBPROC>(get_proc_address("glUniform2fARB"));
- glUniform2fv = reinterpret_cast<PFNGLUNIFORM2FVARBPROC>(get_proc_address("glUniform2fvARB"));
- glUniform2i = reinterpret_cast<PFNGLUNIFORM2IARBPROC>(get_proc_address("glUniform2iARB"));
- glUniform2iv = reinterpret_cast<PFNGLUNIFORM2IVARBPROC>(get_proc_address("glUniform2ivARB"));
- glUniform3f = reinterpret_cast<PFNGLUNIFORM3FARBPROC>(get_proc_address("glUniform3fARB"));
- glUniform3fv = reinterpret_cast<PFNGLUNIFORM3FVARBPROC>(get_proc_address("glUniform3fvARB"));
- glUniform3i = reinterpret_cast<PFNGLUNIFORM3IARBPROC>(get_proc_address("glUniform3iARB"));
- glUniform3iv = reinterpret_cast<PFNGLUNIFORM3IVARBPROC>(get_proc_address("glUniform3ivARB"));
- glUniform4f = reinterpret_cast<PFNGLUNIFORM4FARBPROC>(get_proc_address("glUniform4fARB"));
- glUniform4fv = reinterpret_cast<PFNGLUNIFORM4FVARBPROC>(get_proc_address("glUniform4fvARB"));
- glUniform4i = reinterpret_cast<PFNGLUNIFORM4IARBPROC>(get_proc_address("glUniform4iARB"));
- glUniform4iv = reinterpret_cast<PFNGLUNIFORM4IVARBPROC>(get_proc_address("glUniform4ivARB"));
- glUniformMatrix2fv = reinterpret_cast<PFNGLUNIFORMMATRIX2FVARBPROC>(get_proc_address("glUniformMatrix2fvARB"));
- glUniformMatrix3fv = reinterpret_cast<PFNGLUNIFORMMATRIX3FVARBPROC>(get_proc_address("glUniformMatrix3fvARB"));
- glUniformMatrix4fv = reinterpret_cast<PFNGLUNIFORMMATRIX4FVARBPROC>(get_proc_address("glUniformMatrix4fvARB"));
- glUseProgram = reinterpret_cast<PFNGLUSEPROGRAMOBJECTARBPROC>(get_proc_address("glUseProgramObjectARB"));
- glValidateProgram = reinterpret_cast<PFNGLVALIDATEPROGRAMARBPROC>(get_proc_address("glValidateProgramARB"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_shader_objects("GL_ARB_shader_objects", init_arb_shader_objects);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_SHADER_OBJECTS_
-#define MSP_GL_ARB_SHADER_OBJECTS_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLATTACHOBJECTARBPROC glAttachShader;
-extern PFNGLCOMPILESHADERARBPROC glCompileShader;
-extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgram;
-extern PFNGLCREATESHADEROBJECTARBPROC glCreateShader;
-extern PFNGLDELETEOBJECTARBPROC glDeleteProgram;
-extern PFNGLDELETEOBJECTARBPROC glDeleteShader;
-extern PFNGLDETACHOBJECTARBPROC glDetachShader;
-extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniform;
-extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedShaders;
-extern PFNGLGETINFOLOGARBPROC glGetProgramInfoLog;
-extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetProgramiv;
-extern PFNGLGETINFOLOGARBPROC glGetShaderInfoLog;
-extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSource;
-extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetShaderiv;
-extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
-extern PFNGLGETUNIFORMFVARBPROC glGetUniformfv;
-extern PFNGLGETUNIFORMIVARBPROC glGetUniformiv;
-extern PFNGLLINKPROGRAMARBPROC glLinkProgram;
-extern PFNGLSHADERSOURCEARBPROC glShaderSource;
-extern PFNGLUNIFORM1FARBPROC glUniform1f;
-extern PFNGLUNIFORM1FVARBPROC glUniform1fv;
-extern PFNGLUNIFORM1IARBPROC glUniform1i;
-extern PFNGLUNIFORM1IVARBPROC glUniform1iv;
-extern PFNGLUNIFORM2FARBPROC glUniform2f;
-extern PFNGLUNIFORM2FVARBPROC glUniform2fv;
-extern PFNGLUNIFORM2IARBPROC glUniform2i;
-extern PFNGLUNIFORM2IVARBPROC glUniform2iv;
-extern PFNGLUNIFORM3FARBPROC glUniform3f;
-extern PFNGLUNIFORM3FVARBPROC glUniform3fv;
-extern PFNGLUNIFORM3IARBPROC glUniform3i;
-extern PFNGLUNIFORM3IVARBPROC glUniform3iv;
-extern PFNGLUNIFORM4FARBPROC glUniform4f;
-extern PFNGLUNIFORM4FVARBPROC glUniform4fv;
-extern PFNGLUNIFORM4IARBPROC glUniform4i;
-extern PFNGLUNIFORM4IVARBPROC glUniform4iv;
-extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fv;
-extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fv;
-extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fv;
-extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgram;
-extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgram;
-
-extern Extension ARB_shader_objects;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_texture_cube_map.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_arb_texture_cube_map()
-{
- if(is_version_at_least(1, 3))
- {
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_texture_cube_map"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_texture_cube_map("GL_ARB_texture_cube_map", init_arb_texture_cube_map);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_TEXTURE_CUBE_MAP_
-#define MSP_GL_ARB_TEXTURE_CUBE_MAP_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension ARB_texture_cube_map;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_texture_float.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_arb_texture_float()
-{
- if(is_version_at_least(3, 0))
- {
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_texture_float"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_texture_float("GL_ARB_texture_float", init_arb_texture_float);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_TEXTURE_FLOAT_
-#define MSP_GL_ARB_TEXTURE_FLOAT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension ARB_texture_float;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_uniform_buffer_object.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLBINDBUFFERBASEPROC glBindBufferBase = 0;
-PFNGLBINDBUFFERRANGEPROC glBindBufferRange = 0;
-PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName = 0;
-PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv = 0;
-PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName = 0;
-PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv = 0;
-PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex = 0;
-PFNGLGETUNIFORMINDICESPROC glGetUniformIndices = 0;
-PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding = 0;
-
-Extension::SupportLevel init_arb_uniform_buffer_object()
-{
- if(is_version_at_least(3, 0) || is_supported("GL_ARB_uniform_buffer_object"))
- {
- glBindBufferBase = reinterpret_cast<PFNGLBINDBUFFERBASEPROC>(get_proc_address("glBindBufferBase"));
- glBindBufferRange = reinterpret_cast<PFNGLBINDBUFFERRANGEPROC>(get_proc_address("glBindBufferRange"));
- glGetActiveUniformBlockName = reinterpret_cast<PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC>(get_proc_address("glGetActiveUniformBlockName"));
- glGetActiveUniformBlockiv = reinterpret_cast<PFNGLGETACTIVEUNIFORMBLOCKIVPROC>(get_proc_address("glGetActiveUniformBlockiv"));
- glGetActiveUniformName = reinterpret_cast<PFNGLGETACTIVEUNIFORMNAMEPROC>(get_proc_address("glGetActiveUniformName"));
- glGetActiveUniformsiv = reinterpret_cast<PFNGLGETACTIVEUNIFORMSIVPROC>(get_proc_address("glGetActiveUniformsiv"));
- glGetUniformBlockIndex = reinterpret_cast<PFNGLGETUNIFORMBLOCKINDEXPROC>(get_proc_address("glGetUniformBlockIndex"));
- glGetUniformIndices = reinterpret_cast<PFNGLGETUNIFORMINDICESPROC>(get_proc_address("glGetUniformIndices"));
- glUniformBlockBinding = reinterpret_cast<PFNGLUNIFORMBLOCKBINDINGPROC>(get_proc_address("glUniformBlockBinding"));
- return Extension::CORE;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_uniform_buffer_object("GL_ARB_uniform_buffer_object", init_arb_uniform_buffer_object);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_UNIFORM_BUFFER_OBJECT_
-#define MSP_GL_ARB_UNIFORM_BUFFER_OBJECT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLBINDBUFFERBASEPROC glBindBufferBase;
-extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
-extern PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName;
-extern PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv;
-extern PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName;
-extern PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv;
-extern PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex;
-extern PFNGLGETUNIFORMINDICESPROC glGetUniformIndices;
-extern PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding;
-
-extern Extension ARB_uniform_buffer_object;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_vertex_buffer_object.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLBINDBUFFERARBPROC glBindBuffer = 0;
-PFNGLBUFFERDATAARBPROC glBufferData = 0;
-PFNGLBUFFERSUBDATAARBPROC glBufferSubData = 0;
-PFNGLDELETEBUFFERSARBPROC glDeleteBuffers = 0;
-PFNGLGENBUFFERSARBPROC glGenBuffers = 0;
-PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameteriv = 0;
-PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointerv = 0;
-PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubData = 0;
-PFNGLISBUFFERARBPROC glIsBuffer = 0;
-PFNGLMAPBUFFERARBPROC glMapBuffer = 0;
-PFNGLUNMAPBUFFERARBPROC glUnmapBuffer = 0;
-
-Extension::SupportLevel init_arb_vertex_buffer_object()
-{
- if(is_version_at_least(1, 5))
- {
- glBindBuffer = reinterpret_cast<PFNGLBINDBUFFERARBPROC>(get_proc_address("glBindBuffer"));
- glBufferData = reinterpret_cast<PFNGLBUFFERDATAARBPROC>(get_proc_address("glBufferData"));
- glBufferSubData = reinterpret_cast<PFNGLBUFFERSUBDATAARBPROC>(get_proc_address("glBufferSubData"));
- glDeleteBuffers = reinterpret_cast<PFNGLDELETEBUFFERSARBPROC>(get_proc_address("glDeleteBuffers"));
- glGenBuffers = reinterpret_cast<PFNGLGENBUFFERSARBPROC>(get_proc_address("glGenBuffers"));
- glGetBufferParameteriv = reinterpret_cast<PFNGLGETBUFFERPARAMETERIVARBPROC>(get_proc_address("glGetBufferParameteriv"));
- glGetBufferPointerv = reinterpret_cast<PFNGLGETBUFFERPOINTERVARBPROC>(get_proc_address("glGetBufferPointerv"));
- glGetBufferSubData = reinterpret_cast<PFNGLGETBUFFERSUBDATAARBPROC>(get_proc_address("glGetBufferSubData"));
- glIsBuffer = reinterpret_cast<PFNGLISBUFFERARBPROC>(get_proc_address("glIsBuffer"));
- glMapBuffer = reinterpret_cast<PFNGLMAPBUFFERARBPROC>(get_proc_address("glMapBuffer"));
- glUnmapBuffer = reinterpret_cast<PFNGLUNMAPBUFFERARBPROC>(get_proc_address("glUnmapBuffer"));
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_vertex_buffer_object"))
- {
- glBindBuffer = reinterpret_cast<PFNGLBINDBUFFERARBPROC>(get_proc_address("glBindBufferARB"));
- glBufferData = reinterpret_cast<PFNGLBUFFERDATAARBPROC>(get_proc_address("glBufferDataARB"));
- glBufferSubData = reinterpret_cast<PFNGLBUFFERSUBDATAARBPROC>(get_proc_address("glBufferSubDataARB"));
- glDeleteBuffers = reinterpret_cast<PFNGLDELETEBUFFERSARBPROC>(get_proc_address("glDeleteBuffersARB"));
- glGenBuffers = reinterpret_cast<PFNGLGENBUFFERSARBPROC>(get_proc_address("glGenBuffersARB"));
- glGetBufferParameteriv = reinterpret_cast<PFNGLGETBUFFERPARAMETERIVARBPROC>(get_proc_address("glGetBufferParameterivARB"));
- glGetBufferPointerv = reinterpret_cast<PFNGLGETBUFFERPOINTERVARBPROC>(get_proc_address("glGetBufferPointervARB"));
- glGetBufferSubData = reinterpret_cast<PFNGLGETBUFFERSUBDATAARBPROC>(get_proc_address("glGetBufferSubDataARB"));
- glIsBuffer = reinterpret_cast<PFNGLISBUFFERARBPROC>(get_proc_address("glIsBufferARB"));
- glMapBuffer = reinterpret_cast<PFNGLMAPBUFFERARBPROC>(get_proc_address("glMapBufferARB"));
- glUnmapBuffer = reinterpret_cast<PFNGLUNMAPBUFFERARBPROC>(get_proc_address("glUnmapBufferARB"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_vertex_buffer_object("GL_ARB_vertex_buffer_object", init_arb_vertex_buffer_object);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_VERTEX_BUFFER_OBJECT_
-#define MSP_GL_ARB_VERTEX_BUFFER_OBJECT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLBINDBUFFERARBPROC glBindBuffer;
-extern PFNGLBUFFERDATAARBPROC glBufferData;
-extern PFNGLBUFFERSUBDATAARBPROC glBufferSubData;
-extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffers;
-extern PFNGLGENBUFFERSARBPROC glGenBuffers;
-extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameteriv;
-extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointerv;
-extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubData;
-extern PFNGLISBUFFERARBPROC glIsBuffer;
-extern PFNGLMAPBUFFERARBPROC glMapBuffer;
-extern PFNGLUNMAPBUFFERARBPROC glUnmapBuffer;
-
-extern Extension ARB_vertex_buffer_object;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "arb_vertex_shader.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocation = 0;
-PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArray = 0;
-PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArray = 0;
-PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttrib = 0;
-PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocation = 0;
-PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointerv = 0;
-PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdv = 0;
-PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfv = 0;
-PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribiv = 0;
-PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1d = 0;
-PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dv = 0;
-PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1f = 0;
-PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fv = 0;
-PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1s = 0;
-PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1sv = 0;
-PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2d = 0;
-PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dv = 0;
-PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2f = 0;
-PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fv = 0;
-PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2s = 0;
-PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2sv = 0;
-PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3d = 0;
-PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dv = 0;
-PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3f = 0;
-PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fv = 0;
-PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3s = 0;
-PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3sv = 0;
-PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4Nbv = 0;
-PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4Niv = 0;
-PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4Nsv = 0;
-PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4Nub = 0;
-PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4Nubv = 0;
-PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4Nuiv = 0;
-PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4Nusv = 0;
-PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bv = 0;
-PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4d = 0;
-PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dv = 0;
-PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4f = 0;
-PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fv = 0;
-PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4iv = 0;
-PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4s = 0;
-PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4sv = 0;
-PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubv = 0;
-PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uiv = 0;
-PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usv = 0;
-PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointer = 0;
-
-Extension::SupportLevel init_arb_vertex_shader()
-{
- if(is_version_at_least(2, 0))
- {
- glBindAttribLocation = reinterpret_cast<PFNGLBINDATTRIBLOCATIONARBPROC>(get_proc_address("glBindAttribLocation"));
- glDisableVertexAttribArray = reinterpret_cast<PFNGLDISABLEVERTEXATTRIBARRAYARBPROC>(get_proc_address("glDisableVertexAttribArray"));
- glEnableVertexAttribArray = reinterpret_cast<PFNGLENABLEVERTEXATTRIBARRAYARBPROC>(get_proc_address("glEnableVertexAttribArray"));
- glGetActiveAttrib = reinterpret_cast<PFNGLGETACTIVEATTRIBARBPROC>(get_proc_address("glGetActiveAttrib"));
- glGetAttribLocation = reinterpret_cast<PFNGLGETATTRIBLOCATIONARBPROC>(get_proc_address("glGetAttribLocation"));
- glGetVertexAttribPointerv = reinterpret_cast<PFNGLGETVERTEXATTRIBPOINTERVARBPROC>(get_proc_address("glGetVertexAttribPointerv"));
- glGetVertexAttribdv = reinterpret_cast<PFNGLGETVERTEXATTRIBDVARBPROC>(get_proc_address("glGetVertexAttribdv"));
- glGetVertexAttribfv = reinterpret_cast<PFNGLGETVERTEXATTRIBFVARBPROC>(get_proc_address("glGetVertexAttribfv"));
- glGetVertexAttribiv = reinterpret_cast<PFNGLGETVERTEXATTRIBIVARBPROC>(get_proc_address("glGetVertexAttribiv"));
- glVertexAttrib1d = reinterpret_cast<PFNGLVERTEXATTRIB1DARBPROC>(get_proc_address("glVertexAttrib1d"));
- glVertexAttrib1dv = reinterpret_cast<PFNGLVERTEXATTRIB1DVARBPROC>(get_proc_address("glVertexAttrib1dv"));
- glVertexAttrib1f = reinterpret_cast<PFNGLVERTEXATTRIB1FARBPROC>(get_proc_address("glVertexAttrib1f"));
- glVertexAttrib1fv = reinterpret_cast<PFNGLVERTEXATTRIB1FVARBPROC>(get_proc_address("glVertexAttrib1fv"));
- glVertexAttrib1s = reinterpret_cast<PFNGLVERTEXATTRIB1SARBPROC>(get_proc_address("glVertexAttrib1s"));
- glVertexAttrib1sv = reinterpret_cast<PFNGLVERTEXATTRIB1SVARBPROC>(get_proc_address("glVertexAttrib1sv"));
- glVertexAttrib2d = reinterpret_cast<PFNGLVERTEXATTRIB2DARBPROC>(get_proc_address("glVertexAttrib2d"));
- glVertexAttrib2dv = reinterpret_cast<PFNGLVERTEXATTRIB2DVARBPROC>(get_proc_address("glVertexAttrib2dv"));
- glVertexAttrib2f = reinterpret_cast<PFNGLVERTEXATTRIB2FARBPROC>(get_proc_address("glVertexAttrib2f"));
- glVertexAttrib2fv = reinterpret_cast<PFNGLVERTEXATTRIB2FVARBPROC>(get_proc_address("glVertexAttrib2fv"));
- glVertexAttrib2s = reinterpret_cast<PFNGLVERTEXATTRIB2SARBPROC>(get_proc_address("glVertexAttrib2s"));
- glVertexAttrib2sv = reinterpret_cast<PFNGLVERTEXATTRIB2SVARBPROC>(get_proc_address("glVertexAttrib2sv"));
- glVertexAttrib3d = reinterpret_cast<PFNGLVERTEXATTRIB3DARBPROC>(get_proc_address("glVertexAttrib3d"));
- glVertexAttrib3dv = reinterpret_cast<PFNGLVERTEXATTRIB3DVARBPROC>(get_proc_address("glVertexAttrib3dv"));
- glVertexAttrib3f = reinterpret_cast<PFNGLVERTEXATTRIB3FARBPROC>(get_proc_address("glVertexAttrib3f"));
- glVertexAttrib3fv = reinterpret_cast<PFNGLVERTEXATTRIB3FVARBPROC>(get_proc_address("glVertexAttrib3fv"));
- glVertexAttrib3s = reinterpret_cast<PFNGLVERTEXATTRIB3SARBPROC>(get_proc_address("glVertexAttrib3s"));
- glVertexAttrib3sv = reinterpret_cast<PFNGLVERTEXATTRIB3SVARBPROC>(get_proc_address("glVertexAttrib3sv"));
- glVertexAttrib4Nbv = reinterpret_cast<PFNGLVERTEXATTRIB4NBVARBPROC>(get_proc_address("glVertexAttrib4Nbv"));
- glVertexAttrib4Niv = reinterpret_cast<PFNGLVERTEXATTRIB4NIVARBPROC>(get_proc_address("glVertexAttrib4Niv"));
- glVertexAttrib4Nsv = reinterpret_cast<PFNGLVERTEXATTRIB4NSVARBPROC>(get_proc_address("glVertexAttrib4Nsv"));
- glVertexAttrib4Nub = reinterpret_cast<PFNGLVERTEXATTRIB4NUBARBPROC>(get_proc_address("glVertexAttrib4Nub"));
- glVertexAttrib4Nubv = reinterpret_cast<PFNGLVERTEXATTRIB4NUBVARBPROC>(get_proc_address("glVertexAttrib4Nubv"));
- glVertexAttrib4Nuiv = reinterpret_cast<PFNGLVERTEXATTRIB4NUIVARBPROC>(get_proc_address("glVertexAttrib4Nuiv"));
- glVertexAttrib4Nusv = reinterpret_cast<PFNGLVERTEXATTRIB4NUSVARBPROC>(get_proc_address("glVertexAttrib4Nusv"));
- glVertexAttrib4bv = reinterpret_cast<PFNGLVERTEXATTRIB4BVARBPROC>(get_proc_address("glVertexAttrib4bv"));
- glVertexAttrib4d = reinterpret_cast<PFNGLVERTEXATTRIB4DARBPROC>(get_proc_address("glVertexAttrib4d"));
- glVertexAttrib4dv = reinterpret_cast<PFNGLVERTEXATTRIB4DVARBPROC>(get_proc_address("glVertexAttrib4dv"));
- glVertexAttrib4f = reinterpret_cast<PFNGLVERTEXATTRIB4FARBPROC>(get_proc_address("glVertexAttrib4f"));
- glVertexAttrib4fv = reinterpret_cast<PFNGLVERTEXATTRIB4FVARBPROC>(get_proc_address("glVertexAttrib4fv"));
- glVertexAttrib4iv = reinterpret_cast<PFNGLVERTEXATTRIB4IVARBPROC>(get_proc_address("glVertexAttrib4iv"));
- glVertexAttrib4s = reinterpret_cast<PFNGLVERTEXATTRIB4SARBPROC>(get_proc_address("glVertexAttrib4s"));
- glVertexAttrib4sv = reinterpret_cast<PFNGLVERTEXATTRIB4SVARBPROC>(get_proc_address("glVertexAttrib4sv"));
- glVertexAttrib4ubv = reinterpret_cast<PFNGLVERTEXATTRIB4UBVARBPROC>(get_proc_address("glVertexAttrib4ubv"));
- glVertexAttrib4uiv = reinterpret_cast<PFNGLVERTEXATTRIB4UIVARBPROC>(get_proc_address("glVertexAttrib4uiv"));
- glVertexAttrib4usv = reinterpret_cast<PFNGLVERTEXATTRIB4USVARBPROC>(get_proc_address("glVertexAttrib4usv"));
- glVertexAttribPointer = reinterpret_cast<PFNGLVERTEXATTRIBPOINTERARBPROC>(get_proc_address("glVertexAttribPointer"));
- return Extension::CORE;
- }
- if(is_supported("GL_ARB_vertex_shader"))
- {
- glBindAttribLocation = reinterpret_cast<PFNGLBINDATTRIBLOCATIONARBPROC>(get_proc_address("glBindAttribLocationARB"));
- glDisableVertexAttribArray = reinterpret_cast<PFNGLDISABLEVERTEXATTRIBARRAYARBPROC>(get_proc_address("glDisableVertexAttribArrayARB"));
- glEnableVertexAttribArray = reinterpret_cast<PFNGLENABLEVERTEXATTRIBARRAYARBPROC>(get_proc_address("glEnableVertexAttribArrayARB"));
- glGetActiveAttrib = reinterpret_cast<PFNGLGETACTIVEATTRIBARBPROC>(get_proc_address("glGetActiveAttribARB"));
- glGetAttribLocation = reinterpret_cast<PFNGLGETATTRIBLOCATIONARBPROC>(get_proc_address("glGetAttribLocationARB"));
- glGetVertexAttribPointerv = reinterpret_cast<PFNGLGETVERTEXATTRIBPOINTERVARBPROC>(get_proc_address("glGetVertexAttribPointervARB"));
- glGetVertexAttribdv = reinterpret_cast<PFNGLGETVERTEXATTRIBDVARBPROC>(get_proc_address("glGetVertexAttribdvARB"));
- glGetVertexAttribfv = reinterpret_cast<PFNGLGETVERTEXATTRIBFVARBPROC>(get_proc_address("glGetVertexAttribfvARB"));
- glGetVertexAttribiv = reinterpret_cast<PFNGLGETVERTEXATTRIBIVARBPROC>(get_proc_address("glGetVertexAttribivARB"));
- glVertexAttrib1d = reinterpret_cast<PFNGLVERTEXATTRIB1DARBPROC>(get_proc_address("glVertexAttrib1dARB"));
- glVertexAttrib1dv = reinterpret_cast<PFNGLVERTEXATTRIB1DVARBPROC>(get_proc_address("glVertexAttrib1dvARB"));
- glVertexAttrib1f = reinterpret_cast<PFNGLVERTEXATTRIB1FARBPROC>(get_proc_address("glVertexAttrib1fARB"));
- glVertexAttrib1fv = reinterpret_cast<PFNGLVERTEXATTRIB1FVARBPROC>(get_proc_address("glVertexAttrib1fvARB"));
- glVertexAttrib1s = reinterpret_cast<PFNGLVERTEXATTRIB1SARBPROC>(get_proc_address("glVertexAttrib1sARB"));
- glVertexAttrib1sv = reinterpret_cast<PFNGLVERTEXATTRIB1SVARBPROC>(get_proc_address("glVertexAttrib1svARB"));
- glVertexAttrib2d = reinterpret_cast<PFNGLVERTEXATTRIB2DARBPROC>(get_proc_address("glVertexAttrib2dARB"));
- glVertexAttrib2dv = reinterpret_cast<PFNGLVERTEXATTRIB2DVARBPROC>(get_proc_address("glVertexAttrib2dvARB"));
- glVertexAttrib2f = reinterpret_cast<PFNGLVERTEXATTRIB2FARBPROC>(get_proc_address("glVertexAttrib2fARB"));
- glVertexAttrib2fv = reinterpret_cast<PFNGLVERTEXATTRIB2FVARBPROC>(get_proc_address("glVertexAttrib2fvARB"));
- glVertexAttrib2s = reinterpret_cast<PFNGLVERTEXATTRIB2SARBPROC>(get_proc_address("glVertexAttrib2sARB"));
- glVertexAttrib2sv = reinterpret_cast<PFNGLVERTEXATTRIB2SVARBPROC>(get_proc_address("glVertexAttrib2svARB"));
- glVertexAttrib3d = reinterpret_cast<PFNGLVERTEXATTRIB3DARBPROC>(get_proc_address("glVertexAttrib3dARB"));
- glVertexAttrib3dv = reinterpret_cast<PFNGLVERTEXATTRIB3DVARBPROC>(get_proc_address("glVertexAttrib3dvARB"));
- glVertexAttrib3f = reinterpret_cast<PFNGLVERTEXATTRIB3FARBPROC>(get_proc_address("glVertexAttrib3fARB"));
- glVertexAttrib3fv = reinterpret_cast<PFNGLVERTEXATTRIB3FVARBPROC>(get_proc_address("glVertexAttrib3fvARB"));
- glVertexAttrib3s = reinterpret_cast<PFNGLVERTEXATTRIB3SARBPROC>(get_proc_address("glVertexAttrib3sARB"));
- glVertexAttrib3sv = reinterpret_cast<PFNGLVERTEXATTRIB3SVARBPROC>(get_proc_address("glVertexAttrib3svARB"));
- glVertexAttrib4Nbv = reinterpret_cast<PFNGLVERTEXATTRIB4NBVARBPROC>(get_proc_address("glVertexAttrib4NbvARB"));
- glVertexAttrib4Niv = reinterpret_cast<PFNGLVERTEXATTRIB4NIVARBPROC>(get_proc_address("glVertexAttrib4NivARB"));
- glVertexAttrib4Nsv = reinterpret_cast<PFNGLVERTEXATTRIB4NSVARBPROC>(get_proc_address("glVertexAttrib4NsvARB"));
- glVertexAttrib4Nub = reinterpret_cast<PFNGLVERTEXATTRIB4NUBARBPROC>(get_proc_address("glVertexAttrib4NubARB"));
- glVertexAttrib4Nubv = reinterpret_cast<PFNGLVERTEXATTRIB4NUBVARBPROC>(get_proc_address("glVertexAttrib4NubvARB"));
- glVertexAttrib4Nuiv = reinterpret_cast<PFNGLVERTEXATTRIB4NUIVARBPROC>(get_proc_address("glVertexAttrib4NuivARB"));
- glVertexAttrib4Nusv = reinterpret_cast<PFNGLVERTEXATTRIB4NUSVARBPROC>(get_proc_address("glVertexAttrib4NusvARB"));
- glVertexAttrib4bv = reinterpret_cast<PFNGLVERTEXATTRIB4BVARBPROC>(get_proc_address("glVertexAttrib4bvARB"));
- glVertexAttrib4d = reinterpret_cast<PFNGLVERTEXATTRIB4DARBPROC>(get_proc_address("glVertexAttrib4dARB"));
- glVertexAttrib4dv = reinterpret_cast<PFNGLVERTEXATTRIB4DVARBPROC>(get_proc_address("glVertexAttrib4dvARB"));
- glVertexAttrib4f = reinterpret_cast<PFNGLVERTEXATTRIB4FARBPROC>(get_proc_address("glVertexAttrib4fARB"));
- glVertexAttrib4fv = reinterpret_cast<PFNGLVERTEXATTRIB4FVARBPROC>(get_proc_address("glVertexAttrib4fvARB"));
- glVertexAttrib4iv = reinterpret_cast<PFNGLVERTEXATTRIB4IVARBPROC>(get_proc_address("glVertexAttrib4ivARB"));
- glVertexAttrib4s = reinterpret_cast<PFNGLVERTEXATTRIB4SARBPROC>(get_proc_address("glVertexAttrib4sARB"));
- glVertexAttrib4sv = reinterpret_cast<PFNGLVERTEXATTRIB4SVARBPROC>(get_proc_address("glVertexAttrib4svARB"));
- glVertexAttrib4ubv = reinterpret_cast<PFNGLVERTEXATTRIB4UBVARBPROC>(get_proc_address("glVertexAttrib4ubvARB"));
- glVertexAttrib4uiv = reinterpret_cast<PFNGLVERTEXATTRIB4UIVARBPROC>(get_proc_address("glVertexAttrib4uivARB"));
- glVertexAttrib4usv = reinterpret_cast<PFNGLVERTEXATTRIB4USVARBPROC>(get_proc_address("glVertexAttrib4usvARB"));
- glVertexAttribPointer = reinterpret_cast<PFNGLVERTEXATTRIBPOINTERARBPROC>(get_proc_address("glVertexAttribPointerARB"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension ARB_vertex_shader("GL_ARB_vertex_shader", init_arb_vertex_shader);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_ARB_VERTEX_SHADER_
-#define MSP_GL_ARB_VERTEX_SHADER_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocation;
-extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArray;
-extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArray;
-extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttrib;
-extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocation;
-extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointerv;
-extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdv;
-extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfv;
-extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribiv;
-extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1d;
-extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dv;
-extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1f;
-extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fv;
-extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1s;
-extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1sv;
-extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2d;
-extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dv;
-extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2f;
-extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fv;
-extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2s;
-extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2sv;
-extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3d;
-extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dv;
-extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3f;
-extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fv;
-extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3s;
-extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3sv;
-extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4Nbv;
-extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4Niv;
-extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4Nsv;
-extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4Nub;
-extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4Nubv;
-extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4Nuiv;
-extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4Nusv;
-extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bv;
-extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4d;
-extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dv;
-extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4f;
-extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fv;
-extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4iv;
-extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4s;
-extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4sv;
-extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubv;
-extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uiv;
-extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usv;
-extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointer;
-
-extern Extension ARB_vertex_shader;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+#include <msp/gl/extensions/ext_draw_range_elements.h>
+#include <msp/gl/extensions/nv_primitive_restart.h>
#include "batch.h"
#include "bindable.h"
#include "buffer.h"
#include "error.h"
-#include "ext_draw_range_elements.h"
-#include "nv_primitive_restart.h"
#include "vertexarray.h"
using namespace std;
+#include <msp/gl/extensions/ext_blend_minmax.h>
+#include <msp/gl/extensions/ext_blend_subtract.h>
#include "blend.h"
-#include "ext_blend_minmax.h"
-#include "ext_blend_subtract.h"
namespace Msp {
namespace GL {
#include <stdexcept>
-#include "arb_pixel_buffer_object.h"
-#include "arb_uniform_buffer_object.h"
-#include "arb_vertex_buffer_object.h"
+#include <msp/gl/extensions/arb_pixel_buffer_object.h>
+#include <msp/gl/extensions/arb_uniform_buffer_object.h>
+#include <msp/gl/extensions/arb_vertex_buffer_object.h>
#include "buffer.h"
#include "misc.h"
+++ /dev/null
-#include "ext_bgra.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_ext_bgra()
-{
- if(is_version_at_least(1, 2))
- {
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_bgra"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_bgra("GL_EXT_bgra", init_ext_bgra);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_BGRA_
-#define MSP_GL_EXT_BGRA_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension EXT_bgra;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_blend_minmax.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLBLENDEQUATIONEXTPROC glBlendEquation = 0;
-
-Extension::SupportLevel init_ext_blend_minmax()
-{
- if(is_version_at_least(1, 2))
- {
- glBlendEquation = reinterpret_cast<PFNGLBLENDEQUATIONEXTPROC>(get_proc_address("glBlendEquation"));
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_blend_minmax"))
- {
- glBlendEquation = reinterpret_cast<PFNGLBLENDEQUATIONEXTPROC>(get_proc_address("glBlendEquationEXT"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_blend_minmax("GL_EXT_blend_minmax", init_ext_blend_minmax);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_BLEND_MINMAX_
-#define MSP_GL_EXT_BLEND_MINMAX_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLBLENDEQUATIONEXTPROC glBlendEquation;
-
-extern Extension EXT_blend_minmax;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_blend_subtract.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_ext_blend_subtract()
-{
- if(is_version_at_least(1, 2))
- {
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_blend_subtract"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_blend_subtract("GL_EXT_blend_subtract", init_ext_blend_subtract);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_BLEND_SUBTRACT_
-#define MSP_GL_EXT_BLEND_SUBTRACT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension EXT_blend_subtract;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_draw_range_elements.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLDRAWRANGEELEMENTSEXTPROC glDrawRangeElements = 0;
-
-Extension::SupportLevel init_ext_draw_range_elements()
-{
- if(is_version_at_least(1, 2))
- {
- glDrawRangeElements = reinterpret_cast<PFNGLDRAWRANGEELEMENTSEXTPROC>(get_proc_address("glDrawRangeElements"));
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_draw_range_elements"))
- {
- glDrawRangeElements = reinterpret_cast<PFNGLDRAWRANGEELEMENTSEXTPROC>(get_proc_address("glDrawRangeElementsEXT"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_draw_range_elements("GL_EXT_draw_range_elements", init_ext_draw_range_elements);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_DRAW_RANGE_ELEMENTS_
-#define MSP_GL_EXT_DRAW_RANGE_ELEMENTS_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLDRAWRANGEELEMENTSEXTPROC glDrawRangeElements;
-
-extern Extension EXT_draw_range_elements;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_framebuffer_blit.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLBLITFRAMEBUFFEREXTPROC glBlitFramebuffer = 0;
-
-Extension::SupportLevel init_ext_framebuffer_blit()
-{
- if(is_version_at_least(3, 0) || is_supported("GL_ARB_framebuffer_object"))
- {
- glBlitFramebuffer = reinterpret_cast<PFNGLBLITFRAMEBUFFEREXTPROC>(get_proc_address("glBlitFramebuffer"));
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_framebuffer_blit"))
- {
- glBlitFramebuffer = reinterpret_cast<PFNGLBLITFRAMEBUFFEREXTPROC>(get_proc_address("glBlitFramebufferEXT"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_framebuffer_blit("GL_EXT_framebuffer_blit", init_ext_framebuffer_blit);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_FRAMEBUFFER_BLIT_
-#define MSP_GL_EXT_FRAMEBUFFER_BLIT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLBLITFRAMEBUFFEREXTPROC glBlitFramebuffer;
-
-extern Extension EXT_framebuffer_blit;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_framebuffer_multisample.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisample = 0;
-
-Extension::SupportLevel init_ext_framebuffer_multisample()
-{
- if(is_version_at_least(3, 0) || is_supported("GL_ARB_framebuffer_object"))
- {
- glRenderbufferStorageMultisample = reinterpret_cast<PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC>(get_proc_address("glRenderbufferStorageMultisample"));
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_framebuffer_multisample"))
- {
- glRenderbufferStorageMultisample = reinterpret_cast<PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC>(get_proc_address("glRenderbufferStorageMultisampleEXT"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_framebuffer_multisample("GL_EXT_framebuffer_multisample", init_ext_framebuffer_multisample);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_FRAMEBUFFER_MULTISAMPLE_
-#define MSP_GL_EXT_FRAMEBUFFER_MULTISAMPLE_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisample;
-
-extern Extension EXT_framebuffer_multisample;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_framebuffer_object.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebuffer = 0;
-PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbuffer = 0;
-PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatus = 0;
-PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffers = 0;
-PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffers = 0;
-PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbuffer = 0;
-PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1D = 0;
-PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2D = 0;
-PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3D = 0;
-PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffers = 0;
-PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffers = 0;
-PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmap = 0;
-PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameteriv = 0;
-PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameteriv = 0;
-PFNGLISFRAMEBUFFEREXTPROC glIsFramebuffer = 0;
-PFNGLISRENDERBUFFEREXTPROC glIsRenderbuffer = 0;
-PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorage = 0;
-
-Extension::SupportLevel init_ext_framebuffer_object()
-{
- if(is_version_at_least(3, 0) || is_supported("GL_ARB_framebuffer_object"))
- {
- glBindFramebuffer = reinterpret_cast<PFNGLBINDFRAMEBUFFEREXTPROC>(get_proc_address("glBindFramebuffer"));
- glBindRenderbuffer = reinterpret_cast<PFNGLBINDRENDERBUFFEREXTPROC>(get_proc_address("glBindRenderbuffer"));
- glCheckFramebufferStatus = reinterpret_cast<PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC>(get_proc_address("glCheckFramebufferStatus"));
- glDeleteFramebuffers = reinterpret_cast<PFNGLDELETEFRAMEBUFFERSEXTPROC>(get_proc_address("glDeleteFramebuffers"));
- glDeleteRenderbuffers = reinterpret_cast<PFNGLDELETERENDERBUFFERSEXTPROC>(get_proc_address("glDeleteRenderbuffers"));
- glFramebufferRenderbuffer = reinterpret_cast<PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC>(get_proc_address("glFramebufferRenderbuffer"));
- glFramebufferTexture1D = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE1DEXTPROC>(get_proc_address("glFramebufferTexture1D"));
- glFramebufferTexture2D = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE2DEXTPROC>(get_proc_address("glFramebufferTexture2D"));
- glFramebufferTexture3D = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE3DEXTPROC>(get_proc_address("glFramebufferTexture3D"));
- glGenFramebuffers = reinterpret_cast<PFNGLGENFRAMEBUFFERSEXTPROC>(get_proc_address("glGenFramebuffers"));
- glGenRenderbuffers = reinterpret_cast<PFNGLGENRENDERBUFFERSEXTPROC>(get_proc_address("glGenRenderbuffers"));
- glGenerateMipmap = reinterpret_cast<PFNGLGENERATEMIPMAPEXTPROC>(get_proc_address("glGenerateMipmap"));
- glGetFramebufferAttachmentParameteriv = reinterpret_cast<PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC>(get_proc_address("glGetFramebufferAttachmentParameteriv"));
- glGetRenderbufferParameteriv = reinterpret_cast<PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC>(get_proc_address("glGetRenderbufferParameteriv"));
- glIsFramebuffer = reinterpret_cast<PFNGLISFRAMEBUFFEREXTPROC>(get_proc_address("glIsFramebuffer"));
- glIsRenderbuffer = reinterpret_cast<PFNGLISRENDERBUFFEREXTPROC>(get_proc_address("glIsRenderbuffer"));
- glRenderbufferStorage = reinterpret_cast<PFNGLRENDERBUFFERSTORAGEEXTPROC>(get_proc_address("glRenderbufferStorage"));
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_framebuffer_object"))
- {
- glBindFramebuffer = reinterpret_cast<PFNGLBINDFRAMEBUFFEREXTPROC>(get_proc_address("glBindFramebufferEXT"));
- glBindRenderbuffer = reinterpret_cast<PFNGLBINDRENDERBUFFEREXTPROC>(get_proc_address("glBindRenderbufferEXT"));
- glCheckFramebufferStatus = reinterpret_cast<PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC>(get_proc_address("glCheckFramebufferStatusEXT"));
- glDeleteFramebuffers = reinterpret_cast<PFNGLDELETEFRAMEBUFFERSEXTPROC>(get_proc_address("glDeleteFramebuffersEXT"));
- glDeleteRenderbuffers = reinterpret_cast<PFNGLDELETERENDERBUFFERSEXTPROC>(get_proc_address("glDeleteRenderbuffersEXT"));
- glFramebufferRenderbuffer = reinterpret_cast<PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC>(get_proc_address("glFramebufferRenderbufferEXT"));
- glFramebufferTexture1D = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE1DEXTPROC>(get_proc_address("glFramebufferTexture1DEXT"));
- glFramebufferTexture2D = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE2DEXTPROC>(get_proc_address("glFramebufferTexture2DEXT"));
- glFramebufferTexture3D = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE3DEXTPROC>(get_proc_address("glFramebufferTexture3DEXT"));
- glGenFramebuffers = reinterpret_cast<PFNGLGENFRAMEBUFFERSEXTPROC>(get_proc_address("glGenFramebuffersEXT"));
- glGenRenderbuffers = reinterpret_cast<PFNGLGENRENDERBUFFERSEXTPROC>(get_proc_address("glGenRenderbuffersEXT"));
- glGenerateMipmap = reinterpret_cast<PFNGLGENERATEMIPMAPEXTPROC>(get_proc_address("glGenerateMipmapEXT"));
- glGetFramebufferAttachmentParameteriv = reinterpret_cast<PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC>(get_proc_address("glGetFramebufferAttachmentParameterivEXT"));
- glGetRenderbufferParameteriv = reinterpret_cast<PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC>(get_proc_address("glGetRenderbufferParameterivEXT"));
- glIsFramebuffer = reinterpret_cast<PFNGLISFRAMEBUFFEREXTPROC>(get_proc_address("glIsFramebufferEXT"));
- glIsRenderbuffer = reinterpret_cast<PFNGLISRENDERBUFFEREXTPROC>(get_proc_address("glIsRenderbufferEXT"));
- glRenderbufferStorage = reinterpret_cast<PFNGLRENDERBUFFERSTORAGEEXTPROC>(get_proc_address("glRenderbufferStorageEXT"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_framebuffer_object("GL_EXT_framebuffer_object", init_ext_framebuffer_object);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_FRAMEBUFFER_OBJECT_
-#define MSP_GL_EXT_FRAMEBUFFER_OBJECT_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebuffer;
-extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbuffer;
-extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatus;
-extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffers;
-extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffers;
-extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbuffer;
-extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1D;
-extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2D;
-extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3D;
-extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffers;
-extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffers;
-extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmap;
-extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameteriv;
-extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameteriv;
-extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebuffer;
-extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbuffer;
-extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorage;
-
-extern Extension EXT_framebuffer_object;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_texture3d.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLTEXIMAGE3DEXTPROC glTexImage3D = 0;
-PFNGLTEXSUBIMAGE3DEXTPROC glTexSubImage3D = 0;
-
-Extension::SupportLevel init_ext_texture3d()
-{
- if(is_version_at_least(1, 2))
- {
- glTexImage3D = reinterpret_cast<PFNGLTEXIMAGE3DEXTPROC>(get_proc_address("glTexImage3D"));
- glTexSubImage3D = reinterpret_cast<PFNGLTEXSUBIMAGE3DEXTPROC>(get_proc_address("glTexSubImage3D"));
- return Extension::CORE;
- }
- if(is_supported("GL_EXT_texture3D"))
- {
- glTexImage3D = reinterpret_cast<PFNGLTEXIMAGE3DEXTPROC>(get_proc_address("glTexImage3DEXT"));
- glTexSubImage3D = reinterpret_cast<PFNGLTEXSUBIMAGE3DEXTPROC>(get_proc_address("glTexSubImage3DEXT"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_texture3D("GL_EXT_texture3D", init_ext_texture3d);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_TEXTURE3D_
-#define MSP_GL_EXT_TEXTURE3D_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLTEXIMAGE3DEXTPROC glTexImage3D;
-extern PFNGLTEXSUBIMAGE3DEXTPROC glTexSubImage3D;
-
-extern Extension EXT_texture3D;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+++ /dev/null
-#include "ext_texture_filter_anisotropic.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_ext_texture_filter_anisotropic()
-{
- if(is_supported("GL_EXT_texture_filter_anisotropic"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension EXT_texture_filter_anisotropic("GL_EXT_texture_filter_anisotropic", init_ext_texture_filter_anisotropic);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_EXT_TEXTURE_FILTER_ANISOTROPIC_
-#define MSP_GL_EXT_TEXTURE_FILTER_ANISOTROPIC_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension EXT_texture_filter_anisotropic;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
-#include "arb_draw_buffers.h"
+#include <msp/gl/extensions/arb_draw_buffers.h>
+#include <msp/gl/extensions/ext_framebuffer_blit.h>
+#include <msp/gl/extensions/ext_framebuffer_object.h>
#include "error.h"
-#include "ext_framebuffer_blit.h"
-#include "ext_framebuffer_object.h"
#include "framebuffer.h"
#include "misc.h"
#include "renderbuffer.h"
+++ /dev/null
-#include "nv_primitive_restart.h"
-
-namespace Msp {
-namespace GL {
-
-PFNGLPRIMITIVERESTARTINDEXNVPROC glPrimitiveRestartIndexNV = 0;
-PFNGLPRIMITIVERESTARTNVPROC glPrimitiveRestartNV = 0;
-
-Extension::SupportLevel init_nv_primitive_restart()
-{
- if(is_supported("GL_NV_primitive_restart"))
- {
- glPrimitiveRestartIndexNV = reinterpret_cast<PFNGLPRIMITIVERESTARTINDEXNVPROC>(get_proc_address("glPrimitiveRestartIndexNV"));
- glPrimitiveRestartNV = reinterpret_cast<PFNGLPRIMITIVERESTARTNVPROC>(get_proc_address("glPrimitiveRestartNV"));
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension NV_primitive_restart("GL_NV_primitive_restart", init_nv_primitive_restart);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_NV_PRIMITIVE_RESTART_
-#define MSP_GL_NV_PRIMITIVE_RESTART_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern PFNGLPRIMITIVERESTARTINDEXNVPROC glPrimitiveRestartIndexNV;
-extern PFNGLPRIMITIVERESTARTNVPROC glPrimitiveRestartNV;
-
-extern Extension NV_primitive_restart;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
+#include <msp/gl/extensions/arb_texture_float.h>
+#include <msp/gl/extensions/ext_bgra.h>
#include <msp/strings/format.h>
-#include "arb_texture_float.h"
-#include "ext_bgra.h"
#include "pixelformat.h"
using namespace std;
#include <cstring>
#include <msp/core/hash.h>
#include <msp/core/maputils.h>
+#include <msp/gl/extensions/arb_shader_objects.h>
+#include <msp/gl/extensions/arb_uniform_buffer_object.h>
+#include <msp/gl/extensions/arb_vertex_shader.h>
#include <msp/strings/format.h>
-#include "arb_shader_objects.h"
-#include "arb_uniform_buffer_object.h"
-#include "arb_vertex_shader.h"
#include "buffer.h"
#include "error.h"
#include "program.h"
-#include "arb_shader_objects.h"
+#include <msp/gl/extensions/arb_shader_objects.h>
#include "buffer.h"
#include "color.h"
#include "error.h"
-#include "ext_framebuffer_multisample.h"
-#include "ext_framebuffer_object.h"
+#include <msp/gl/extensions/ext_framebuffer_multisample.h>
+#include <msp/gl/extensions/ext_framebuffer_object.h>
#include "renderbuffer.h"
namespace Msp {
+++ /dev/null
-#include "sgis_generate_mipmap.h"
-
-namespace Msp {
-namespace GL {
-
-Extension::SupportLevel init_sgis_generate_mipmap()
-{
- if(is_supported("GL_SGIS_generate_mipmap"))
- {
- return Extension::EXTENSION;
- }
- return Extension::UNSUPPORTED;
-}
-
-Extension SGIS_generate_mipmap("GL_SGIS_generate_mipmap", init_sgis_generate_mipmap);
-
-} // namespace GL
-} // namespace Msp
+++ /dev/null
-#ifndef MSP_GL_SGIS_GENERATE_MIPMAP_
-#define MSP_GL_SGIS_GENERATE_MIPMAP_
-
-#include "extension.h"
-#include "gl.h"
-#include <GL/glext.h>
-
-namespace Msp {
-namespace GL {
-
-extern Extension SGIS_generate_mipmap;
-
-} // namespace GL
-} // namespace Msp
-
-#endif
-#include "arb_fragment_shader.h"
-#include "arb_shader_objects.h"
-#include "arb_vertex_shader.h"
+#include <msp/gl/extensions/arb_fragment_shader.h>
+#include <msp/gl/extensions/arb_shader_objects.h>
+#include <msp/gl/extensions/arb_vertex_shader.h>
#include "error.h"
#include "shader.h"
+#include <msp/gl/extensions/ext_texture_filter_anisotropic.h>
+#include <msp/gl/extensions/sgis_generate_mipmap.h>
#include <msp/strings/format.h>
#include "error.h"
-#include "ext_texture_filter_anisotropic.h"
-#include "sgis_generate_mipmap.h"
#include "texture.h"
#include "texunit.h"
#include <cmath>
+#include <msp/gl/extensions/ext_texture3d.h>
#include <msp/graphics/image.h>
#include "bindable.h"
#include "error.h"
-#include "ext_texture3d.h"
#include "texture3d.h"
using namespace std;
-#include "arb_texture_cube_map.h"
+#include <msp/gl/extensions/arb_texture_cube_map.h>
#include "bindable.h"
#include "error.h"
#include "texturecube.h"
#include <stdexcept>
-#include "arb_multitexture.h"
-#include "arb_vertex_shader.h"
+#include <msp/gl/extensions/arb_multitexture.h>
+#include <msp/gl/extensions/arb_vertex_shader.h>
#include "gl.h"
#include "texunit.h"
-#include "arb_shader_objects.h"
+#include <msp/gl/extensions/arb_shader_objects.h>
#include "uniform.h"
namespace Msp {
-#include "arb_multitexture.h"
-#include "arb_vertex_shader.h"
+#include <msp/gl/extensions/arb_multitexture.h>
+#include <msp/gl/extensions/arb_vertex_shader.h>
#include "buffer.h"
#include "error.h"
#include "gl.h"