[GLExtensions] Dynamically pull in the GL 1.3 and 1.4 functions as well.

This commit is contained in:
Ryan Houdek 2013-12-30 16:34:28 -06:00 committed by degasus
parent d5a7ea2041
commit 10bd61a9d2
4 changed files with 19 additions and 14 deletions

View File

@ -1629,6 +1629,7 @@ typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level,
#define GL_FUNC_REVERSE_SUBTRACT 0x800B #define GL_FUNC_REVERSE_SUBTRACT 0x800B
#define GL_BLEND_COLOR 0x8005 #define GL_BLEND_COLOR 0x8005
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
GLsizei width, GLenum format, GLsizei width, GLenum format,
@ -1738,7 +1739,7 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
#endif
/* /*
@ -1850,6 +1851,8 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
/* texture_border_clamp */ /* texture_border_clamp */
#define GL_CLAMP_TO_BORDER 0x812D #define GL_CLAMP_TO_BORDER 0x812D
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void GLAPIENTRY glActiveTexture( GLenum texture ); GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture ); GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
@ -1943,6 +1946,7 @@ GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
#endif
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);

View File

@ -15,7 +15,7 @@ PFNGLTEXIMAGE3DPROC glTexImage3D;
PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D; PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
// gl_1_3 // gl_1_3
/*PFNGLACTIVETEXTUREPROC glActiveTexture; PFNGLACTIVETEXTUREPROC glActiveTexture;
PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture; PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D; PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D;
PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D; PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D;
@ -61,10 +61,10 @@ PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv;
PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s; PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s;
PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv; PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv;
PFNGLSAMPLECOVERAGEPROC glSampleCoverage; PFNGLSAMPLECOVERAGEPROC glSampleCoverage;
*/
// gl_1_4 // gl_1_4
//PFNGLBLENDCOLORPROC glBlendColor; PFNGLBLENDCOLORPROC glBlendColor;
//PFNGLBLENDEQUATIONPROC glBlendEquation; PFNGLBLENDEQUATIONPROC glBlendEquation;
PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate; PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
PFNGLFOGCOORDPOINTERPROC glFogCoordPointer; PFNGLFOGCOORDPOINTERPROC glFogCoordPointer;
PFNGLFOGCOORDDPROC glFogCoordd; PFNGLFOGCOORDDPROC glFogCoordd;
@ -439,7 +439,7 @@ namespace GLExtensions
std::unordered_map<std::string, bool> _extensionlist; std::unordered_map<std::string, bool> _extensionlist;
// Forward declared init functions // Forward declared init functions
bool init_gl_1_2(); bool init_gl_1_2();
// bool init_gl_1_3(); bool init_gl_1_3();
bool init_gl_1_4(); bool init_gl_1_4();
bool init_gl_1_5(); bool init_gl_1_5();
bool init_gl_2_0(); bool init_gl_2_0();
@ -542,7 +542,7 @@ namespace GLExtensions
InitVersion(); InitVersion();
if (success && !init_gl_1_2()) success = false; if (success && !init_gl_1_2()) success = false;
//if (success && !init_gl_1_3()) success = false; if (success && !init_gl_1_3()) success = false;
if (success && !init_gl_1_4()) success = false; if (success && !init_gl_1_4()) success = false;
if (success && !init_gl_1_5()) success = false; if (success && !init_gl_1_5()) success = false;
if (success && !init_gl_2_0()) success = false; if (success && !init_gl_2_0()) success = false;
@ -593,7 +593,7 @@ namespace GLExtensions
&& GrabFunction(glTexImage3D) && GrabFunction(glTexImage3D)
&& GrabFunction(glTexSubImage3D); && GrabFunction(glTexSubImage3D);
} }
/*
bool init_gl_1_3() bool init_gl_1_3()
{ {
return GrabFunction(glActiveTexture) return GrabFunction(glActiveTexture)
@ -643,12 +643,12 @@ namespace GLExtensions
&& GrabFunction(glMultiTexCoord4sv) && GrabFunction(glMultiTexCoord4sv)
&& GrabFunction(glSampleCoverage); && GrabFunction(glSampleCoverage);
} }
*/
bool init_gl_1_4() bool init_gl_1_4()
{ {
//GrabFunction(glBlendColor) return GrabFunction(glBlendColor)
//GrabFunction(glBlendEquation) && GrabFunction(glBlendEquation)
return GrabFunction(glBlendFuncSeparate) && GrabFunction(glBlendFuncSeparate)
&& GrabFunction(glFogCoordPointer) && GrabFunction(glFogCoordPointer)
&& GrabFunction(glFogCoordd) && GrabFunction(glFogCoordd)
&& GrabFunction(glFogCoorddv) && GrabFunction(glFogCoorddv)

View File

@ -7,6 +7,7 @@
#include "GLInterface.h" #include "GLInterface.h"
#include "gl_1_2.h" #include "gl_1_2.h"
#include "gl_1_3.h"
#include "gl_1_4.h" #include "gl_1_4.h"
#include "gl_1_5.h" #include "gl_1_5.h"
#include "gl_2_0.h" #include "gl_2_0.h"

View File

@ -98,8 +98,8 @@ typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVPROC) (const GLshort *p);
#endif #endif
// These two are provided by ARB_imaging as well // These two are provided by ARB_imaging as well
//extern PFNGLBLENDCOLORPROC glBlendColor; extern PFNGLBLENDCOLORPROC glBlendColor;
//extern PFNGLBLENDEQUATIONPROC glBlendEquation; extern PFNGLBLENDEQUATIONPROC glBlendEquation;
extern PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate; extern PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
extern PFNGLFOGCOORDPOINTERPROC glFogCoordPointer; extern PFNGLFOGCOORDPOINTERPROC glFogCoordPointer;
extern PFNGLFOGCOORDDPROC glFogCoordd; extern PFNGLFOGCOORDDPROC glFogCoordd;