From 619aae12e01f25e79626a94c973927e5599e99a5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 20 Aug 2013 18:27:43 +0300 Subject: [PATCH] Do not store generated files in the repository Instead generate them during the build process. This helps with managing any changes that might be necessary when porting to new platforms. --- Build | 10 ++ extensions/arb_draw_buffers.glext | 1 + extensions/arb_fragment_shader.glext | 2 + extensions/arb_multitexture.glext | 1 + extensions/arb_pixel_buffer_object.glext | 2 + extensions/arb_shader_objects.glext | 1 + extensions/arb_texture_cube_map.glext | 2 + extensions/arb_texture_float.glext | 2 + extensions/arb_uniform_buffer_object.glext | 2 + extensions/arb_vertex_buffer_object.glext | 1 + extensions/arb_vertex_shader.glext | 2 + extensions/ext_bgra.glext | 2 + extensions/ext_blend_minmax.glext | 1 + extensions/ext_blend_subtract.glext | 2 + extensions/ext_draw_range_elements.glext | 1 + extensions/ext_framebuffer_blit.glext | 1 + extensions/ext_framebuffer_multisample.glext | 1 + extensions/ext_framebuffer_object.glext | 1 + extensions/ext_texture3d.glext | 1 + .../ext_texture_filter_anisotropic.glext | 1 + extensions/nv_primitive_restart.glext | 1 + extensions/sgis_generate_mipmap.glext | 1 + scripts/extgen.py | 38 ++++- source/arb_draw_buffers.cpp | 26 --- source/arb_draw_buffers.h | 18 -- source/arb_fragment_shader.cpp | 22 --- source/arb_fragment_shader.h | 16 -- source/arb_multitexture.cpp | 125 -------------- source/arb_multitexture.h | 51 ------ source/arb_pixel_buffer_object.cpp | 22 --- source/arb_pixel_buffer_object.h | 16 -- source/arb_shader_objects.cpp | 143 ---------------- source/arb_shader_objects.h | 57 ------- source/arb_texture_cube_map.cpp | 22 --- source/arb_texture_cube_map.h | 16 -- source/arb_texture_float.cpp | 22 --- source/arb_texture_float.h | 16 -- source/arb_uniform_buffer_object.cpp | 37 ---- source/arb_uniform_buffer_object.h | 26 --- source/arb_vertex_buffer_object.cpp | 56 ------ source/arb_vertex_buffer_object.h | 28 --- source/arb_vertex_shader.cpp | 161 ------------------ source/arb_vertex_shader.h | 63 ------- source/batch.cpp | 4 +- source/blend.cpp | 4 +- source/buffer.cpp | 6 +- source/ext_bgra.cpp | 22 --- source/ext_bgra.h | 16 -- source/ext_blend_minmax.cpp | 26 --- source/ext_blend_minmax.h | 18 -- source/ext_blend_subtract.cpp | 22 --- source/ext_blend_subtract.h | 16 -- source/ext_draw_range_elements.cpp | 26 --- source/ext_draw_range_elements.h | 18 -- source/ext_framebuffer_blit.cpp | 26 --- source/ext_framebuffer_blit.h | 18 -- source/ext_framebuffer_multisample.cpp | 26 --- source/ext_framebuffer_multisample.h | 18 -- source/ext_framebuffer_object.cpp | 74 -------- source/ext_framebuffer_object.h | 34 ---- source/ext_texture3d.cpp | 29 ---- source/ext_texture3d.h | 19 --- source/ext_texture_filter_anisotropic.cpp | 18 -- source/ext_texture_filter_anisotropic.h | 16 -- source/framebuffer.cpp | 6 +- source/nv_primitive_restart.cpp | 23 --- source/nv_primitive_restart.h | 19 --- source/pixelformat.cpp | 4 +- source/program.cpp | 6 +- source/programdata.cpp | 2 +- source/renderbuffer.cpp | 4 +- source/sgis_generate_mipmap.cpp | 18 -- source/sgis_generate_mipmap.h | 16 -- source/shader.cpp | 6 +- source/texture.cpp | 4 +- source/texture3d.cpp | 2 +- source/texturecube.cpp | 2 +- source/texunit.cpp | 4 +- source/uniform.cpp | 2 +- source/vertexarray.cpp | 4 +- 80 files changed, 99 insertions(+), 1499 deletions(-) create mode 100644 extensions/arb_draw_buffers.glext create mode 100644 extensions/arb_fragment_shader.glext create mode 100644 extensions/arb_multitexture.glext create mode 100644 extensions/arb_pixel_buffer_object.glext create mode 100644 extensions/arb_shader_objects.glext create mode 100644 extensions/arb_texture_cube_map.glext create mode 100644 extensions/arb_texture_float.glext create mode 100644 extensions/arb_uniform_buffer_object.glext create mode 100644 extensions/arb_vertex_buffer_object.glext create mode 100644 extensions/arb_vertex_shader.glext create mode 100644 extensions/ext_bgra.glext create mode 100644 extensions/ext_blend_minmax.glext create mode 100644 extensions/ext_blend_subtract.glext create mode 100644 extensions/ext_draw_range_elements.glext create mode 100644 extensions/ext_framebuffer_blit.glext create mode 100644 extensions/ext_framebuffer_multisample.glext create mode 100644 extensions/ext_framebuffer_object.glext create mode 100644 extensions/ext_texture3d.glext create mode 100644 extensions/ext_texture_filter_anisotropic.glext create mode 100644 extensions/nv_primitive_restart.glext create mode 100644 extensions/sgis_generate_mipmap.glext delete mode 100644 source/arb_draw_buffers.cpp delete mode 100644 source/arb_draw_buffers.h delete mode 100644 source/arb_fragment_shader.cpp delete mode 100644 source/arb_fragment_shader.h delete mode 100644 source/arb_multitexture.cpp delete mode 100644 source/arb_multitexture.h delete mode 100644 source/arb_pixel_buffer_object.cpp delete mode 100644 source/arb_pixel_buffer_object.h delete mode 100644 source/arb_shader_objects.cpp delete mode 100644 source/arb_shader_objects.h delete mode 100644 source/arb_texture_cube_map.cpp delete mode 100644 source/arb_texture_cube_map.h delete mode 100644 source/arb_texture_float.cpp delete mode 100644 source/arb_texture_float.h delete mode 100644 source/arb_uniform_buffer_object.cpp delete mode 100644 source/arb_uniform_buffer_object.h delete mode 100644 source/arb_vertex_buffer_object.cpp delete mode 100644 source/arb_vertex_buffer_object.h delete mode 100644 source/arb_vertex_shader.cpp delete mode 100644 source/arb_vertex_shader.h delete mode 100644 source/ext_bgra.cpp delete mode 100644 source/ext_bgra.h delete mode 100644 source/ext_blend_minmax.cpp delete mode 100644 source/ext_blend_minmax.h delete mode 100644 source/ext_blend_subtract.cpp delete mode 100644 source/ext_blend_subtract.h delete mode 100644 source/ext_draw_range_elements.cpp delete mode 100644 source/ext_draw_range_elements.h delete mode 100644 source/ext_framebuffer_blit.cpp delete mode 100644 source/ext_framebuffer_blit.h delete mode 100644 source/ext_framebuffer_multisample.cpp delete mode 100644 source/ext_framebuffer_multisample.h delete mode 100644 source/ext_framebuffer_object.cpp delete mode 100644 source/ext_framebuffer_object.h delete mode 100644 source/ext_texture3d.cpp delete mode 100644 source/ext_texture3d.h delete mode 100644 source/ext_texture_filter_anisotropic.cpp delete mode 100644 source/ext_texture_filter_anisotropic.h delete mode 100644 source/nv_primitive_restart.cpp delete mode 100644 source/nv_primitive_restart.h delete mode 100644 source/sgis_generate_mipmap.cpp delete mode 100644 source/sgis_generate_mipmap.h diff --git a/Build b/Build index 21937532..1aae9864 100644 --- a/Build +++ b/Build @@ -9,13 +9,23 @@ package "mspgl" 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"; }; }; diff --git a/extensions/arb_draw_buffers.glext b/extensions/arb_draw_buffers.glext new file mode 100644 index 00000000..c17d228a --- /dev/null +++ b/extensions/arb_draw_buffers.glext @@ -0,0 +1 @@ +extension ARB_draw_buffers diff --git a/extensions/arb_fragment_shader.glext b/extensions/arb_fragment_shader.glext new file mode 100644 index 00000000..ac02f71f --- /dev/null +++ b/extensions/arb_fragment_shader.glext @@ -0,0 +1,2 @@ +extension ARB_fragment_shader +core_version 2.0 diff --git a/extensions/arb_multitexture.glext b/extensions/arb_multitexture.glext new file mode 100644 index 00000000..78e8d9ba --- /dev/null +++ b/extensions/arb_multitexture.glext @@ -0,0 +1 @@ +extension ARB_multitexture diff --git a/extensions/arb_pixel_buffer_object.glext b/extensions/arb_pixel_buffer_object.glext new file mode 100644 index 00000000..c11586d8 --- /dev/null +++ b/extensions/arb_pixel_buffer_object.glext @@ -0,0 +1,2 @@ +extension ARB_pixel_buffer_object +core_version 2.1 diff --git a/extensions/arb_shader_objects.glext b/extensions/arb_shader_objects.glext new file mode 100644 index 00000000..7d0ba645 --- /dev/null +++ b/extensions/arb_shader_objects.glext @@ -0,0 +1 @@ +extension ARB_shader_objects diff --git a/extensions/arb_texture_cube_map.glext b/extensions/arb_texture_cube_map.glext new file mode 100644 index 00000000..16a6a929 --- /dev/null +++ b/extensions/arb_texture_cube_map.glext @@ -0,0 +1,2 @@ +extension ARB_texture_cube_map +core_version 1.3 diff --git a/extensions/arb_texture_float.glext b/extensions/arb_texture_float.glext new file mode 100644 index 00000000..bb379fdf --- /dev/null +++ b/extensions/arb_texture_float.glext @@ -0,0 +1,2 @@ +extension ARB_texture_float +core_version 3.0 diff --git a/extensions/arb_uniform_buffer_object.glext b/extensions/arb_uniform_buffer_object.glext new file mode 100644 index 00000000..c6b1b443 --- /dev/null +++ b/extensions/arb_uniform_buffer_object.glext @@ -0,0 +1,2 @@ +extension ARB_uniform_buffer_object +core_version 3.0 diff --git a/extensions/arb_vertex_buffer_object.glext b/extensions/arb_vertex_buffer_object.glext new file mode 100644 index 00000000..0eadd25f --- /dev/null +++ b/extensions/arb_vertex_buffer_object.glext @@ -0,0 +1 @@ +extension ARB_vertex_buffer_object diff --git a/extensions/arb_vertex_shader.glext b/extensions/arb_vertex_shader.glext new file mode 100644 index 00000000..73d559b4 --- /dev/null +++ b/extensions/arb_vertex_shader.glext @@ -0,0 +1,2 @@ +extension ARB_vertex_shader +secondary ARB_vertex_program diff --git a/extensions/ext_bgra.glext b/extensions/ext_bgra.glext new file mode 100644 index 00000000..b449b888 --- /dev/null +++ b/extensions/ext_bgra.glext @@ -0,0 +1,2 @@ +extension EXT_bgra +core_version 1.2 diff --git a/extensions/ext_blend_minmax.glext b/extensions/ext_blend_minmax.glext new file mode 100644 index 00000000..5b2174d5 --- /dev/null +++ b/extensions/ext_blend_minmax.glext @@ -0,0 +1 @@ +extension EXT_blend_minmax diff --git a/extensions/ext_blend_subtract.glext b/extensions/ext_blend_subtract.glext new file mode 100644 index 00000000..312119da --- /dev/null +++ b/extensions/ext_blend_subtract.glext @@ -0,0 +1,2 @@ +extension EXT_blend_subtract +core_version 1.2 diff --git a/extensions/ext_draw_range_elements.glext b/extensions/ext_draw_range_elements.glext new file mode 100644 index 00000000..353c203a --- /dev/null +++ b/extensions/ext_draw_range_elements.glext @@ -0,0 +1 @@ +extension EXT_draw_range_elements diff --git a/extensions/ext_framebuffer_blit.glext b/extensions/ext_framebuffer_blit.glext new file mode 100644 index 00000000..4c78ba51 --- /dev/null +++ b/extensions/ext_framebuffer_blit.glext @@ -0,0 +1 @@ +extension EXT_framebuffer_blit diff --git a/extensions/ext_framebuffer_multisample.glext b/extensions/ext_framebuffer_multisample.glext new file mode 100644 index 00000000..91f26a7f --- /dev/null +++ b/extensions/ext_framebuffer_multisample.glext @@ -0,0 +1 @@ +extension EXT_framebuffer_multisample diff --git a/extensions/ext_framebuffer_object.glext b/extensions/ext_framebuffer_object.glext new file mode 100644 index 00000000..6d5465df --- /dev/null +++ b/extensions/ext_framebuffer_object.glext @@ -0,0 +1 @@ +extension EXT_framebuffer_object diff --git a/extensions/ext_texture3d.glext b/extensions/ext_texture3d.glext new file mode 100644 index 00000000..e9bc90bb --- /dev/null +++ b/extensions/ext_texture3d.glext @@ -0,0 +1 @@ +extension EXT_texture3D diff --git a/extensions/ext_texture_filter_anisotropic.glext b/extensions/ext_texture_filter_anisotropic.glext new file mode 100644 index 00000000..6d7c6c11 --- /dev/null +++ b/extensions/ext_texture_filter_anisotropic.glext @@ -0,0 +1 @@ +extension EXT_texture_filter_anisotropic diff --git a/extensions/nv_primitive_restart.glext b/extensions/nv_primitive_restart.glext new file mode 100644 index 00000000..43218616 --- /dev/null +++ b/extensions/nv_primitive_restart.glext @@ -0,0 +1 @@ +extension NV_primitive_restart diff --git a/extensions/sgis_generate_mipmap.glext b/extensions/sgis_generate_mipmap.glext new file mode 100644 index 00000000..9ccaffc1 --- /dev/null +++ b/extensions/sgis_generate_mipmap.glext @@ -0,0 +1 @@ +extension SGIS_generate_mipmap diff --git a/scripts/extgen.py b/scripts/extgen.py index 4ccf27a6..bcff3b44 100755 --- a/scripts/extgen.py +++ b/scripts/extgen.py @@ -1,6 +1,7 @@ #!/usr/bin/python import sys +import os if len(sys.argv)<2: print """Usage: @@ -13,13 +14,34 @@ given to override the version where was promoted to core.""" 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 @@ -103,13 +125,13 @@ for f in funcs: 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 +#include #include namespace Msp { @@ -130,7 +152,7 @@ out.write(""" #endif """) -out = file(ext.lower()+".cpp", "w") +out = file(out_base+".cpp", "w") out.write("#include \"%s.h\"\n"%ext.lower()) out.write(""" diff --git a/source/arb_draw_buffers.cpp b/source/arb_draw_buffers.cpp deleted file mode 100644 index 5f843498..00000000 --- a/source/arb_draw_buffers.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#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(get_proc_address("glDrawBuffers")); - return Extension::CORE; - } - if(is_supported("GL_ARB_draw_buffers")) - { - glDrawBuffers = reinterpret_cast(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 diff --git a/source/arb_draw_buffers.h b/source/arb_draw_buffers.h deleted file mode 100644 index cd2c71bc..00000000 --- a/source/arb_draw_buffers.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSP_GL_ARB_DRAW_BUFFERS_ -#define MSP_GL_ARB_DRAW_BUFFERS_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLDRAWBUFFERSPROC glDrawBuffers; - -extern Extension ARB_draw_buffers; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/arb_fragment_shader.cpp b/source/arb_fragment_shader.cpp deleted file mode 100644 index 18524dcf..00000000 --- a/source/arb_fragment_shader.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 diff --git a/source/arb_fragment_shader.h b/source/arb_fragment_shader.h deleted file mode 100644 index 984f1555..00000000 --- a/source/arb_fragment_shader.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_ARB_FRAGMENT_SHADER_ -#define MSP_GL_ARB_FRAGMENT_SHADER_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension ARB_fragment_shader; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/arb_multitexture.cpp b/source/arb_multitexture.cpp deleted file mode 100644 index 4eeefda3..00000000 --- a/source/arb_multitexture.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#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(get_proc_address("glActiveTexture")); - glClientActiveTexture = reinterpret_cast(get_proc_address("glClientActiveTexture")); - glMultiTexCoord1d = reinterpret_cast(get_proc_address("glMultiTexCoord1d")); - glMultiTexCoord1dv = reinterpret_cast(get_proc_address("glMultiTexCoord1dv")); - glMultiTexCoord1f = reinterpret_cast(get_proc_address("glMultiTexCoord1f")); - glMultiTexCoord1fv = reinterpret_cast(get_proc_address("glMultiTexCoord1fv")); - glMultiTexCoord1i = reinterpret_cast(get_proc_address("glMultiTexCoord1i")); - glMultiTexCoord1iv = reinterpret_cast(get_proc_address("glMultiTexCoord1iv")); - glMultiTexCoord1s = reinterpret_cast(get_proc_address("glMultiTexCoord1s")); - glMultiTexCoord1sv = reinterpret_cast(get_proc_address("glMultiTexCoord1sv")); - glMultiTexCoord2d = reinterpret_cast(get_proc_address("glMultiTexCoord2d")); - glMultiTexCoord2dv = reinterpret_cast(get_proc_address("glMultiTexCoord2dv")); - glMultiTexCoord2f = reinterpret_cast(get_proc_address("glMultiTexCoord2f")); - glMultiTexCoord2fv = reinterpret_cast(get_proc_address("glMultiTexCoord2fv")); - glMultiTexCoord2i = reinterpret_cast(get_proc_address("glMultiTexCoord2i")); - glMultiTexCoord2iv = reinterpret_cast(get_proc_address("glMultiTexCoord2iv")); - glMultiTexCoord2s = reinterpret_cast(get_proc_address("glMultiTexCoord2s")); - glMultiTexCoord2sv = reinterpret_cast(get_proc_address("glMultiTexCoord2sv")); - glMultiTexCoord3d = reinterpret_cast(get_proc_address("glMultiTexCoord3d")); - glMultiTexCoord3dv = reinterpret_cast(get_proc_address("glMultiTexCoord3dv")); - glMultiTexCoord3f = reinterpret_cast(get_proc_address("glMultiTexCoord3f")); - glMultiTexCoord3fv = reinterpret_cast(get_proc_address("glMultiTexCoord3fv")); - glMultiTexCoord3i = reinterpret_cast(get_proc_address("glMultiTexCoord3i")); - glMultiTexCoord3iv = reinterpret_cast(get_proc_address("glMultiTexCoord3iv")); - glMultiTexCoord3s = reinterpret_cast(get_proc_address("glMultiTexCoord3s")); - glMultiTexCoord3sv = reinterpret_cast(get_proc_address("glMultiTexCoord3sv")); - glMultiTexCoord4d = reinterpret_cast(get_proc_address("glMultiTexCoord4d")); - glMultiTexCoord4dv = reinterpret_cast(get_proc_address("glMultiTexCoord4dv")); - glMultiTexCoord4f = reinterpret_cast(get_proc_address("glMultiTexCoord4f")); - glMultiTexCoord4fv = reinterpret_cast(get_proc_address("glMultiTexCoord4fv")); - glMultiTexCoord4i = reinterpret_cast(get_proc_address("glMultiTexCoord4i")); - glMultiTexCoord4iv = reinterpret_cast(get_proc_address("glMultiTexCoord4iv")); - glMultiTexCoord4s = reinterpret_cast(get_proc_address("glMultiTexCoord4s")); - glMultiTexCoord4sv = reinterpret_cast(get_proc_address("glMultiTexCoord4sv")); - return Extension::CORE; - } - if(is_supported("GL_ARB_multitexture")) - { - glActiveTexture = reinterpret_cast(get_proc_address("glActiveTextureARB")); - glClientActiveTexture = reinterpret_cast(get_proc_address("glClientActiveTextureARB")); - glMultiTexCoord1d = reinterpret_cast(get_proc_address("glMultiTexCoord1dARB")); - glMultiTexCoord1dv = reinterpret_cast(get_proc_address("glMultiTexCoord1dvARB")); - glMultiTexCoord1f = reinterpret_cast(get_proc_address("glMultiTexCoord1fARB")); - glMultiTexCoord1fv = reinterpret_cast(get_proc_address("glMultiTexCoord1fvARB")); - glMultiTexCoord1i = reinterpret_cast(get_proc_address("glMultiTexCoord1iARB")); - glMultiTexCoord1iv = reinterpret_cast(get_proc_address("glMultiTexCoord1ivARB")); - glMultiTexCoord1s = reinterpret_cast(get_proc_address("glMultiTexCoord1sARB")); - glMultiTexCoord1sv = reinterpret_cast(get_proc_address("glMultiTexCoord1svARB")); - glMultiTexCoord2d = reinterpret_cast(get_proc_address("glMultiTexCoord2dARB")); - glMultiTexCoord2dv = reinterpret_cast(get_proc_address("glMultiTexCoord2dvARB")); - glMultiTexCoord2f = reinterpret_cast(get_proc_address("glMultiTexCoord2fARB")); - glMultiTexCoord2fv = reinterpret_cast(get_proc_address("glMultiTexCoord2fvARB")); - glMultiTexCoord2i = reinterpret_cast(get_proc_address("glMultiTexCoord2iARB")); - glMultiTexCoord2iv = reinterpret_cast(get_proc_address("glMultiTexCoord2ivARB")); - glMultiTexCoord2s = reinterpret_cast(get_proc_address("glMultiTexCoord2sARB")); - glMultiTexCoord2sv = reinterpret_cast(get_proc_address("glMultiTexCoord2svARB")); - glMultiTexCoord3d = reinterpret_cast(get_proc_address("glMultiTexCoord3dARB")); - glMultiTexCoord3dv = reinterpret_cast(get_proc_address("glMultiTexCoord3dvARB")); - glMultiTexCoord3f = reinterpret_cast(get_proc_address("glMultiTexCoord3fARB")); - glMultiTexCoord3fv = reinterpret_cast(get_proc_address("glMultiTexCoord3fvARB")); - glMultiTexCoord3i = reinterpret_cast(get_proc_address("glMultiTexCoord3iARB")); - glMultiTexCoord3iv = reinterpret_cast(get_proc_address("glMultiTexCoord3ivARB")); - glMultiTexCoord3s = reinterpret_cast(get_proc_address("glMultiTexCoord3sARB")); - glMultiTexCoord3sv = reinterpret_cast(get_proc_address("glMultiTexCoord3svARB")); - glMultiTexCoord4d = reinterpret_cast(get_proc_address("glMultiTexCoord4dARB")); - glMultiTexCoord4dv = reinterpret_cast(get_proc_address("glMultiTexCoord4dvARB")); - glMultiTexCoord4f = reinterpret_cast(get_proc_address("glMultiTexCoord4fARB")); - glMultiTexCoord4fv = reinterpret_cast(get_proc_address("glMultiTexCoord4fvARB")); - glMultiTexCoord4i = reinterpret_cast(get_proc_address("glMultiTexCoord4iARB")); - glMultiTexCoord4iv = reinterpret_cast(get_proc_address("glMultiTexCoord4ivARB")); - glMultiTexCoord4s = reinterpret_cast(get_proc_address("glMultiTexCoord4sARB")); - glMultiTexCoord4sv = reinterpret_cast(get_proc_address("glMultiTexCoord4svARB")); - return Extension::EXTENSION; - } - return Extension::UNSUPPORTED; -} - -Extension ARB_multitexture("GL_ARB_multitexture", init_arb_multitexture); - -} // namespace GL -} // namespace Msp diff --git a/source/arb_multitexture.h b/source/arb_multitexture.h deleted file mode 100644 index 2d275499..00000000 --- a/source/arb_multitexture.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef MSP_GL_ARB_MULTITEXTURE_ -#define MSP_GL_ARB_MULTITEXTURE_ - -#include "extension.h" -#include "gl.h" -#include - -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 diff --git a/source/arb_pixel_buffer_object.cpp b/source/arb_pixel_buffer_object.cpp deleted file mode 100644 index 0243f8bd..00000000 --- a/source/arb_pixel_buffer_object.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 diff --git a/source/arb_pixel_buffer_object.h b/source/arb_pixel_buffer_object.h deleted file mode 100644 index e7819821..00000000 --- a/source/arb_pixel_buffer_object.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_ARB_PIXEL_BUFFER_OBJECT_ -#define MSP_GL_ARB_PIXEL_BUFFER_OBJECT_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension ARB_pixel_buffer_object; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/arb_shader_objects.cpp b/source/arb_shader_objects.cpp deleted file mode 100644 index 61853db2..00000000 --- a/source/arb_shader_objects.cpp +++ /dev/null @@ -1,143 +0,0 @@ -#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(get_proc_address("glAttachShader")); - glCompileShader = reinterpret_cast(get_proc_address("glCompileShader")); - glCreateProgram = reinterpret_cast(get_proc_address("glCreateProgram")); - glCreateShader = reinterpret_cast(get_proc_address("glCreateShader")); - glDeleteProgram = reinterpret_cast(get_proc_address("glDeleteProgram")); - glDeleteShader = reinterpret_cast(get_proc_address("glDeleteShader")); - glDetachShader = reinterpret_cast(get_proc_address("glDetachShader")); - glGetActiveUniform = reinterpret_cast(get_proc_address("glGetActiveUniform")); - glGetAttachedShaders = reinterpret_cast(get_proc_address("glGetAttachedShaders")); - glGetProgramInfoLog = reinterpret_cast(get_proc_address("glGetProgramInfoLog")); - glGetProgramiv = reinterpret_cast(get_proc_address("glGetProgramiv")); - glGetShaderInfoLog = reinterpret_cast(get_proc_address("glGetShaderInfoLog")); - glGetShaderSource = reinterpret_cast(get_proc_address("glGetShaderSource")); - glGetShaderiv = reinterpret_cast(get_proc_address("glGetShaderiv")); - glGetUniformLocation = reinterpret_cast(get_proc_address("glGetUniformLocation")); - glGetUniformfv = reinterpret_cast(get_proc_address("glGetUniformfv")); - glGetUniformiv = reinterpret_cast(get_proc_address("glGetUniformiv")); - glLinkProgram = reinterpret_cast(get_proc_address("glLinkProgram")); - glShaderSource = reinterpret_cast(get_proc_address("glShaderSource")); - glUniform1f = reinterpret_cast(get_proc_address("glUniform1f")); - glUniform1fv = reinterpret_cast(get_proc_address("glUniform1fv")); - glUniform1i = reinterpret_cast(get_proc_address("glUniform1i")); - glUniform1iv = reinterpret_cast(get_proc_address("glUniform1iv")); - glUniform2f = reinterpret_cast(get_proc_address("glUniform2f")); - glUniform2fv = reinterpret_cast(get_proc_address("glUniform2fv")); - glUniform2i = reinterpret_cast(get_proc_address("glUniform2i")); - glUniform2iv = reinterpret_cast(get_proc_address("glUniform2iv")); - glUniform3f = reinterpret_cast(get_proc_address("glUniform3f")); - glUniform3fv = reinterpret_cast(get_proc_address("glUniform3fv")); - glUniform3i = reinterpret_cast(get_proc_address("glUniform3i")); - glUniform3iv = reinterpret_cast(get_proc_address("glUniform3iv")); - glUniform4f = reinterpret_cast(get_proc_address("glUniform4f")); - glUniform4fv = reinterpret_cast(get_proc_address("glUniform4fv")); - glUniform4i = reinterpret_cast(get_proc_address("glUniform4i")); - glUniform4iv = reinterpret_cast(get_proc_address("glUniform4iv")); - glUniformMatrix2fv = reinterpret_cast(get_proc_address("glUniformMatrix2fv")); - glUniformMatrix3fv = reinterpret_cast(get_proc_address("glUniformMatrix3fv")); - glUniformMatrix4fv = reinterpret_cast(get_proc_address("glUniformMatrix4fv")); - glUseProgram = reinterpret_cast(get_proc_address("glUseProgram")); - glValidateProgram = reinterpret_cast(get_proc_address("glValidateProgram")); - return Extension::CORE; - } - if(is_supported("GL_ARB_shader_objects")) - { - glAttachShader = reinterpret_cast(get_proc_address("glAttachObjectARB")); - glCompileShader = reinterpret_cast(get_proc_address("glCompileShaderARB")); - glCreateProgram = reinterpret_cast(get_proc_address("glCreateProgramObjectARB")); - glCreateShader = reinterpret_cast(get_proc_address("glCreateShaderObjectARB")); - glDeleteProgram = reinterpret_cast(get_proc_address("glDeleteObjectARB")); - glDeleteShader = reinterpret_cast(get_proc_address("glDeleteObjectARB")); - glDetachShader = reinterpret_cast(get_proc_address("glDetachObjectARB")); - glGetActiveUniform = reinterpret_cast(get_proc_address("glGetActiveUniformARB")); - glGetAttachedShaders = reinterpret_cast(get_proc_address("glGetAttachedObjectsARB")); - glGetProgramInfoLog = reinterpret_cast(get_proc_address("glGetInfoLogARB")); - glGetProgramiv = reinterpret_cast(get_proc_address("glGetObjectParameterivARB")); - glGetShaderInfoLog = reinterpret_cast(get_proc_address("glGetInfoLogARB")); - glGetShaderSource = reinterpret_cast(get_proc_address("glGetShaderSourceARB")); - glGetShaderiv = reinterpret_cast(get_proc_address("glGetObjectParameterivARB")); - glGetUniformLocation = reinterpret_cast(get_proc_address("glGetUniformLocationARB")); - glGetUniformfv = reinterpret_cast(get_proc_address("glGetUniformfvARB")); - glGetUniformiv = reinterpret_cast(get_proc_address("glGetUniformivARB")); - glLinkProgram = reinterpret_cast(get_proc_address("glLinkProgramARB")); - glShaderSource = reinterpret_cast(get_proc_address("glShaderSourceARB")); - glUniform1f = reinterpret_cast(get_proc_address("glUniform1fARB")); - glUniform1fv = reinterpret_cast(get_proc_address("glUniform1fvARB")); - glUniform1i = reinterpret_cast(get_proc_address("glUniform1iARB")); - glUniform1iv = reinterpret_cast(get_proc_address("glUniform1ivARB")); - glUniform2f = reinterpret_cast(get_proc_address("glUniform2fARB")); - glUniform2fv = reinterpret_cast(get_proc_address("glUniform2fvARB")); - glUniform2i = reinterpret_cast(get_proc_address("glUniform2iARB")); - glUniform2iv = reinterpret_cast(get_proc_address("glUniform2ivARB")); - glUniform3f = reinterpret_cast(get_proc_address("glUniform3fARB")); - glUniform3fv = reinterpret_cast(get_proc_address("glUniform3fvARB")); - glUniform3i = reinterpret_cast(get_proc_address("glUniform3iARB")); - glUniform3iv = reinterpret_cast(get_proc_address("glUniform3ivARB")); - glUniform4f = reinterpret_cast(get_proc_address("glUniform4fARB")); - glUniform4fv = reinterpret_cast(get_proc_address("glUniform4fvARB")); - glUniform4i = reinterpret_cast(get_proc_address("glUniform4iARB")); - glUniform4iv = reinterpret_cast(get_proc_address("glUniform4ivARB")); - glUniformMatrix2fv = reinterpret_cast(get_proc_address("glUniformMatrix2fvARB")); - glUniformMatrix3fv = reinterpret_cast(get_proc_address("glUniformMatrix3fvARB")); - glUniformMatrix4fv = reinterpret_cast(get_proc_address("glUniformMatrix4fvARB")); - glUseProgram = reinterpret_cast(get_proc_address("glUseProgramObjectARB")); - glValidateProgram = reinterpret_cast(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 diff --git a/source/arb_shader_objects.h b/source/arb_shader_objects.h deleted file mode 100644 index c40de633..00000000 --- a/source/arb_shader_objects.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef MSP_GL_ARB_SHADER_OBJECTS_ -#define MSP_GL_ARB_SHADER_OBJECTS_ - -#include "extension.h" -#include "gl.h" -#include - -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 diff --git a/source/arb_texture_cube_map.cpp b/source/arb_texture_cube_map.cpp deleted file mode 100644 index b74993a9..00000000 --- a/source/arb_texture_cube_map.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 diff --git a/source/arb_texture_cube_map.h b/source/arb_texture_cube_map.h deleted file mode 100644 index 3cde6e7d..00000000 --- a/source/arb_texture_cube_map.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_ARB_TEXTURE_CUBE_MAP_ -#define MSP_GL_ARB_TEXTURE_CUBE_MAP_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension ARB_texture_cube_map; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/arb_texture_float.cpp b/source/arb_texture_float.cpp deleted file mode 100644 index 9f76b3fd..00000000 --- a/source/arb_texture_float.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 diff --git a/source/arb_texture_float.h b/source/arb_texture_float.h deleted file mode 100644 index 9eef6148..00000000 --- a/source/arb_texture_float.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_ARB_TEXTURE_FLOAT_ -#define MSP_GL_ARB_TEXTURE_FLOAT_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension ARB_texture_float; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/arb_uniform_buffer_object.cpp b/source/arb_uniform_buffer_object.cpp deleted file mode 100644 index 9b224ffb..00000000 --- a/source/arb_uniform_buffer_object.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#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(get_proc_address("glBindBufferBase")); - glBindBufferRange = reinterpret_cast(get_proc_address("glBindBufferRange")); - glGetActiveUniformBlockName = reinterpret_cast(get_proc_address("glGetActiveUniformBlockName")); - glGetActiveUniformBlockiv = reinterpret_cast(get_proc_address("glGetActiveUniformBlockiv")); - glGetActiveUniformName = reinterpret_cast(get_proc_address("glGetActiveUniformName")); - glGetActiveUniformsiv = reinterpret_cast(get_proc_address("glGetActiveUniformsiv")); - glGetUniformBlockIndex = reinterpret_cast(get_proc_address("glGetUniformBlockIndex")); - glGetUniformIndices = reinterpret_cast(get_proc_address("glGetUniformIndices")); - glUniformBlockBinding = reinterpret_cast(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 diff --git a/source/arb_uniform_buffer_object.h b/source/arb_uniform_buffer_object.h deleted file mode 100644 index 5a259252..00000000 --- a/source/arb_uniform_buffer_object.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MSP_GL_ARB_UNIFORM_BUFFER_OBJECT_ -#define MSP_GL_ARB_UNIFORM_BUFFER_OBJECT_ - -#include "extension.h" -#include "gl.h" -#include - -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 diff --git a/source/arb_vertex_buffer_object.cpp b/source/arb_vertex_buffer_object.cpp deleted file mode 100644 index 431ad401..00000000 --- a/source/arb_vertex_buffer_object.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#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(get_proc_address("glBindBuffer")); - glBufferData = reinterpret_cast(get_proc_address("glBufferData")); - glBufferSubData = reinterpret_cast(get_proc_address("glBufferSubData")); - glDeleteBuffers = reinterpret_cast(get_proc_address("glDeleteBuffers")); - glGenBuffers = reinterpret_cast(get_proc_address("glGenBuffers")); - glGetBufferParameteriv = reinterpret_cast(get_proc_address("glGetBufferParameteriv")); - glGetBufferPointerv = reinterpret_cast(get_proc_address("glGetBufferPointerv")); - glGetBufferSubData = reinterpret_cast(get_proc_address("glGetBufferSubData")); - glIsBuffer = reinterpret_cast(get_proc_address("glIsBuffer")); - glMapBuffer = reinterpret_cast(get_proc_address("glMapBuffer")); - glUnmapBuffer = reinterpret_cast(get_proc_address("glUnmapBuffer")); - return Extension::CORE; - } - if(is_supported("GL_ARB_vertex_buffer_object")) - { - glBindBuffer = reinterpret_cast(get_proc_address("glBindBufferARB")); - glBufferData = reinterpret_cast(get_proc_address("glBufferDataARB")); - glBufferSubData = reinterpret_cast(get_proc_address("glBufferSubDataARB")); - glDeleteBuffers = reinterpret_cast(get_proc_address("glDeleteBuffersARB")); - glGenBuffers = reinterpret_cast(get_proc_address("glGenBuffersARB")); - glGetBufferParameteriv = reinterpret_cast(get_proc_address("glGetBufferParameterivARB")); - glGetBufferPointerv = reinterpret_cast(get_proc_address("glGetBufferPointervARB")); - glGetBufferSubData = reinterpret_cast(get_proc_address("glGetBufferSubDataARB")); - glIsBuffer = reinterpret_cast(get_proc_address("glIsBufferARB")); - glMapBuffer = reinterpret_cast(get_proc_address("glMapBufferARB")); - glUnmapBuffer = reinterpret_cast(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 diff --git a/source/arb_vertex_buffer_object.h b/source/arb_vertex_buffer_object.h deleted file mode 100644 index 2ee37271..00000000 --- a/source/arb_vertex_buffer_object.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef MSP_GL_ARB_VERTEX_BUFFER_OBJECT_ -#define MSP_GL_ARB_VERTEX_BUFFER_OBJECT_ - -#include "extension.h" -#include "gl.h" -#include - -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 diff --git a/source/arb_vertex_shader.cpp b/source/arb_vertex_shader.cpp deleted file mode 100644 index b201802e..00000000 --- a/source/arb_vertex_shader.cpp +++ /dev/null @@ -1,161 +0,0 @@ -#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(get_proc_address("glBindAttribLocation")); - glDisableVertexAttribArray = reinterpret_cast(get_proc_address("glDisableVertexAttribArray")); - glEnableVertexAttribArray = reinterpret_cast(get_proc_address("glEnableVertexAttribArray")); - glGetActiveAttrib = reinterpret_cast(get_proc_address("glGetActiveAttrib")); - glGetAttribLocation = reinterpret_cast(get_proc_address("glGetAttribLocation")); - glGetVertexAttribPointerv = reinterpret_cast(get_proc_address("glGetVertexAttribPointerv")); - glGetVertexAttribdv = reinterpret_cast(get_proc_address("glGetVertexAttribdv")); - glGetVertexAttribfv = reinterpret_cast(get_proc_address("glGetVertexAttribfv")); - glGetVertexAttribiv = reinterpret_cast(get_proc_address("glGetVertexAttribiv")); - glVertexAttrib1d = reinterpret_cast(get_proc_address("glVertexAttrib1d")); - glVertexAttrib1dv = reinterpret_cast(get_proc_address("glVertexAttrib1dv")); - glVertexAttrib1f = reinterpret_cast(get_proc_address("glVertexAttrib1f")); - glVertexAttrib1fv = reinterpret_cast(get_proc_address("glVertexAttrib1fv")); - glVertexAttrib1s = reinterpret_cast(get_proc_address("glVertexAttrib1s")); - glVertexAttrib1sv = reinterpret_cast(get_proc_address("glVertexAttrib1sv")); - glVertexAttrib2d = reinterpret_cast(get_proc_address("glVertexAttrib2d")); - glVertexAttrib2dv = reinterpret_cast(get_proc_address("glVertexAttrib2dv")); - glVertexAttrib2f = reinterpret_cast(get_proc_address("glVertexAttrib2f")); - glVertexAttrib2fv = reinterpret_cast(get_proc_address("glVertexAttrib2fv")); - glVertexAttrib2s = reinterpret_cast(get_proc_address("glVertexAttrib2s")); - glVertexAttrib2sv = reinterpret_cast(get_proc_address("glVertexAttrib2sv")); - glVertexAttrib3d = reinterpret_cast(get_proc_address("glVertexAttrib3d")); - glVertexAttrib3dv = reinterpret_cast(get_proc_address("glVertexAttrib3dv")); - glVertexAttrib3f = reinterpret_cast(get_proc_address("glVertexAttrib3f")); - glVertexAttrib3fv = reinterpret_cast(get_proc_address("glVertexAttrib3fv")); - glVertexAttrib3s = reinterpret_cast(get_proc_address("glVertexAttrib3s")); - glVertexAttrib3sv = reinterpret_cast(get_proc_address("glVertexAttrib3sv")); - glVertexAttrib4Nbv = reinterpret_cast(get_proc_address("glVertexAttrib4Nbv")); - glVertexAttrib4Niv = reinterpret_cast(get_proc_address("glVertexAttrib4Niv")); - glVertexAttrib4Nsv = reinterpret_cast(get_proc_address("glVertexAttrib4Nsv")); - glVertexAttrib4Nub = reinterpret_cast(get_proc_address("glVertexAttrib4Nub")); - glVertexAttrib4Nubv = reinterpret_cast(get_proc_address("glVertexAttrib4Nubv")); - glVertexAttrib4Nuiv = reinterpret_cast(get_proc_address("glVertexAttrib4Nuiv")); - glVertexAttrib4Nusv = reinterpret_cast(get_proc_address("glVertexAttrib4Nusv")); - glVertexAttrib4bv = reinterpret_cast(get_proc_address("glVertexAttrib4bv")); - glVertexAttrib4d = reinterpret_cast(get_proc_address("glVertexAttrib4d")); - glVertexAttrib4dv = reinterpret_cast(get_proc_address("glVertexAttrib4dv")); - glVertexAttrib4f = reinterpret_cast(get_proc_address("glVertexAttrib4f")); - glVertexAttrib4fv = reinterpret_cast(get_proc_address("glVertexAttrib4fv")); - glVertexAttrib4iv = reinterpret_cast(get_proc_address("glVertexAttrib4iv")); - glVertexAttrib4s = reinterpret_cast(get_proc_address("glVertexAttrib4s")); - glVertexAttrib4sv = reinterpret_cast(get_proc_address("glVertexAttrib4sv")); - glVertexAttrib4ubv = reinterpret_cast(get_proc_address("glVertexAttrib4ubv")); - glVertexAttrib4uiv = reinterpret_cast(get_proc_address("glVertexAttrib4uiv")); - glVertexAttrib4usv = reinterpret_cast(get_proc_address("glVertexAttrib4usv")); - glVertexAttribPointer = reinterpret_cast(get_proc_address("glVertexAttribPointer")); - return Extension::CORE; - } - if(is_supported("GL_ARB_vertex_shader")) - { - glBindAttribLocation = reinterpret_cast(get_proc_address("glBindAttribLocationARB")); - glDisableVertexAttribArray = reinterpret_cast(get_proc_address("glDisableVertexAttribArrayARB")); - glEnableVertexAttribArray = reinterpret_cast(get_proc_address("glEnableVertexAttribArrayARB")); - glGetActiveAttrib = reinterpret_cast(get_proc_address("glGetActiveAttribARB")); - glGetAttribLocation = reinterpret_cast(get_proc_address("glGetAttribLocationARB")); - glGetVertexAttribPointerv = reinterpret_cast(get_proc_address("glGetVertexAttribPointervARB")); - glGetVertexAttribdv = reinterpret_cast(get_proc_address("glGetVertexAttribdvARB")); - glGetVertexAttribfv = reinterpret_cast(get_proc_address("glGetVertexAttribfvARB")); - glGetVertexAttribiv = reinterpret_cast(get_proc_address("glGetVertexAttribivARB")); - glVertexAttrib1d = reinterpret_cast(get_proc_address("glVertexAttrib1dARB")); - glVertexAttrib1dv = reinterpret_cast(get_proc_address("glVertexAttrib1dvARB")); - glVertexAttrib1f = reinterpret_cast(get_proc_address("glVertexAttrib1fARB")); - glVertexAttrib1fv = reinterpret_cast(get_proc_address("glVertexAttrib1fvARB")); - glVertexAttrib1s = reinterpret_cast(get_proc_address("glVertexAttrib1sARB")); - glVertexAttrib1sv = reinterpret_cast(get_proc_address("glVertexAttrib1svARB")); - glVertexAttrib2d = reinterpret_cast(get_proc_address("glVertexAttrib2dARB")); - glVertexAttrib2dv = reinterpret_cast(get_proc_address("glVertexAttrib2dvARB")); - glVertexAttrib2f = reinterpret_cast(get_proc_address("glVertexAttrib2fARB")); - glVertexAttrib2fv = reinterpret_cast(get_proc_address("glVertexAttrib2fvARB")); - glVertexAttrib2s = reinterpret_cast(get_proc_address("glVertexAttrib2sARB")); - glVertexAttrib2sv = reinterpret_cast(get_proc_address("glVertexAttrib2svARB")); - glVertexAttrib3d = reinterpret_cast(get_proc_address("glVertexAttrib3dARB")); - glVertexAttrib3dv = reinterpret_cast(get_proc_address("glVertexAttrib3dvARB")); - glVertexAttrib3f = reinterpret_cast(get_proc_address("glVertexAttrib3fARB")); - glVertexAttrib3fv = reinterpret_cast(get_proc_address("glVertexAttrib3fvARB")); - glVertexAttrib3s = reinterpret_cast(get_proc_address("glVertexAttrib3sARB")); - glVertexAttrib3sv = reinterpret_cast(get_proc_address("glVertexAttrib3svARB")); - glVertexAttrib4Nbv = reinterpret_cast(get_proc_address("glVertexAttrib4NbvARB")); - glVertexAttrib4Niv = reinterpret_cast(get_proc_address("glVertexAttrib4NivARB")); - glVertexAttrib4Nsv = reinterpret_cast(get_proc_address("glVertexAttrib4NsvARB")); - glVertexAttrib4Nub = reinterpret_cast(get_proc_address("glVertexAttrib4NubARB")); - glVertexAttrib4Nubv = reinterpret_cast(get_proc_address("glVertexAttrib4NubvARB")); - glVertexAttrib4Nuiv = reinterpret_cast(get_proc_address("glVertexAttrib4NuivARB")); - glVertexAttrib4Nusv = reinterpret_cast(get_proc_address("glVertexAttrib4NusvARB")); - glVertexAttrib4bv = reinterpret_cast(get_proc_address("glVertexAttrib4bvARB")); - glVertexAttrib4d = reinterpret_cast(get_proc_address("glVertexAttrib4dARB")); - glVertexAttrib4dv = reinterpret_cast(get_proc_address("glVertexAttrib4dvARB")); - glVertexAttrib4f = reinterpret_cast(get_proc_address("glVertexAttrib4fARB")); - glVertexAttrib4fv = reinterpret_cast(get_proc_address("glVertexAttrib4fvARB")); - glVertexAttrib4iv = reinterpret_cast(get_proc_address("glVertexAttrib4ivARB")); - glVertexAttrib4s = reinterpret_cast(get_proc_address("glVertexAttrib4sARB")); - glVertexAttrib4sv = reinterpret_cast(get_proc_address("glVertexAttrib4svARB")); - glVertexAttrib4ubv = reinterpret_cast(get_proc_address("glVertexAttrib4ubvARB")); - glVertexAttrib4uiv = reinterpret_cast(get_proc_address("glVertexAttrib4uivARB")); - glVertexAttrib4usv = reinterpret_cast(get_proc_address("glVertexAttrib4usvARB")); - glVertexAttribPointer = reinterpret_cast(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 diff --git a/source/arb_vertex_shader.h b/source/arb_vertex_shader.h deleted file mode 100644 index a6b5ffc1..00000000 --- a/source/arb_vertex_shader.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef MSP_GL_ARB_VERTEX_SHADER_ -#define MSP_GL_ARB_VERTEX_SHADER_ - -#include "extension.h" -#include "gl.h" -#include - -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 diff --git a/source/batch.cpp b/source/batch.cpp index 8807b2c5..956fe130 100644 --- a/source/batch.cpp +++ b/source/batch.cpp @@ -1,9 +1,9 @@ +#include +#include #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; diff --git a/source/blend.cpp b/source/blend.cpp index cecd562d..9c87aeb5 100644 --- a/source/blend.cpp +++ b/source/blend.cpp @@ -1,6 +1,6 @@ +#include +#include #include "blend.h" -#include "ext_blend_minmax.h" -#include "ext_blend_subtract.h" namespace Msp { namespace GL { diff --git a/source/buffer.cpp b/source/buffer.cpp index 5a0f4762..a502190f 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -1,7 +1,7 @@ #include -#include "arb_pixel_buffer_object.h" -#include "arb_uniform_buffer_object.h" -#include "arb_vertex_buffer_object.h" +#include +#include +#include #include "buffer.h" #include "misc.h" diff --git a/source/ext_bgra.cpp b/source/ext_bgra.cpp deleted file mode 100644 index d104717b..00000000 --- a/source/ext_bgra.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 diff --git a/source/ext_bgra.h b/source/ext_bgra.h deleted file mode 100644 index b4ac19d9..00000000 --- a/source/ext_bgra.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_EXT_BGRA_ -#define MSP_GL_EXT_BGRA_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension EXT_bgra; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_blend_minmax.cpp b/source/ext_blend_minmax.cpp deleted file mode 100644 index 3db30bfb..00000000 --- a/source/ext_blend_minmax.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#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(get_proc_address("glBlendEquation")); - return Extension::CORE; - } - if(is_supported("GL_EXT_blend_minmax")) - { - glBlendEquation = reinterpret_cast(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 diff --git a/source/ext_blend_minmax.h b/source/ext_blend_minmax.h deleted file mode 100644 index a2d3ff34..00000000 --- a/source/ext_blend_minmax.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSP_GL_EXT_BLEND_MINMAX_ -#define MSP_GL_EXT_BLEND_MINMAX_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLBLENDEQUATIONEXTPROC glBlendEquation; - -extern Extension EXT_blend_minmax; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_blend_subtract.cpp b/source/ext_blend_subtract.cpp deleted file mode 100644 index f15f3f50..00000000 --- a/source/ext_blend_subtract.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 diff --git a/source/ext_blend_subtract.h b/source/ext_blend_subtract.h deleted file mode 100644 index 243d5301..00000000 --- a/source/ext_blend_subtract.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_EXT_BLEND_SUBTRACT_ -#define MSP_GL_EXT_BLEND_SUBTRACT_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension EXT_blend_subtract; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_draw_range_elements.cpp b/source/ext_draw_range_elements.cpp deleted file mode 100644 index 95af7b23..00000000 --- a/source/ext_draw_range_elements.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#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(get_proc_address("glDrawRangeElements")); - return Extension::CORE; - } - if(is_supported("GL_EXT_draw_range_elements")) - { - glDrawRangeElements = reinterpret_cast(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 diff --git a/source/ext_draw_range_elements.h b/source/ext_draw_range_elements.h deleted file mode 100644 index dea955f4..00000000 --- a/source/ext_draw_range_elements.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSP_GL_EXT_DRAW_RANGE_ELEMENTS_ -#define MSP_GL_EXT_DRAW_RANGE_ELEMENTS_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLDRAWRANGEELEMENTSEXTPROC glDrawRangeElements; - -extern Extension EXT_draw_range_elements; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_framebuffer_blit.cpp b/source/ext_framebuffer_blit.cpp deleted file mode 100644 index 6fec8a68..00000000 --- a/source/ext_framebuffer_blit.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#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(get_proc_address("glBlitFramebuffer")); - return Extension::CORE; - } - if(is_supported("GL_EXT_framebuffer_blit")) - { - glBlitFramebuffer = reinterpret_cast(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 diff --git a/source/ext_framebuffer_blit.h b/source/ext_framebuffer_blit.h deleted file mode 100644 index 54197692..00000000 --- a/source/ext_framebuffer_blit.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSP_GL_EXT_FRAMEBUFFER_BLIT_ -#define MSP_GL_EXT_FRAMEBUFFER_BLIT_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLBLITFRAMEBUFFEREXTPROC glBlitFramebuffer; - -extern Extension EXT_framebuffer_blit; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_framebuffer_multisample.cpp b/source/ext_framebuffer_multisample.cpp deleted file mode 100644 index dd733e49..00000000 --- a/source/ext_framebuffer_multisample.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#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(get_proc_address("glRenderbufferStorageMultisample")); - return Extension::CORE; - } - if(is_supported("GL_EXT_framebuffer_multisample")) - { - glRenderbufferStorageMultisample = reinterpret_cast(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 diff --git a/source/ext_framebuffer_multisample.h b/source/ext_framebuffer_multisample.h deleted file mode 100644 index 7d2f20f5..00000000 --- a/source/ext_framebuffer_multisample.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSP_GL_EXT_FRAMEBUFFER_MULTISAMPLE_ -#define MSP_GL_EXT_FRAMEBUFFER_MULTISAMPLE_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisample; - -extern Extension EXT_framebuffer_multisample; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_framebuffer_object.cpp b/source/ext_framebuffer_object.cpp deleted file mode 100644 index a89b5743..00000000 --- a/source/ext_framebuffer_object.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#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(get_proc_address("glBindFramebuffer")); - glBindRenderbuffer = reinterpret_cast(get_proc_address("glBindRenderbuffer")); - glCheckFramebufferStatus = reinterpret_cast(get_proc_address("glCheckFramebufferStatus")); - glDeleteFramebuffers = reinterpret_cast(get_proc_address("glDeleteFramebuffers")); - glDeleteRenderbuffers = reinterpret_cast(get_proc_address("glDeleteRenderbuffers")); - glFramebufferRenderbuffer = reinterpret_cast(get_proc_address("glFramebufferRenderbuffer")); - glFramebufferTexture1D = reinterpret_cast(get_proc_address("glFramebufferTexture1D")); - glFramebufferTexture2D = reinterpret_cast(get_proc_address("glFramebufferTexture2D")); - glFramebufferTexture3D = reinterpret_cast(get_proc_address("glFramebufferTexture3D")); - glGenFramebuffers = reinterpret_cast(get_proc_address("glGenFramebuffers")); - glGenRenderbuffers = reinterpret_cast(get_proc_address("glGenRenderbuffers")); - glGenerateMipmap = reinterpret_cast(get_proc_address("glGenerateMipmap")); - glGetFramebufferAttachmentParameteriv = reinterpret_cast(get_proc_address("glGetFramebufferAttachmentParameteriv")); - glGetRenderbufferParameteriv = reinterpret_cast(get_proc_address("glGetRenderbufferParameteriv")); - glIsFramebuffer = reinterpret_cast(get_proc_address("glIsFramebuffer")); - glIsRenderbuffer = reinterpret_cast(get_proc_address("glIsRenderbuffer")); - glRenderbufferStorage = reinterpret_cast(get_proc_address("glRenderbufferStorage")); - return Extension::CORE; - } - if(is_supported("GL_EXT_framebuffer_object")) - { - glBindFramebuffer = reinterpret_cast(get_proc_address("glBindFramebufferEXT")); - glBindRenderbuffer = reinterpret_cast(get_proc_address("glBindRenderbufferEXT")); - glCheckFramebufferStatus = reinterpret_cast(get_proc_address("glCheckFramebufferStatusEXT")); - glDeleteFramebuffers = reinterpret_cast(get_proc_address("glDeleteFramebuffersEXT")); - glDeleteRenderbuffers = reinterpret_cast(get_proc_address("glDeleteRenderbuffersEXT")); - glFramebufferRenderbuffer = reinterpret_cast(get_proc_address("glFramebufferRenderbufferEXT")); - glFramebufferTexture1D = reinterpret_cast(get_proc_address("glFramebufferTexture1DEXT")); - glFramebufferTexture2D = reinterpret_cast(get_proc_address("glFramebufferTexture2DEXT")); - glFramebufferTexture3D = reinterpret_cast(get_proc_address("glFramebufferTexture3DEXT")); - glGenFramebuffers = reinterpret_cast(get_proc_address("glGenFramebuffersEXT")); - glGenRenderbuffers = reinterpret_cast(get_proc_address("glGenRenderbuffersEXT")); - glGenerateMipmap = reinterpret_cast(get_proc_address("glGenerateMipmapEXT")); - glGetFramebufferAttachmentParameteriv = reinterpret_cast(get_proc_address("glGetFramebufferAttachmentParameterivEXT")); - glGetRenderbufferParameteriv = reinterpret_cast(get_proc_address("glGetRenderbufferParameterivEXT")); - glIsFramebuffer = reinterpret_cast(get_proc_address("glIsFramebufferEXT")); - glIsRenderbuffer = reinterpret_cast(get_proc_address("glIsRenderbufferEXT")); - glRenderbufferStorage = reinterpret_cast(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 diff --git a/source/ext_framebuffer_object.h b/source/ext_framebuffer_object.h deleted file mode 100644 index be5ea10d..00000000 --- a/source/ext_framebuffer_object.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef MSP_GL_EXT_FRAMEBUFFER_OBJECT_ -#define MSP_GL_EXT_FRAMEBUFFER_OBJECT_ - -#include "extension.h" -#include "gl.h" -#include - -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 diff --git a/source/ext_texture3d.cpp b/source/ext_texture3d.cpp deleted file mode 100644 index d3e3c5f5..00000000 --- a/source/ext_texture3d.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#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(get_proc_address("glTexImage3D")); - glTexSubImage3D = reinterpret_cast(get_proc_address("glTexSubImage3D")); - return Extension::CORE; - } - if(is_supported("GL_EXT_texture3D")) - { - glTexImage3D = reinterpret_cast(get_proc_address("glTexImage3DEXT")); - glTexSubImage3D = reinterpret_cast(get_proc_address("glTexSubImage3DEXT")); - return Extension::EXTENSION; - } - return Extension::UNSUPPORTED; -} - -Extension EXT_texture3D("GL_EXT_texture3D", init_ext_texture3d); - -} // namespace GL -} // namespace Msp diff --git a/source/ext_texture3d.h b/source/ext_texture3d.h deleted file mode 100644 index c6689108..00000000 --- a/source/ext_texture3d.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MSP_GL_EXT_TEXTURE3D_ -#define MSP_GL_EXT_TEXTURE3D_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLTEXIMAGE3DEXTPROC glTexImage3D; -extern PFNGLTEXSUBIMAGE3DEXTPROC glTexSubImage3D; - -extern Extension EXT_texture3D; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/ext_texture_filter_anisotropic.cpp b/source/ext_texture_filter_anisotropic.cpp deleted file mode 100644 index e93249b0..00000000 --- a/source/ext_texture_filter_anisotropic.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#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 diff --git a/source/ext_texture_filter_anisotropic.h b/source/ext_texture_filter_anisotropic.h deleted file mode 100644 index be7f5b14..00000000 --- a/source/ext_texture_filter_anisotropic.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_EXT_TEXTURE_FILTER_ANISOTROPIC_ -#define MSP_GL_EXT_TEXTURE_FILTER_ANISOTROPIC_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension EXT_texture_filter_anisotropic; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/framebuffer.cpp b/source/framebuffer.cpp index 4d6c1752..8e8be663 100644 --- a/source/framebuffer.cpp +++ b/source/framebuffer.cpp @@ -1,7 +1,7 @@ -#include "arb_draw_buffers.h" +#include +#include +#include #include "error.h" -#include "ext_framebuffer_blit.h" -#include "ext_framebuffer_object.h" #include "framebuffer.h" #include "misc.h" #include "renderbuffer.h" diff --git a/source/nv_primitive_restart.cpp b/source/nv_primitive_restart.cpp deleted file mode 100644 index ed5a2664..00000000 --- a/source/nv_primitive_restart.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#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(get_proc_address("glPrimitiveRestartIndexNV")); - glPrimitiveRestartNV = reinterpret_cast(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 diff --git a/source/nv_primitive_restart.h b/source/nv_primitive_restart.h deleted file mode 100644 index 87358435..00000000 --- a/source/nv_primitive_restart.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MSP_GL_NV_PRIMITIVE_RESTART_ -#define MSP_GL_NV_PRIMITIVE_RESTART_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern PFNGLPRIMITIVERESTARTINDEXNVPROC glPrimitiveRestartIndexNV; -extern PFNGLPRIMITIVERESTARTNVPROC glPrimitiveRestartNV; - -extern Extension NV_primitive_restart; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/pixelformat.cpp b/source/pixelformat.cpp index 4b3dade1..836012f9 100644 --- a/source/pixelformat.cpp +++ b/source/pixelformat.cpp @@ -1,6 +1,6 @@ +#include +#include #include -#include "arb_texture_float.h" -#include "ext_bgra.h" #include "pixelformat.h" using namespace std; diff --git a/source/program.cpp b/source/program.cpp index 95102fe9..61610493 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -2,10 +2,10 @@ #include #include #include +#include +#include +#include #include -#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" diff --git a/source/programdata.cpp b/source/programdata.cpp index 69fcdbe0..943dcfaf 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -1,4 +1,4 @@ -#include "arb_shader_objects.h" +#include #include "buffer.h" #include "color.h" #include "error.h" diff --git a/source/renderbuffer.cpp b/source/renderbuffer.cpp index 8f0b582a..89b25500 100644 --- a/source/renderbuffer.cpp +++ b/source/renderbuffer.cpp @@ -1,5 +1,5 @@ -#include "ext_framebuffer_multisample.h" -#include "ext_framebuffer_object.h" +#include +#include #include "renderbuffer.h" namespace Msp { diff --git a/source/sgis_generate_mipmap.cpp b/source/sgis_generate_mipmap.cpp deleted file mode 100644 index 50805172..00000000 --- a/source/sgis_generate_mipmap.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#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 diff --git a/source/sgis_generate_mipmap.h b/source/sgis_generate_mipmap.h deleted file mode 100644 index 86d8802b..00000000 --- a/source/sgis_generate_mipmap.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSP_GL_SGIS_GENERATE_MIPMAP_ -#define MSP_GL_SGIS_GENERATE_MIPMAP_ - -#include "extension.h" -#include "gl.h" -#include - -namespace Msp { -namespace GL { - -extern Extension SGIS_generate_mipmap; - -} // namespace GL -} // namespace Msp - -#endif diff --git a/source/shader.cpp b/source/shader.cpp index 0da1a6e9..a1c576d8 100644 --- a/source/shader.cpp +++ b/source/shader.cpp @@ -1,6 +1,6 @@ -#include "arb_fragment_shader.h" -#include "arb_shader_objects.h" -#include "arb_vertex_shader.h" +#include +#include +#include #include "error.h" #include "shader.h" diff --git a/source/texture.cpp b/source/texture.cpp index e4d4ebf2..3bd1df67 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -1,7 +1,7 @@ +#include +#include #include #include "error.h" -#include "ext_texture_filter_anisotropic.h" -#include "sgis_generate_mipmap.h" #include "texture.h" #include "texunit.h" diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 95b96903..73c4b817 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -1,8 +1,8 @@ #include +#include #include #include "bindable.h" #include "error.h" -#include "ext_texture3d.h" #include "texture3d.h" using namespace std; diff --git a/source/texturecube.cpp b/source/texturecube.cpp index ef9d2529..1b2193b3 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -1,4 +1,4 @@ -#include "arb_texture_cube_map.h" +#include #include "bindable.h" #include "error.h" #include "texturecube.h" diff --git a/source/texunit.cpp b/source/texunit.cpp index 0a5f9bf3..aa52aed4 100644 --- a/source/texunit.cpp +++ b/source/texunit.cpp @@ -1,6 +1,6 @@ #include -#include "arb_multitexture.h" -#include "arb_vertex_shader.h" +#include +#include #include "gl.h" #include "texunit.h" diff --git a/source/uniform.cpp b/source/uniform.cpp index 943600e0..7ebfc3e0 100644 --- a/source/uniform.cpp +++ b/source/uniform.cpp @@ -1,4 +1,4 @@ -#include "arb_shader_objects.h" +#include #include "uniform.h" namespace Msp { diff --git a/source/vertexarray.cpp b/source/vertexarray.cpp index 527052e9..5065f305 100644 --- a/source/vertexarray.cpp +++ b/source/vertexarray.cpp @@ -1,5 +1,5 @@ -#include "arb_multitexture.h" -#include "arb_vertex_shader.h" +#include +#include #include "buffer.h" #include "error.h" #include "gl.h" -- 2.45.2