From: Mikko Rasa Date: Sat, 15 Jun 2013 18:15:22 +0000 (+0300) Subject: Function pointer typedefs for core functions are not available everywhere X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=27abdf9ad5d5e297fd74ddc23b39b0c7817a20d8;p=libs%2Fgl.git Function pointer typedefs for core functions are not available everywhere --- diff --git a/scripts/extgen.py b/scripts/extgen.py index d6727123..4ccf27a6 100755 --- a/scripts/extgen.py +++ b/scripts/extgen.py @@ -23,6 +23,7 @@ bp_ext = None class Function: def __init__(self, name): self.name = name + self.typedef = None self.version = None self.category = None self.vectorequiv = None @@ -89,12 +90,15 @@ funcs.sort(key=(lambda f: f.name)) for f in funcs: if f.extfunc: + f.typedef = "PFNGL%sPROC"%f.extfunc.name.upper() if not ver: ver = f.version if not f.category.startswith("VERSION_"): bp_ext = f.category - if not f.extfunc and not f.name.endswith(exttype): - bp_ext = f.category + else: + f.typedef = "PFNGL%sPROC"%f.name.upper() + if not f.name.endswith(exttype): + bp_ext = f.category if ver: ver = map(int, ver.split('.')) @@ -115,7 +119,7 @@ namespace GL { if funcs: out.write("\n") for f in funcs: - out.write("extern PFNGL%sPROC gl%s;\n"%(f.name.upper(), f.name)) + out.write("extern %s gl%s;\n"%(f.typedef, f.name)) out.write("\nextern Extension %s;\n"%ext) @@ -137,7 +141,7 @@ namespace GL { if funcs: out.write("\n") for f in funcs: - out.write("PFNGL%sPROC gl%s = 0;\n"%(f.name.upper(), f.name)) + out.write("%s gl%s = 0;\n"%(f.typedef, f.name)) out.write("\nExtension::SupportLevel init_%s()\n{\n"%ext.lower()) if ver: @@ -146,7 +150,7 @@ if ver: out.write(" || is_supported(\"GL_%s\")"%bp_ext) out.write(")\n\t{\n") for f in funcs: - out.write("\t\tgl%s = reinterpret_cast(get_proc_address(\"gl%s\"));\n"%(f.name, f.name.upper(), f.name)) + out.write("\t\tgl%s = reinterpret_cast<%s>(get_proc_address(\"gl%s\"));\n"%(f.name, f.typedef, f.name)) out.write("\t\treturn Extension::CORE;\n") out.write("\t}\n") if ext!=bp_ext: @@ -155,7 +159,7 @@ if ext!=bp_ext: n = f.name if f.extfunc: n = f.extfunc.name - out.write("\t\tgl%s = reinterpret_cast(get_proc_address(\"gl%s\"));\n"%(f.name, f.name.upper(), n)) + out.write("\t\tgl%s = reinterpret_cast<%s>(get_proc_address(\"gl%s\"));\n"%(f.name, f.typedef, n)) out.write("\t\treturn Extension::EXTENSION;\n") out.write("\t}\n") out.write("\treturn Extension::UNSUPPORTED;\n") diff --git a/source/arb_multitexture.cpp b/source/arb_multitexture.cpp index 391b0455..4eeefda3 100644 --- a/source/arb_multitexture.cpp +++ b/source/arb_multitexture.cpp @@ -3,117 +3,117 @@ namespace Msp { namespace GL { -PFNGLACTIVETEXTUREPROC glActiveTexture = 0; -PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture = 0; -PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d = 0; -PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv = 0; -PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f = 0; -PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv = 0; -PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i = 0; -PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv = 0; -PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s = 0; -PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv = 0; -PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d = 0; -PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv = 0; -PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f = 0; -PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv = 0; -PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i = 0; -PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv = 0; -PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s = 0; -PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv = 0; -PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d = 0; -PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv = 0; -PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f = 0; -PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv = 0; -PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i = 0; -PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv = 0; -PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s = 0; -PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv = 0; -PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d = 0; -PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv = 0; -PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f = 0; -PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv = 0; -PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i = 0; -PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv = 0; -PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s = 0; -PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv = 0; +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")); + 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")); + 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; diff --git a/source/arb_multitexture.h b/source/arb_multitexture.h index 4c41f095..2d275499 100644 --- a/source/arb_multitexture.h +++ b/source/arb_multitexture.h @@ -8,40 +8,40 @@ namespace Msp { namespace GL { -extern PFNGLACTIVETEXTUREPROC glActiveTexture; -extern PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture; -extern PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d; -extern PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv; -extern PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f; -extern PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv; -extern PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i; -extern PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv; -extern PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s; -extern PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv; -extern PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d; -extern PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv; -extern PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f; -extern PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv; -extern PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i; -extern PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv; -extern PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s; -extern PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv; -extern PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d; -extern PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv; -extern PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f; -extern PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv; -extern PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i; -extern PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv; -extern PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s; -extern PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv; -extern PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d; -extern PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv; -extern PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f; -extern PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv; -extern PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i; -extern PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv; -extern PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s; -extern PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv; +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; diff --git a/source/arb_shader_objects.cpp b/source/arb_shader_objects.cpp index 3cb31bc5..61853db2 100644 --- a/source/arb_shader_objects.cpp +++ b/source/arb_shader_objects.cpp @@ -3,135 +3,135 @@ namespace Msp { namespace GL { -PFNGLATTACHSHADERPROC glAttachShader = 0; -PFNGLCOMPILESHADERPROC glCompileShader = 0; -PFNGLCREATEPROGRAMPROC glCreateProgram = 0; -PFNGLCREATESHADERPROC glCreateShader = 0; -PFNGLDELETEPROGRAMPROC glDeleteProgram = 0; -PFNGLDELETESHADERPROC glDeleteShader = 0; -PFNGLDETACHSHADERPROC glDetachShader = 0; -PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform = 0; -PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders = 0; -PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog = 0; -PFNGLGETPROGRAMIVPROC glGetProgramiv = 0; -PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog = 0; -PFNGLGETSHADERSOURCEPROC glGetShaderSource = 0; -PFNGLGETSHADERIVPROC glGetShaderiv = 0; -PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation = 0; -PFNGLGETUNIFORMFVPROC glGetUniformfv = 0; -PFNGLGETUNIFORMIVPROC glGetUniformiv = 0; -PFNGLLINKPROGRAMPROC glLinkProgram = 0; -PFNGLSHADERSOURCEPROC glShaderSource = 0; -PFNGLUNIFORM1FPROC glUniform1f = 0; -PFNGLUNIFORM1FVPROC glUniform1fv = 0; -PFNGLUNIFORM1IPROC glUniform1i = 0; -PFNGLUNIFORM1IVPROC glUniform1iv = 0; -PFNGLUNIFORM2FPROC glUniform2f = 0; -PFNGLUNIFORM2FVPROC glUniform2fv = 0; -PFNGLUNIFORM2IPROC glUniform2i = 0; -PFNGLUNIFORM2IVPROC glUniform2iv = 0; -PFNGLUNIFORM3FPROC glUniform3f = 0; -PFNGLUNIFORM3FVPROC glUniform3fv = 0; -PFNGLUNIFORM3IPROC glUniform3i = 0; -PFNGLUNIFORM3IVPROC glUniform3iv = 0; -PFNGLUNIFORM4FPROC glUniform4f = 0; -PFNGLUNIFORM4FVPROC glUniform4fv = 0; -PFNGLUNIFORM4IPROC glUniform4i = 0; -PFNGLUNIFORM4IVPROC glUniform4iv = 0; -PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv = 0; -PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv = 0; -PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv = 0; -PFNGLUSEPROGRAMPROC glUseProgram = 0; -PFNGLVALIDATEPROGRAMPROC glValidateProgram = 0; +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")); + 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")); + 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; diff --git a/source/arb_shader_objects.h b/source/arb_shader_objects.h index 6b35cee1..c40de633 100644 --- a/source/arb_shader_objects.h +++ b/source/arb_shader_objects.h @@ -8,46 +8,46 @@ namespace Msp { namespace GL { -extern PFNGLATTACHSHADERPROC glAttachShader; -extern PFNGLCOMPILESHADERPROC glCompileShader; -extern PFNGLCREATEPROGRAMPROC glCreateProgram; -extern PFNGLCREATESHADERPROC glCreateShader; -extern PFNGLDELETEPROGRAMPROC glDeleteProgram; -extern PFNGLDELETESHADERPROC glDeleteShader; -extern PFNGLDETACHSHADERPROC glDetachShader; -extern PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform; -extern PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders; -extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog; -extern PFNGLGETPROGRAMIVPROC glGetProgramiv; -extern PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog; -extern PFNGLGETSHADERSOURCEPROC glGetShaderSource; -extern PFNGLGETSHADERIVPROC glGetShaderiv; -extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation; -extern PFNGLGETUNIFORMFVPROC glGetUniformfv; -extern PFNGLGETUNIFORMIVPROC glGetUniformiv; -extern PFNGLLINKPROGRAMPROC glLinkProgram; -extern PFNGLSHADERSOURCEPROC glShaderSource; -extern PFNGLUNIFORM1FPROC glUniform1f; -extern PFNGLUNIFORM1FVPROC glUniform1fv; -extern PFNGLUNIFORM1IPROC glUniform1i; -extern PFNGLUNIFORM1IVPROC glUniform1iv; -extern PFNGLUNIFORM2FPROC glUniform2f; -extern PFNGLUNIFORM2FVPROC glUniform2fv; -extern PFNGLUNIFORM2IPROC glUniform2i; -extern PFNGLUNIFORM2IVPROC glUniform2iv; -extern PFNGLUNIFORM3FPROC glUniform3f; -extern PFNGLUNIFORM3FVPROC glUniform3fv; -extern PFNGLUNIFORM3IPROC glUniform3i; -extern PFNGLUNIFORM3IVPROC glUniform3iv; -extern PFNGLUNIFORM4FPROC glUniform4f; -extern PFNGLUNIFORM4FVPROC glUniform4fv; -extern PFNGLUNIFORM4IPROC glUniform4i; -extern PFNGLUNIFORM4IVPROC glUniform4iv; -extern PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv; -extern PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv; -extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv; -extern PFNGLUSEPROGRAMPROC glUseProgram; -extern PFNGLVALIDATEPROGRAMPROC glValidateProgram; +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; diff --git a/source/arb_vertex_buffer_object.cpp b/source/arb_vertex_buffer_object.cpp index cf623c47..431ad401 100644 --- a/source/arb_vertex_buffer_object.cpp +++ b/source/arb_vertex_buffer_object.cpp @@ -3,48 +3,48 @@ namespace Msp { namespace GL { -PFNGLBINDBUFFERPROC glBindBuffer = 0; -PFNGLBUFFERDATAPROC glBufferData = 0; -PFNGLBUFFERSUBDATAPROC glBufferSubData = 0; -PFNGLDELETEBUFFERSPROC glDeleteBuffers = 0; -PFNGLGENBUFFERSPROC glGenBuffers = 0; -PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv = 0; -PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv = 0; -PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData = 0; -PFNGLISBUFFERPROC glIsBuffer = 0; -PFNGLMAPBUFFERPROC glMapBuffer = 0; -PFNGLUNMAPBUFFERPROC glUnmapBuffer = 0; +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")); + 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")); + 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; diff --git a/source/arb_vertex_buffer_object.h b/source/arb_vertex_buffer_object.h index 1154446d..2ee37271 100644 --- a/source/arb_vertex_buffer_object.h +++ b/source/arb_vertex_buffer_object.h @@ -8,17 +8,17 @@ namespace Msp { namespace GL { -extern PFNGLBINDBUFFERPROC glBindBuffer; -extern PFNGLBUFFERDATAPROC glBufferData; -extern PFNGLBUFFERSUBDATAPROC glBufferSubData; -extern PFNGLDELETEBUFFERSPROC glDeleteBuffers; -extern PFNGLGENBUFFERSPROC glGenBuffers; -extern PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv; -extern PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv; -extern PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData; -extern PFNGLISBUFFERPROC glIsBuffer; -extern PFNGLMAPBUFFERPROC glMapBuffer; -extern PFNGLUNMAPBUFFERPROC glUnmapBuffer; +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; diff --git a/source/arb_vertex_shader.cpp b/source/arb_vertex_shader.cpp index 918c1316..b201802e 100644 --- a/source/arb_vertex_shader.cpp +++ b/source/arb_vertex_shader.cpp @@ -3,153 +3,153 @@ namespace Msp { namespace GL { -PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation = 0; -PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray = 0; -PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray = 0; -PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib = 0; -PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation = 0; -PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv = 0; -PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv = 0; -PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv = 0; -PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv = 0; -PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d = 0; -PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv = 0; -PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f = 0; -PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv = 0; -PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s = 0; -PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv = 0; -PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d = 0; -PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv = 0; -PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f = 0; -PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv = 0; -PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s = 0; -PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv = 0; -PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d = 0; -PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv = 0; -PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f = 0; -PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv = 0; -PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s = 0; -PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv = 0; -PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv = 0; -PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv = 0; -PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv = 0; -PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub = 0; -PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv = 0; -PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv = 0; -PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv = 0; -PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv = 0; -PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d = 0; -PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv = 0; -PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f = 0; -PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv = 0; -PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv = 0; -PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s = 0; -PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv = 0; -PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv = 0; -PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv = 0; -PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv = 0; -PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer = 0; +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")); + 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")); + 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; diff --git a/source/arb_vertex_shader.h b/source/arb_vertex_shader.h index 6ded1a09..a6b5ffc1 100644 --- a/source/arb_vertex_shader.h +++ b/source/arb_vertex_shader.h @@ -8,52 +8,52 @@ namespace Msp { namespace GL { -extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation; -extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray; -extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; -extern PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib; -extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; -extern PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv; -extern PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv; -extern PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv; -extern PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv; -extern PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d; -extern PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv; -extern PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f; -extern PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv; -extern PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s; -extern PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv; -extern PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d; -extern PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv; -extern PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f; -extern PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv; -extern PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s; -extern PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv; -extern PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d; -extern PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv; -extern PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f; -extern PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv; -extern PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s; -extern PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv; -extern PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv; -extern PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv; -extern PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv; -extern PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub; -extern PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv; -extern PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv; -extern PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv; -extern PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv; -extern PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d; -extern PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv; -extern PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f; -extern PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv; -extern PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv; -extern PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s; -extern PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv; -extern PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv; -extern PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv; -extern PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv; -extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer; +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; diff --git a/source/ext_blend_minmax.cpp b/source/ext_blend_minmax.cpp index 225a05f8..3db30bfb 100644 --- a/source/ext_blend_minmax.cpp +++ b/source/ext_blend_minmax.cpp @@ -3,18 +3,18 @@ namespace Msp { namespace GL { -PFNGLBLENDEQUATIONPROC glBlendEquation = 0; +PFNGLBLENDEQUATIONEXTPROC glBlendEquation = 0; Extension::SupportLevel init_ext_blend_minmax() { if(is_version_at_least(1, 2)) { - glBlendEquation = reinterpret_cast(get_proc_address("glBlendEquation")); + glBlendEquation = reinterpret_cast(get_proc_address("glBlendEquation")); return Extension::CORE; } if(is_supported("GL_EXT_blend_minmax")) { - glBlendEquation = reinterpret_cast(get_proc_address("glBlendEquationEXT")); + glBlendEquation = reinterpret_cast(get_proc_address("glBlendEquationEXT")); return Extension::EXTENSION; } return Extension::UNSUPPORTED; diff --git a/source/ext_blend_minmax.h b/source/ext_blend_minmax.h index 5ca1a58c..a2d3ff34 100644 --- a/source/ext_blend_minmax.h +++ b/source/ext_blend_minmax.h @@ -8,7 +8,7 @@ namespace Msp { namespace GL { -extern PFNGLBLENDEQUATIONPROC glBlendEquation; +extern PFNGLBLENDEQUATIONEXTPROC glBlendEquation; extern Extension EXT_blend_minmax; diff --git a/source/ext_draw_range_elements.cpp b/source/ext_draw_range_elements.cpp index 2bccf00e..95af7b23 100644 --- a/source/ext_draw_range_elements.cpp +++ b/source/ext_draw_range_elements.cpp @@ -3,18 +3,18 @@ namespace Msp { namespace GL { -PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = 0; +PFNGLDRAWRANGEELEMENTSEXTPROC glDrawRangeElements = 0; Extension::SupportLevel init_ext_draw_range_elements() { if(is_version_at_least(1, 2)) { - glDrawRangeElements = reinterpret_cast(get_proc_address("glDrawRangeElements")); + 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")); + glDrawRangeElements = reinterpret_cast(get_proc_address("glDrawRangeElementsEXT")); return Extension::EXTENSION; } return Extension::UNSUPPORTED; diff --git a/source/ext_draw_range_elements.h b/source/ext_draw_range_elements.h index e8aba1da..dea955f4 100644 --- a/source/ext_draw_range_elements.h +++ b/source/ext_draw_range_elements.h @@ -8,7 +8,7 @@ namespace Msp { namespace GL { -extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; +extern PFNGLDRAWRANGEELEMENTSEXTPROC glDrawRangeElements; extern Extension EXT_draw_range_elements; diff --git a/source/ext_framebuffer_blit.cpp b/source/ext_framebuffer_blit.cpp index a198cdd1..6fec8a68 100644 --- a/source/ext_framebuffer_blit.cpp +++ b/source/ext_framebuffer_blit.cpp @@ -3,18 +3,18 @@ namespace Msp { namespace GL { -PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer = 0; +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")); + glBlitFramebuffer = reinterpret_cast(get_proc_address("glBlitFramebuffer")); return Extension::CORE; } if(is_supported("GL_EXT_framebuffer_blit")) { - glBlitFramebuffer = reinterpret_cast(get_proc_address("glBlitFramebufferEXT")); + glBlitFramebuffer = reinterpret_cast(get_proc_address("glBlitFramebufferEXT")); return Extension::EXTENSION; } return Extension::UNSUPPORTED; diff --git a/source/ext_framebuffer_blit.h b/source/ext_framebuffer_blit.h index 75ca6c6e..54197692 100644 --- a/source/ext_framebuffer_blit.h +++ b/source/ext_framebuffer_blit.h @@ -8,7 +8,7 @@ namespace Msp { namespace GL { -extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; +extern PFNGLBLITFRAMEBUFFEREXTPROC glBlitFramebuffer; extern Extension EXT_framebuffer_blit; diff --git a/source/ext_framebuffer_multisample.cpp b/source/ext_framebuffer_multisample.cpp index 7be2f6d3..dd733e49 100644 --- a/source/ext_framebuffer_multisample.cpp +++ b/source/ext_framebuffer_multisample.cpp @@ -3,18 +3,18 @@ namespace Msp { namespace GL { -PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample = 0; +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")); + glRenderbufferStorageMultisample = reinterpret_cast(get_proc_address("glRenderbufferStorageMultisample")); return Extension::CORE; } if(is_supported("GL_EXT_framebuffer_multisample")) { - glRenderbufferStorageMultisample = reinterpret_cast(get_proc_address("glRenderbufferStorageMultisampleEXT")); + glRenderbufferStorageMultisample = reinterpret_cast(get_proc_address("glRenderbufferStorageMultisampleEXT")); return Extension::EXTENSION; } return Extension::UNSUPPORTED; diff --git a/source/ext_framebuffer_multisample.h b/source/ext_framebuffer_multisample.h index 980ef9a9..7d2f20f5 100644 --- a/source/ext_framebuffer_multisample.h +++ b/source/ext_framebuffer_multisample.h @@ -8,7 +8,7 @@ namespace Msp { namespace GL { -extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; +extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisample; extern Extension EXT_framebuffer_multisample; diff --git a/source/ext_framebuffer_object.cpp b/source/ext_framebuffer_object.cpp index e9193e17..a89b5743 100644 --- a/source/ext_framebuffer_object.cpp +++ b/source/ext_framebuffer_object.cpp @@ -3,66 +3,66 @@ namespace Msp { namespace GL { -PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = 0; -PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = 0; -PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = 0; -PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = 0; -PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = 0; -PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = 0; -PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D = 0; -PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = 0; -PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D = 0; -PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = 0; -PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = 0; -PFNGLGENERATEMIPMAPPROC glGenerateMipmap = 0; -PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv = 0; -PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv = 0; -PFNGLISFRAMEBUFFERPROC glIsFramebuffer = 0; -PFNGLISRENDERBUFFERPROC glIsRenderbuffer = 0; -PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = 0; +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")); + 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")); + 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; diff --git a/source/ext_framebuffer_object.h b/source/ext_framebuffer_object.h index 69bf7466..be5ea10d 100644 --- a/source/ext_framebuffer_object.h +++ b/source/ext_framebuffer_object.h @@ -8,23 +8,23 @@ namespace Msp { namespace GL { -extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; -extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; -extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; -extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; -extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; -extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; -extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D; -extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; -extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D; -extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; -extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; -extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap; -extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; -extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv; -extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer; -extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer; -extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; +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; diff --git a/source/ext_texture3d.cpp b/source/ext_texture3d.cpp index e75044a8..d3e3c5f5 100644 --- a/source/ext_texture3d.cpp +++ b/source/ext_texture3d.cpp @@ -3,21 +3,21 @@ namespace Msp { namespace GL { -PFNGLTEXIMAGE3DPROC glTexImage3D = 0; -PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D = 0; +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")); + 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")); + glTexImage3D = reinterpret_cast(get_proc_address("glTexImage3DEXT")); + glTexSubImage3D = reinterpret_cast(get_proc_address("glTexSubImage3DEXT")); return Extension::EXTENSION; } return Extension::UNSUPPORTED; diff --git a/source/ext_texture3d.h b/source/ext_texture3d.h index 2f2d696d..c6689108 100644 --- a/source/ext_texture3d.h +++ b/source/ext_texture3d.h @@ -8,8 +8,8 @@ namespace Msp { namespace GL { -extern PFNGLTEXIMAGE3DPROC glTexImage3D; -extern PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D; +extern PFNGLTEXIMAGE3DEXTPROC glTexImage3D; +extern PFNGLTEXSUBIMAGE3DEXTPROC glTexSubImage3D; extern Extension EXT_texture3D;