/*
								+--------------------------------+
								|								 |
								|	  ***	OpenGL 4.0	 ***	 |
								|								 |
								|  Copyright © -tHE SWINe- 2011	 |
								|								 |
								|		   OpenGL40.cpp			 |
								|								 |
								+--------------------------------+
*/

/**
 *	@file gl4/OpenGL40.cpp
 *	@author -tHE SWINe-
 *	@brief OpenGL 4.0 and extensions entry points
 */

#include "../NewFix.h"
#include "../CallStack.h"
#include "OpenGL40.h"
#include "../StlUtils.h"

#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#include <GL/wglext.h>
#else // _WIN32 || _WIN64
#include <GL/glx.h>
//#include <GL/glxext.h> // my glxext.h doesn't cope nicely with some unices; gotta get another version

#ifndef GLX_VERSION_1_4

/**
 *	@def glXGetProcAddress
 *	@brief get proc address on linux platform
 *	@param[in] x is name of the function to retrieve
 */
#define glXGetProcAddress(x) (*glXGetProcAddressARB)((const GLubyte*)x)

#endif // !GLX_VERSION_1_4

/**
 *	@def wglGetProcAddress
 *	@brief windows get proc address lookalike on linux platform
 *	@param[in] x is name of the function to retrieve
 */
#define wglGetProcAddress(x) (*glXGetProcAddress)((GLubyte*)(x))
#endif // _WIN32 || _WIN64

/**
 *	@def INIT_FUNC_POINTERS
 *	@brief code for function pointer initialization
 */
#ifdef __GL_NULL_FUNCTION_POINTERS
#define INIT_FUNC_POINTERS = 0
#else // __GL_NULL_FUNCTION_POINTERS
#define INIT_FUNC_POINTERS 
#endif // __GL_NULL_FUNCTION_POINTERS

/*
 *								=== CGL4ExtensionHandler ===
 */

bool CGL4ExtensionHandler::b_Support_OpenGL(int n_min_major, int n_min_minor)
{
	int n_major = n_OpenGL_Version_Major(),
		n_minor = n_OpenGL_Version_Minor();
	if(n_major > n_min_major)
		return true;
	if(n_major == n_min_major && n_minor >= n_min_minor)
		return true;
	return false;
}

int CGL4ExtensionHandler::n_OpenGL_Version()
{
	int n_major = n_OpenGL_Version_Major(),
		n_minor = n_OpenGL_Version_Minor();
	// new simpler code using OpenGL 3.0 query

	/*const char *p_s_version;
	p_s_version = (const char*)glGetString(GL_VERSION);
	if(!p_s_version) {
#if defined(_WIN32) || defined(_WIN64)
		MessageBoxA(0, "OpenGL extension string is 0!", "CGL4ExtensionHandler", MB_OK);
#endif // _WIN32 || _WIN64
		return -1;
	}

#if defined(_MSC_VER) && !defined(__MWERKS__) && _MSC_VER >= 1400
	if(sscanf_s(p_s_version, "%d.%d", &n_major, &n_minor) != 2) {
#else // _MSC_VER && !__MWERKS__ && _MSC_VER >= 1400
	if(sscanf(p_s_version, "%d.%d", &n_major, &n_minor) != 2) {
#endif // _MSC_VER && !__MWERKS__ && _MSC_VER >= 1400
#if defined(_WIN32) || defined(_WIN64)
		MessageBoxA(0, "OpenGL version string malformed!", "CGL4ExtensionHandler", MB_OK);
#endif // _WIN32 || _WIN64
		//_ASSERTE(0); // error - OpenGL version string malformed!
		return -1;
	}
	//_ASSERTE(n_minor >= 0 && n_minor < 10);*/
	// old code, using the GL_VERSION string (still works)

	return n_major * 10 + n_minor;
}

int CGL4ExtensionHandler::n_OpenGL_Version_Major()
{
	int n_major;
	glGetIntegerv(GL_MAJOR_VERSION, &n_major);
	return n_major;
}

int CGL4ExtensionHandler::n_OpenGL_Version_Minor()
{
	int n_minor;
	glGetIntegerv(GL_MINOR_VERSION, &n_minor);
	return n_minor;
}

bool CGL4ExtensionHandler::b_SupportedExtension(const char *p_s_extension_name)
{
	if(!GLFuncPtrName(glGetStringi) && n_GetGL30FuncPointers())
		return false;
	// requires OpenGL 3.0 functions

	int n_extension_num;
	glGetIntegerv(GL_NUM_EXTENSIONS, &n_extension_num);
	for(int i = 0; i < n_extension_num; ++ i) {
		const char *p_s_ext_name = (const char*)glGetStringi(GL_EXTENSIONS, i);
		if(!p_s_ext_name)
			continue; // ?
		if(!strcmp(p_s_ext_name, p_s_extension_name))
			return true; // extension was found
	}
	// new OpenGL 3 extensions scheme to avoid buffer overruns in old software

	return false;
}

bool CGL4ExtensionHandler::Get_ExtensionString(std::string &r_s_extension_list)
{
	if(!GLFuncPtrName(glGetStringi) && n_GetGL30FuncPointers())
		return false;
	// requires OpenGL 3.0 functions

	r_s_extension_list.erase();

	int n_extension_num;
	glGetIntegerv(GL_NUM_EXTENSIONS, &n_extension_num);
	for(int i = 0; i < n_extension_num; ++ i) {
		const char *p_s_ext_name = (const char*)glGetStringi(GL_EXTENSIONS, i);
		if(!p_s_ext_name)
			continue; // ?
		try {
			if(i)
				r_s_extension_list += " ";
			r_s_extension_list += p_s_ext_name;
		} catch(std::bad_alloc&) {
			return false;
		}
	}
	// new OpenGL 3 extensions scheme to avoid buffer overruns in old software

	return true;
}

#if defined(_WIN32) || defined(_WIN64)

bool CGL4ExtensionHandler::b_SupportedPlatformExtension(const char *p_s_extension_name)
{
#ifndef WGL_WGLEXT_PROTOTYPES
	PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
	if(!(wglGetExtensionsStringARB =
	   (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB")))
		return false;
	// get wglGetExtensionsStringARB() if not linked statically
#endif // !WGL_WGLEXT_PROTOTYPES

	const char *p_s_extensions = (const char*)wglGetExtensionsStringARB(wglGetCurrentDC());
	// get WGL extensions string

	const char *p_s_search_str = p_s_extensions;
	do {
		if((p_s_search_str = strstr(p_s_search_str, p_s_extension_name))) {
			if(p_s_search_str > p_s_extensions && !isspace(*(p_s_search_str - 1)))
				continue;
			if(strlen(p_s_search_str + strlen(p_s_extension_name)) &&
			   !isspace(*(p_s_search_str + strlen(p_s_extension_name))))
				continue;

			return true;
		}
	} while(p_s_search_str && strlen(++ p_s_search_str));
	// look for the extension

	return false;
}

#else // _WIN32 || _WIN64

bool CGL4ExtensionHandler::b_SupportedPlatformExtension(const char *p_s_extension_name)
{
#ifdef GLX_VERSION_1_2
	const char *p_s_extensions;
	p_s_extensions = (const char*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS); // @todo - debug this
	// glXGetClientString() is in GLX 1.1 and later (static linking)
	// glXGetCurrentDisplay() is in GLX 1.2 and later (static linking)
	// GLX_EXTENSIONS is in GLX 1.1
	// get GLX extensions string

	/*p_s_extensions = (const char*)glXQueryExtensionsString(glXGetCurrentDisplay(),
		DefaultScreen(glXGetCurrentDisplay()));*/
	// this could also work

	const char *p_s_search_str = p_s_extensions;
	do {
		if((p_s_search_str = strstr(p_s_search_str, p_s_extension_name))) {
			if(p_s_search_str > p_s_extensions && !isspace(*(p_s_search_str - 1)))
				continue;
			if(strlen(p_s_search_str + strlen(p_s_extension_name)) &&
			   !isspace(*(p_s_search_str + strlen(p_s_extension_name))))
				continue;

			return true;
		}
	} while(p_s_search_str && strlen(++ p_s_search_str));
	// look for the extension

#else // GLX_VERSION_1_2
#error("GLX 1.2 is needed for glXGetClientString(GLX_EXTENSIONS) to work")
#endif // GLX_VERSION_1_2

	return false;
}

#endif // _WIN32 || _WIN64

int CGL4ExtensionHandler::n_GetAllOpenGLCoreFuncPointers()
{
	return n_GetGL12FuncPointers() +
		n_GetGL13FuncPointers() +
		n_GetGL14FuncPointers() +
		n_GetGL15FuncPointers() +
		n_GetGL20FuncPointers() +
		n_GetGL21FuncPointers() +
		n_GetGL30FuncPointers() +
		n_GetGL31FuncPointers() +
		n_GetGL32FuncPointers() +
		n_GetGL33FuncPointers() +
		n_GetGL40FuncPointers() +
		n_GetGL41FuncPointers() +
		n_GetGL42FuncPointers();
}

int CGL4ExtensionHandler::n_GetOpenGLCoreFuncPointers(int n_major, int n_minor)
{
	int n_failed_function_num = 0;
	if(n_major > 1 || (n_major == 1 && n_minor >= 2)) n_failed_function_num += n_GetGL12FuncPointers();
	if(n_major > 1 || (n_major == 1 && n_minor >= 3)) n_failed_function_num += n_GetGL13FuncPointers();
	if(n_major > 1 || (n_major == 1 && n_minor >= 4)) n_failed_function_num += n_GetGL14FuncPointers();
	if(n_major > 1 || (n_major == 1 && n_minor >= 5)) n_failed_function_num += n_GetGL15FuncPointers();
	if(n_major > 2 || (n_major == 2 && n_minor >= 0)) n_failed_function_num += n_GetGL20FuncPointers();
	if(n_major > 2 || (n_major == 2 && n_minor >= 1)) n_failed_function_num += n_GetGL21FuncPointers();
	if(n_major > 3 || (n_major == 3 && n_minor >= 0)) n_failed_function_num += n_GetGL30FuncPointers();
	if(n_major > 3 || (n_major == 3 && n_minor >= 1)) n_failed_function_num += n_GetGL31FuncPointers();
	if(n_major > 3 || (n_major == 3 && n_minor >= 2)) n_failed_function_num += n_GetGL32FuncPointers();
	if(n_major > 3 || (n_major == 3 && n_minor >= 3)) n_failed_function_num += n_GetGL33FuncPointers();
	if(n_major > 4 || (n_major == 4 && n_minor >= 0)) n_failed_function_num += n_GetGL40FuncPointers();
	if(n_major > 4 || (n_major == 4 && n_minor >= 1)) n_failed_function_num += n_GetGL41FuncPointers();
	if(n_major > 4 || (n_major == 4 && n_minor >= 2)) n_failed_function_num += n_GetGL42FuncPointers();
	if(n_major > 4 || (n_major == 4 && n_minor >= 3)) n_failed_function_num += n_GetGL43FuncPointers();
	if(n_major > 4 || (n_major == 4 && n_minor >= 4)) n_failed_function_num += n_GetGL44FuncPointers();

	return n_failed_function_num;
}

int CGL4ExtensionHandler::n_GetAllSupportedExtensionsFuncPointers()
{
	return n_GetGL12FuncPointers() +

		n_GetGL13FuncPointers() +

		n_GetGL14FuncPointers() +

		n_GetGL15FuncPointers() +

		n_GetGL20FuncPointers() +

		n_GetGL21FuncPointers() +

		n_GetGL30FuncPointers() +
		//n_GetARBDepthBufferFloatFuncPointers() +
		//n_GetARBFramebufferObjectFuncPointers() +
		//n_GetARBFramebufferSRGBFuncPointers() +
		//n_GetARBHalfFloatVertexFuncPointers() +
		//n_GetARBMapBufferRangeFuncPointers() +
		//n_GetARBTextureCompressionRGtcFuncPointers() +
		//n_GetARBTextureRGFuncPointers() +
		//n_GetARBVertexArrayObjectFuncPointers() +

		n_GetGL31FuncPointers() +
		//n_GetARBUniformBufferObjectFuncPointers() +
		//n_GetARBDrawInstancedFuncPointers() +
		//n_GetARBCopyBufferFuncPointers() +
		//n_GetARBTextureBufferObjectFuncPointers() + // this is fused in n_GetGL31FuncPointers()

		n_GetGL32FuncPointers() +
		//n_GetARBDepthClampFuncPointers() +
		//n_GetARBDrawElementsBaseVertexFuncPointers() +
		//n_GetARBFragmentCoordConventionsFuncPointers() +
		//n_GetARBProvokingVertexFuncPointers() +
		//n_GetARBSeamlessCubeMapFuncPointers() +
		//n_GetARBSyncFuncPointers() +
		//n_GetARBTextureMultisampleFuncPointers() +
		//n_GetARBVertexArrayBGRAFuncPointers() +

		n_GetGL33FuncPointers() +
		//n_GetARBShaderBitEncodingFuncPointers() +
		//n_GetARBBlendFuncExtendedFuncPointers() +
		//n_GetARBExplicitAttribLocationFuncPointers() +
		//n_GetARBOcclusionQuery2FuncPointers() +
		//n_GetARBSamplerObjectsFuncPointers() +
		//n_GetARBTextureRGB10A2uiFuncPointers() +
		//n_GetARBTextureSwizzleFuncPointers() +
		//n_GetARBTimerQueryFuncPointers() +
		//n_GetARBInstancedArraysFuncPointers() +
		//n_GetARBVertexType2101010RevFuncPointers() +

		n_GetGL40FuncPointers() +
		//n_GetARBTextureQueryLodFuncPointers() +
		//n_GetARBDrawBuffersBlendFuncPointers() +
		//n_GetARBDrawIndirectFuncPointers() +
		//n_GetARBGPUShader5FuncPointers() +
		//n_GetARBGPUShaderFP64FuncPointers() +
		//n_GetARBSampleShadingFuncPointers() +
		//n_GetARBShaderSubroutineFuncPointers() +
		//n_GetARBTessellationShaderFuncPointers() +
		//n_GetARBTextureBufferObjectRGB32FuncPointers() +
		//n_GetARBTextureGatherFuncPointers() +
		//n_GetARBTextureCubeMapArrayFuncPointers() +
		//n_GetARBTransformFeedback2FuncPointers() +
		//n_GetARBTransformFeedback3FuncPointers() +

		n_GetGL41FuncPointers() +
		//n_GetARBES2CompatibilityFuncPointers() +
		//n_GetARBGetProgramBinaryFuncPointers() +
		//n_GetARBSeparateShaderObjectsFuncPointers() +
		//n_GetARBShaderPrecisionFuncPointers() +
		//n_GetARBVertexAttrib64bitFuncPointers() +
		//n_GetARBViewportArrayFuncPointers() +

		n_GetGL42FuncPointers() +
		//n_GetARBTextureCompressionBptcFuncPointers() +
		//n_GetARBCompressedTexturePixelStorageFuncPointers() +
		//n_GetARBShaderAtomicCountersFuncPointers() +
		//n_GetARBTextureStorageFuncPointers() +
		//n_GetARBTransformFeedbackInstancedFuncPointers() +
		//n_GetARBBaseInstanceFuncPointers() +
		//n_GetARBShaderImageLoadStoreFuncPointers() +
		//n_GetARBConservativeDepthFuncPointers() +
		//n_GetARBShadingLanguage_420packFuncPointers() +
		//n_GetARBInternalformatQueryFuncPointers() +
		//n_GetARBMapBufferAlignmentFuncPointers() +
		//n_GetARBShadingLanguagePackingFuncPointers() +

		n_GetGL43FuncPointers() +
		//n_GetARBArraysOfArraysFuncPointers() +
		//n_GetARBES3CompatibilityFuncPointers() +
		//n_GetARBClearBufferObjectFuncPointers() +
		//n_GetARBComputeShaderFuncPointers() +
		//n_GetARBCopyImageFuncPointers() +
		//n_GetARBDebugGroupFuncPointers() +
		//n_GetARBDebugLabelFuncPointers() +
		//n_GetARBDebugOutput2FuncPointers() +
		//n_GetARBDebugOutputFuncPointers() +
		//n_GetARBExplicitUniformLocationFuncPointers() +
		//n_GetARBFragmentLayerViewportFuncPointers() +
		//n_GetARBFramebufferNoAttachmentsFuncPointers() +
		//n_GetARBInternalformatQuery2FuncPointers() +
		//n_GetARBInvalidateSubdataFuncPointers() +
		//n_GetARBMultiDrawIndirectFuncPointers() +
		//n_GetARBProgramInterfaceQueryFuncPointers() +
		//n_GetARBRobustBufferAccessBehaviorFuncPointers() +
		//n_GetARBShaderImageSizeFuncPointers() +
		//n_GetARBShaderStorageBufferObjectFuncPointers() +
		//n_GetARBStencilTexturingFuncPointers() +
		//n_GetARBTextureBufferRangeFuncPointers() +
		//n_GetARBTextureQueryLevelsFuncPointers() +
		//n_GetARBTextureStorageMultisampleFuncPointers() +
		//n_GetARBTextureViewFuncPointers() +
		//n_GetARBVertexAttribBindingFuncPointers() +
		//n_GetKHRTextureCompressionASTC_HDRFuncPointers() +
		//n_GetARBRobustnessIsolationFuncPointers() +

		n_GetGL44FuncPointers() +
		//n_GetARBBufferStorageFuncPointers() +
		//n_GetARBClearTextureFuncPointers() +
		//n_GetARBEnhancedLayoutsFuncPointers() +
		//n_GetARBMultiBindFuncPointers() +
		//n_GetARBQueryBufferObjectFuncPointers() +
		//n_GetARBTextureMirrorClampToEdgeFuncPointers() +
		//n_GetARBTextureStencil8FuncPointers() +
		//n_GetARBVertexType10f11f11fRevFuncPointers() +

		n_GetARBBindlessTextureFuncPointers() +
		n_GetARBSparseTextureFuncPointers() +
		n_GetARBComputeVariableGroupSizeFuncPointers() +
		n_GetARBIndirectParametersFuncPointers() +
		n_GetARBSeamlessCubemapPerTextureFuncPointers() +
		n_GetARBShaderDrawParametersFuncPointers() +
		n_GetARBShaderGroupVoteFuncPointers() +
	// new GL 4.4 exts

		n_GetEXTDrawBuffers2FuncPointers() +
		//n_GetEXTTimerQueryFuncPointers() + // removed, ARB is core in 3.3
		n_GetEXTGPUProgramParametersFuncPointers() +
		n_GetEXTBindableUniformFuncPointers() +
		n_GetARBShaderTextureLodFuncPointers() +
		n_GetS3_S3TCFuncPointers() +
		n_GetEXTTextureCompressionLATCFuncPointers() +
		n_GetEXTTextureCompressionS3TCFuncPointers() +
		n_GetEXTTextureFilterAnisotropicFuncPointers() +
		n_GetEXTABGRFuncPointers() +
		n_GetARBShadingLanguageIncludeFuncPointers() +
		n_GetARBCLEventFuncPointers() +
		n_GetARBDebugOutputFuncPointers() +
		n_GetARBRobustnessFuncPointers() +
		n_GetARBShaderStencilExportFuncPointers();
	// remaining older ARB exts (might need some pruning)
}

/*
 *								--- OpenGL 1.2 ---
 */

#ifdef __GENERATE_GL_12__

void (GLApi *GLFuncPtrName(glBlendColor))(GLclampf, GLclampf, GLclampf, GLclampf) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBlendEquation))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawRangeElements))(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid*) INIT_FUNC_POINTERS;

// it is unclear whether this is deprecated (it seems to be)
/*void (GLApi *GLFuncPtrName(glColorTable))(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glColorTableParameterfv))(GLenum, GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glColorTableParameteriv))(GLenum, GLenum, const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyColorTable))(GLenum, GLenum, GLint, GLint, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetColorTable))(GLenum, GLenum, GLenum, GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetColorTableParameterfv))(GLenum, GLenum, GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetColorTableParameteriv))(GLenum, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glColorSubTable))(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyColorSubTable))(GLenum, GLsizei, GLint, GLint, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glConvolutionFilter1D))(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glConvolutionFilter2D))(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glConvolutionParameterf))(GLenum, GLenum, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glConvolutionParameterfv))(GLenum, GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glConvolutionParameteri))(GLenum, GLenum, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glConvolutionParameteriv))(GLenum, GLenum, const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyConvolutionFilter1D))(GLenum, GLenum, GLint, GLint, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyConvolutionFilter2D))(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetConvolutionFilter))(GLenum, GLenum, GLenum, GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetConvolutionParameterfv))(GLenum, GLenum, GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetConvolutionParameteriv))(GLenum, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetSeparableFilter))(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSeparableFilter2D))(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetHistogram))(GLenum, GLboolean, GLenum, GLenum, GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetHistogramParameterfv))(GLenum, GLenum, GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetHistogramParameteriv))(GLenum, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMinmax))(GLenum, GLboolean, GLenum, GLenum, GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMinmaxParameterfv))(GLenum, GLenum, GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMinmaxParameteriv))(GLenum, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glHistogram))(GLenum, GLsizei, GLenum, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMinmax))(GLenum, GLenum, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glResetHistogram))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glResetMinmax))(GLenum) INIT_FUNC_POINTERS;*/

void (GLApi *GLFuncPtrName(glTexImage3D))(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexSubImage3D))(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyTexSubImage3D))(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_12__

bool GLEH_OPENGL_1_2 = false;

int CGL4ExtensionHandler::n_GetGL12FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_12__

	if(!(GLFuncPtrName(glBlendColor) = (void(GLApi*)(GLclampf, GLclampf, GLclampf, GLclampf))wglGetProcAddress("glBlendColor"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBlendEquation) = (void(GLApi*)(GLenum))wglGetProcAddress("glBlendEquation"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDrawRangeElements) = (void(GLApi*)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid*))wglGetProcAddress("glDrawRangeElements"))) ++ n_failed_function_num;

	// it is unclear whether this is deprecated (it seems to be)
	/*if(!(GLFuncPtrName(glColorTable) = (void(GLApi*)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid*))wglGetProcAddress("glColorTable"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glColorTableParameterfv) = (void(GLApi*)(GLenum, GLenum, const GLfloat*))wglGetProcAddress("glColorTableParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glColorTableParameteriv) = (void(GLApi*)(GLenum, GLenum, const GLint*))wglGetProcAddress("glColorTableParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCopyColorTable) = (void(GLApi*)(GLenum, GLenum, GLint, GLint, GLsizei))wglGetProcAddress("glCopyColorTable"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetColorTable) = (void(GLApi*)(GLenum, GLenum, GLenum, GLvoid*))wglGetProcAddress("glGetColorTable"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetColorTableParameterfv) = (void(GLApi*)(GLenum, GLenum, GLfloat*))wglGetProcAddress("glGetColorTableParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetColorTableParameteriv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetColorTableParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glColorSubTable) = (void(GLApi*)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*))wglGetProcAddress("glColorSubTable"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCopyColorSubTable) = (void(GLApi*)(GLenum, GLsizei, GLint, GLint, GLsizei))wglGetProcAddress("glCopyColorSubTable"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glConvolutionFilter1D) = (void(GLApi*)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid*))wglGetProcAddress("glConvolutionFilter1D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glConvolutionFilter2D) = (void(GLApi*)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*))wglGetProcAddress("glConvolutionFilter2D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glConvolutionParameterf) = (void(GLApi*)(GLenum, GLenum, GLfloat))wglGetProcAddress("glConvolutionParameterf"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glConvolutionParameterfv) = (void(GLApi*)(GLenum, GLenum, const GLfloat*))wglGetProcAddress("glConvolutionParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glConvolutionParameteri) = (void(GLApi*)(GLenum, GLenum, GLint))wglGetProcAddress("glConvolutionParameteri"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glConvolutionParameteriv) = (void(GLApi*)(GLenum, GLenum, const GLint*))wglGetProcAddress("glConvolutionParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCopyConvolutionFilter1D) = (void(GLApi*)(GLenum, GLenum, GLint, GLint, GLsizei))wglGetProcAddress("glCopyConvolutionFilter1D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCopyConvolutionFilter2D) = (void(GLApi*)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei))wglGetProcAddress("glCopyConvolutionFilter2D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetConvolutionFilter) = (void(GLApi*)(GLenum, GLenum, GLenum, GLvoid*))wglGetProcAddress("glGetConvolutionFilter"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetConvolutionParameterfv) = (void(GLApi*)(GLenum, GLenum, GLfloat*))wglGetProcAddress("glGetConvolutionParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetConvolutionParameteriv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetConvolutionParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetSeparableFilter) = (void(GLApi*)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid*))wglGetProcAddress("glGetSeparableFilter"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSeparableFilter2D) = (void(GLApi*)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid*))wglGetProcAddress("glSeparableFilter2D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetHistogram) = (void(GLApi*)(GLenum, GLboolean, GLenum, GLenum, GLvoid*))wglGetProcAddress("glGetHistogram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetHistogramParameterfv) = (void(GLApi*)(GLenum, GLenum, GLfloat*))wglGetProcAddress("glGetHistogramParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetHistogramParameteriv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetHistogramParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetMinmax) = (void(GLApi*)(GLenum, GLboolean, GLenum, GLenum, GLvoid*))wglGetProcAddress("glGetMinmax"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetMinmaxParameterfv) = (void(GLApi*)(GLenum, GLenum, GLfloat*))wglGetProcAddress("glGetMinmaxParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetMinmaxParameteriv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetMinmaxParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glHistogram) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLboolean))wglGetProcAddress("glHistogram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMinmax) = (void(GLApi*)(GLenum, GLenum, GLboolean))wglGetProcAddress("glMinmax"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glResetHistogram) = (void(GLApi*)(GLenum))wglGetProcAddress("glResetHistogram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glResetMinmax) = (void(GLApi*)(GLenum))wglGetProcAddress("glResetMinmax"))) ++ n_failed_function_num;*/

	if(!(GLFuncPtrName(glTexImage3D) = (void(GLApi*)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*))wglGetProcAddress("glTexImage3D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glTexSubImage3D) = (void(GLApi*)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*))wglGetProcAddress("glTexSubImage3D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCopyTexSubImage3D) = (void(GLApi*)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei))wglGetProcAddress("glCopyTexSubImage3D"))) ++ n_failed_function_num;

#endif // __GENERATE_GL_12__

	GLEH_OPENGL_1_2 = !n_failed_function_num && b_Support_OpenGL(1, 2);

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 1.2 ---
 */

/*
 *								--- OpenGL 1.3 ---
 */

#ifdef __GENERATE_GL_13__

// functions below are deprecated
/*void (GLApi *GLFuncPtrName(glLoadTransposeMatrixf))(const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glLoadTransposeMatrixd))(const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultTransposeMatrixf))(const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultTransposeMatrixd))(const GLdouble*) INIT_FUNC_POINTERS;*/

void (GLApi *GLFuncPtrName(glActiveTexture))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSampleCoverage))(GLclampf, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTexImage3D))(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTexImage2D))(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTexImage1D))(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTexSubImage3D))(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTexSubImage2D))(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTexSubImage1D))(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetCompressedTexImage))(GLenum, GLint, GLvoid*) INIT_FUNC_POINTERS;

// functions below are deprecated
/*void (GLApi *GLFuncPtrName(glClientActiveTexture))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1d))(GLenum, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1dv))(GLenum, const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1f))(GLenum, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1fv))(GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1i))(GLenum, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1iv))(GLenum, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1s))(GLenum, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord1sv))(GLenum, const GLshort*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2d))(GLenum, GLdouble, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2dv))(GLenum, const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2f))(GLenum, GLfloat, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2fv))(GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2i))(GLenum, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2iv))(GLenum, const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2s))(GLenum, GLshort, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord2sv))(GLenum, const GLshort*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3d))(GLenum, GLdouble, GLdouble, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3dv))(GLenum, const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3f))(GLenum, GLfloat, GLfloat, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3fv))(GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3i))(GLenum, GLint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3iv))(GLenum, const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3s))(GLenum, GLshort, GLshort, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord3sv))(GLenum, const GLshort*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4d))(GLenum, GLdouble, GLdouble, GLdouble, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4dv))(GLenum, const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4f))(GLenum, GLfloat, GLfloat, GLfloat, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4fv))(GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4i))(GLenum, GLint, GLint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4iv))(GLenum, const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4s))(GLenum, GLshort, GLshort, GLshort, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoord4sv))(GLenum, const GLshort*) INIT_FUNC_POINTERS;*/

#endif // __GENERATE_GL_13__

bool GLEH_OPENGL_1_3 = false;

int CGL4ExtensionHandler::n_GetGL13FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_13__

	// functions below are deprecated
	/*if(!(GLFuncPtrName(glLoadTransposeMatrixf) = (void(GLApi*)(const GLfloat*))wglGetProcAddress("glLoadTransposeMatrixf"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glLoadTransposeMatrixd) = (void(GLApi*)(const GLdouble*))wglGetProcAddress("glLoadTransposeMatrixd"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultTransposeMatrixf) = (void(GLApi*)(const GLfloat*))wglGetProcAddress("glMultTransposeMatrixf"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultTransposeMatrixd) = (void(GLApi*)(const GLdouble*))wglGetProcAddress("glMultTransposeMatrixd"))) ++ n_failed_function_num;*/

	if(!(GLFuncPtrName(glActiveTexture) = (void(GLApi*)(GLenum))wglGetProcAddress("glActiveTexture"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSampleCoverage) = (void(GLApi*)(GLclampf, GLboolean))wglGetProcAddress("glSampleCoverage"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompressedTexImage3D) = (void(GLApi*)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*))wglGetProcAddress("glCompressedTexImage3D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompressedTexImage2D) = (void(GLApi*)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*))wglGetProcAddress("glCompressedTexImage2D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompressedTexImage1D) = (void(GLApi*)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*))wglGetProcAddress("glCompressedTexImage1D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompressedTexSubImage3D) = (void(GLApi*)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*))wglGetProcAddress("glCompressedTexSubImage3D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompressedTexSubImage2D) = (void(GLApi*)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*))wglGetProcAddress("glCompressedTexSubImage2D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompressedTexSubImage1D) = (void(GLApi*)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*))wglGetProcAddress("glCompressedTexSubImage1D"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetCompressedTexImage) = (void(GLApi*)(GLenum, GLint, GLvoid*))wglGetProcAddress("glGetCompressedTexImage"))) ++ n_failed_function_num;

	// functions below are deprecated
	/*if(!(GLFuncPtrName(glClientActiveTexture) = (void(GLApi*)(GLenum))wglGetProcAddress("glClientActiveTexture"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1d) = (void(GLApi*)(GLenum, GLdouble))wglGetProcAddress("glMultiTexCoord1d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1dv) = (void(GLApi*)(GLenum, const GLdouble*))wglGetProcAddress("glMultiTexCoord1dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1f) = (void(GLApi*)(GLenum, GLfloat))wglGetProcAddress("glMultiTexCoord1f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1fv) = (void(GLApi*)(GLenum, const GLfloat*))wglGetProcAddress("glMultiTexCoord1fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1i) = (void(GLApi*)(GLenum, GLint))wglGetProcAddress("glMultiTexCoord1i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1iv) = (void(GLApi*)(GLenum, const GLint *))wglGetProcAddress("glMultiTexCoord1iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1s) = (void(GLApi*)(GLenum, GLshort))wglGetProcAddress("glMultiTexCoord1s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord1sv) = (void(GLApi*)(GLenum, const GLshort*))wglGetProcAddress("glMultiTexCoord1sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2d) = (void(GLApi*)(GLenum, GLdouble, GLdouble))wglGetProcAddress("glMultiTexCoord2d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2dv) = (void(GLApi*)(GLenum, const GLdouble*))wglGetProcAddress("glMultiTexCoord2dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2f) = (void(GLApi*)(GLenum, GLfloat, GLfloat))wglGetProcAddress("glMultiTexCoord2f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2fv) = (void(GLApi*)(GLenum, const GLfloat*))wglGetProcAddress("glMultiTexCoord2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2i) = (void(GLApi*)(GLenum, GLint, GLint))wglGetProcAddress("glMultiTexCoord2i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2iv) = (void(GLApi*)(GLenum, const GLint*))wglGetProcAddress("glMultiTexCoord2iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2s) = (void(GLApi*)(GLenum, GLshort, GLshort))wglGetProcAddress("glMultiTexCoord2s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord2sv) = (void(GLApi*)(GLenum, const GLshort*))wglGetProcAddress("glMultiTexCoord2sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3d) = (void(GLApi*)(GLenum, GLdouble, GLdouble, GLdouble))wglGetProcAddress("glMultiTexCoord3d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3dv) = (void(GLApi*)(GLenum, const GLdouble*))wglGetProcAddress("glMultiTexCoord3dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3f) = (void(GLApi*)(GLenum, GLfloat, GLfloat, GLfloat))wglGetProcAddress("glMultiTexCoord3f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3fv) = (void(GLApi*)(GLenum, const GLfloat*))wglGetProcAddress("glMultiTexCoord3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3i) = (void(GLApi*)(GLenum, GLint, GLint, GLint))wglGetProcAddress("glMultiTexCoord3i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3iv) = (void(GLApi*)(GLenum, const GLint*))wglGetProcAddress("glMultiTexCoord3iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3s) = (void(GLApi*)(GLenum, GLshort, GLshort, GLshort))wglGetProcAddress("glMultiTexCoord3s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord3sv) = (void(GLApi*)(GLenum, const GLshort*))wglGetProcAddress("glMultiTexCoord3sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4d) = (void(GLApi*)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble))wglGetProcAddress("glMultiTexCoord4d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4dv) = (void(GLApi*)(GLenum, const GLdouble*))wglGetProcAddress("glMultiTexCoord4dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4f) = (void(GLApi*)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat))wglGetProcAddress("glMultiTexCoord4f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4fv) = (void(GLApi*)(GLenum, const GLfloat*))wglGetProcAddress("glMultiTexCoord4fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4i) = (void(GLApi*)(GLenum, GLint, GLint, GLint, GLint))wglGetProcAddress("glMultiTexCoord4i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4iv) = (void(GLApi*)(GLenum, const GLint*))wglGetProcAddress("glMultiTexCoord4iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4s) = (void(GLApi*)(GLenum, GLshort, GLshort, GLshort, GLshort))wglGetProcAddress("glMultiTexCoord4s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiTexCoord4sv) = (void(GLApi*)(GLenum, const GLshort*))wglGetProcAddress("glMultiTexCoord4sv"))) ++ n_failed_function_num;*/

#endif // __GENERATE_GL_13__

	GLEH_OPENGL_1_3 = !n_failed_function_num && b_Support_OpenGL(1, 3);

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 1.3 ---
 */

/*
 *								--- OpenGL 1.4 ---
 */

#ifdef __GENERATE_GL_14__

void (GLApi *GLFuncPtrName(glBlendFuncSeparate))(GLenum, GLenum, GLenum, GLenum) INIT_FUNC_POINTERS;

// functions below are deprecated
/*void (GLApi *GLFuncPtrName(glFogCoordf))(GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFogCoordfv))(const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFogCoordd))(GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFogCoorddv))(const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFogCoordPointer))(GLenum, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;*/

void (GLApi *GLFuncPtrName(glMultiDrawArrays))(GLenum, GLint *, GLsizei *, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiDrawElements))(GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPointParameterf))(GLenum, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPointParameterfv))(GLenum, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPointParameteri))(GLenum, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPointParameteriv))(GLenum, const GLint*) INIT_FUNC_POINTERS;

// functions below are deprecated
/*void (GLApi *GLFuncPtrName(glSecondaryColor3b))(GLbyte, GLbyte, GLbyte) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3bv))(const GLbyte*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3d))(GLdouble, GLdouble, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3dv))(const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3f))(GLfloat, GLfloat, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3fv))(const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3i))(GLint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3iv))(const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3s))(GLshort, GLshort, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3sv))(const GLshort*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3ub))(GLubyte, GLubyte, GLubyte) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3ubv))(const GLubyte*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3ui))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3uiv))(const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3us))(GLushort, GLushort, GLushort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColor3usv))(const GLushort*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSecondaryColorPointer))(GLint, GLenum, GLsizei, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2d))(GLdouble, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2dv))(const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2f))(GLfloat, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2fv))(const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2i))(GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2iv))(const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2s))(GLshort, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos2sv))(const GLshort*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3d))(GLdouble, GLdouble, GLdouble) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3dv))(const GLdouble*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3f))(GLfloat, GLfloat, GLfloat) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3fv))(const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3i))(GLint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3iv))(const GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3s))(GLshort, GLshort, GLshort) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWindowPos3sv))(const GLshort*) INIT_FUNC_POINTERS;*/

#endif // __GENERATE_GL_14__

bool GLEH_OPENGL_1_4 = false;

int CGL4ExtensionHandler::n_GetGL14FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_14__

	if(!(GLFuncPtrName(glBlendFuncSeparate) = (void(GLApi*)(GLenum, GLenum, GLenum, GLenum))wglGetProcAddress("glBlendFuncSeparate"))) ++ n_failed_function_num;

	// functions below are deprecated
	/*if(!(GLFuncPtrName(glFogCoordf) = (void(GLApi*)(GLfloat))wglGetProcAddress("glFogCoordf"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glFogCoordfv) = (void(GLApi*)(const GLfloat*))wglGetProcAddress("glFogCoordfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glFogCoordd) = (void(GLApi*)(GLdouble))wglGetProcAddress("glFogCoordd"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glFogCoorddv) = (void(GLApi*)(const GLdouble*))wglGetProcAddress("glFogCoorddv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glFogCoordPointer) = (void(GLApi*)(GLenum, GLsizei, const GLvoid*))wglGetProcAddress("glFogCoordPointer"))) ++ n_failed_function_num;*/

	if(!(GLFuncPtrName(glMultiDrawArrays) = (void(GLApi*)(GLenum, GLint *, GLsizei *, GLsizei))wglGetProcAddress("glMultiDrawArrays"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMultiDrawElements) = (void(GLApi*)(GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei))wglGetProcAddress("glMultiDrawElements"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glPointParameterf) = (void(GLApi*)(GLenum, GLfloat))wglGetProcAddress("glPointParameterf"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glPointParameterfv) = (void(GLApi*)(GLenum, const GLfloat*))wglGetProcAddress("glPointParameterfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glPointParameteri) = (void(GLApi*)(GLenum, GLint))wglGetProcAddress("glPointParameteri"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glPointParameteriv) = (void(GLApi*)(GLenum, const GLint*))wglGetProcAddress("glPointParameteriv"))) ++ n_failed_function_num;

	// functions below are deprecated
	/*if(!(GLFuncPtrName(glSecondaryColor3b) = (void(GLApi*)(GLbyte, GLbyte, GLbyte))wglGetProcAddress("glSecondaryColor3b"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3bv) = (void(GLApi*)(const GLbyte*))wglGetProcAddress("glSecondaryColor3bv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3d) = (void(GLApi*)(GLdouble, GLdouble, GLdouble))wglGetProcAddress("glSecondaryColor3d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3dv) = (void(GLApi*)(const GLdouble*))wglGetProcAddress("glSecondaryColor3dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3f) = (void(GLApi*)(GLfloat, GLfloat, GLfloat))wglGetProcAddress("glSecondaryColor3f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3fv) = (void(GLApi*)(const GLfloat*))wglGetProcAddress("glSecondaryColor3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3i) = (void(GLApi*)(GLint, GLint, GLint))wglGetProcAddress("glSecondaryColor3i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3iv) = (void(GLApi*)(const GLint*))wglGetProcAddress("glSecondaryColor3iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3s) = (void(GLApi*)(GLshort, GLshort, GLshort))wglGetProcAddress("glSecondaryColor3s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3sv) = (void(GLApi*)(const GLshort*))wglGetProcAddress("glSecondaryColor3sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3ub) = (void(GLApi*)(GLubyte, GLubyte, GLubyte))wglGetProcAddress("glSecondaryColor3ub"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3ubv) = (void(GLApi*)(const GLubyte*))wglGetProcAddress("glSecondaryColor3ubv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3ui) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glSecondaryColor3ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3uiv) = (void(GLApi*)(const GLuint*))wglGetProcAddress("glSecondaryColor3uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3us) = (void(GLApi*)(GLushort, GLushort, GLushort))wglGetProcAddress("glSecondaryColor3us"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColor3usv) = (void(GLApi*)(const GLushort*))wglGetProcAddress("glSecondaryColor3usv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glSecondaryColorPointer) = (void(GLApi*)(GLint, GLenum, GLsizei, const GLvoid*))wglGetProcAddress("glSecondaryColorPointer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2d) = (void(GLApi*)(GLdouble, GLdouble))wglGetProcAddress("glWindowPos2d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2dv) = (void(GLApi*)(const GLdouble*))wglGetProcAddress("glWindowPos2dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2f) = (void(GLApi*)(GLfloat, GLfloat))wglGetProcAddress("glWindowPos2f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2fv) = (void(GLApi*)(const GLfloat*))wglGetProcAddress("glWindowPos2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2i) = (void(GLApi*)(GLint, GLint))wglGetProcAddress("glWindowPos2i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2iv) = (void(GLApi*)(const GLint*))wglGetProcAddress("glWindowPos2iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2s) = (void(GLApi*)(GLshort, GLshort))wglGetProcAddress("glWindowPos2s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos2sv) = (void(GLApi*)(const GLshort*))wglGetProcAddress("glWindowPos2sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3d) = (void(GLApi*)(GLdouble, GLdouble, GLdouble))wglGetProcAddress("glWindowPos3d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3dv) = (void(GLApi*)(const GLdouble*))wglGetProcAddress("glWindowPos3dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3f) = (void(GLApi*)(GLfloat, GLfloat, GLfloat))wglGetProcAddress("glWindowPos3f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3fv) = (void(GLApi*)(const GLfloat*))wglGetProcAddress("glWindowPos3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3i) = (void(GLApi*)(GLint, GLint, GLint))wglGetProcAddress("glWindowPos3i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3iv) = (void(GLApi*)(const GLint*))wglGetProcAddress("glWindowPos3iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3s) = (void(GLApi*)(GLshort, GLshort, GLshort))wglGetProcAddress("glWindowPos3s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glWindowPos3sv) = (void(GLApi*)(const GLshort*))wglGetProcAddress("glWindowPos3sv"))) ++ n_failed_function_num;*/

#endif // __GENERATE_GL_14__

	GLEH_OPENGL_1_4 = !n_failed_function_num && b_Support_OpenGL(1, 4);

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 1.4 ---
 */

/*
 *								--- OpenGL 1.5 ---
 */

#ifdef __GENERATE_GL_15__

void (GLApi *GLFuncPtrName(glGenQueries))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteQueries))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsQuery))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBeginQuery))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEndQuery))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetQueryiv))(GLenum, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetQueryObjectiv))(GLuint, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetQueryObjectuiv))(GLuint, GLenum, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindBuffer))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteBuffers))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenBuffers))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsBuffer))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBufferData))(GLenum, GLsizeiptr, const GLvoid *, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBufferSubData))(GLenum, GLintptr, GLsizeiptr, const GLvoid*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetBufferSubData))(GLenum, GLintptr, GLsizeiptr, GLvoid*) INIT_FUNC_POINTERS;
GLvoid* (GLApi *GLFuncPtrName(glMapBuffer))(GLenum, GLenum) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glUnmapBuffer))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetBufferParameteriv))(GLenum, GLenum, GLint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetBufferPointerv))(GLenum, GLenum, GLvoid**) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_15__

bool GLEH_OPENGL_1_5 = false;

int CGL4ExtensionHandler::n_GetGL15FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_15__

	if(!(GLFuncPtrName(glGenQueries) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenQueries"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDeleteQueries) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteQueries"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glIsQuery) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsQuery"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBeginQuery) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glBeginQuery"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glEndQuery) = (void(GLApi*)(GLenum))wglGetProcAddress("glEndQuery"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetQueryiv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetQueryiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetQueryObjectiv) = (void(GLApi*)(GLuint, GLenum, GLint*))wglGetProcAddress("glGetQueryObjectiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetQueryObjectuiv) = (void(GLApi*)(GLuint, GLenum, GLuint*))wglGetProcAddress("glGetQueryObjectuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBindBuffer) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glBindBuffer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDeleteBuffers) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteBuffers"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGenBuffers) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenBuffers"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glIsBuffer) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsBuffer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBufferData) = (void(GLApi*)(GLenum, GLsizeiptr, const GLvoid *, GLenum))wglGetProcAddress("glBufferData"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBufferSubData) = (void(GLApi*)(GLenum, GLintptr, GLsizeiptr, const GLvoid*))wglGetProcAddress("glBufferSubData"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetBufferSubData) = (void(GLApi*)(GLenum, GLintptr, GLsizeiptr, GLvoid*))wglGetProcAddress("glGetBufferSubData"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glMapBuffer) = (GLvoid*(GLApi*)(GLenum, GLenum))wglGetProcAddress("glMapBuffer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUnmapBuffer) = (GLboolean(GLApi*)(GLenum))wglGetProcAddress("glUnmapBuffer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetBufferParameteriv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetBufferParameteriv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetBufferPointerv) = (void(GLApi*)(GLenum, GLenum, GLvoid**))wglGetProcAddress("glGetBufferPointerv"))) ++ n_failed_function_num;

#endif // __GENERATE_GL_15__

	GLEH_OPENGL_1_5 = !n_failed_function_num && b_Support_OpenGL(1, 5);

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 1.5 ---
 */

/*
 *								--- OpenGL 2.0 ---
 */

#ifdef __GENERATE_GL_20__

void (GLApi *GLFuncPtrName(glDeleteShader))(GLuint shader) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDetachShader))(GLuint program, GLuint shader) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glCreateShader))(GLenum type) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glShaderSource))(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompileShader))(GLuint shader) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glCreateProgram))(void) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glAttachShader))(GLuint program, GLuint shader) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glLinkProgram))(GLuint program) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUseProgram))(GLuint program) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteProgram))(GLuint program) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glValidateProgram))(GLuint program) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1f))(GLint location, GLfloat v0) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2f))(GLint location, GLfloat v0, GLfloat v1) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3f))(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4f))(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1i))(GLint location, GLint v0) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2i))(GLint location, GLint v0, GLint v1) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3i))(GLint location, GLint v0, GLint v1, GLint v2) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4i))(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1fv))(GLint location, GLsizei count, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2fv))(GLint location, GLsizei count, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3fv))(GLint location, GLsizei count, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4fv))(GLint location, GLsizei count, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1iv))(GLint location, GLsizei count, const GLint *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2iv))(GLint location, GLsizei count, const GLint *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3iv))(GLint location, GLsizei count, const GLint *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4iv))(GLint location, GLsizei count, const GLint *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix2fv))(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix3fv))(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix4fv))(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindAttribLocation))(GLuint program, GLuint index, const GLchar *name) INIT_FUNC_POINTERS;
GLint (GLApi *GLFuncPtrName(glGetAttribLocation))(GLuint program, const GLchar *name) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib1d))(GLuint index, GLdouble x) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib1dv))(GLuint index, const GLdouble *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib1f))(GLuint index, GLfloat x) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib1fv))(GLuint index, const GLfloat *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib1s))(GLuint index, GLshort x) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib1sv))(GLuint index, const GLshort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib2d))(GLuint index, GLdouble x, GLdouble y) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib2dv))(GLuint index, const GLdouble *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib2f))(GLuint index, GLfloat x, GLfloat y) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib2fv))(GLuint index, const GLfloat *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib2s))(GLuint index, GLshort x, GLshort y) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib2sv))(GLuint index, const GLshort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib3d))(GLuint index, GLdouble x, GLdouble y, GLdouble z) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib3dv))(GLuint index, const GLdouble *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib3f))(GLuint index, GLfloat x, GLfloat y, GLfloat z) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib3fv))(GLuint index, const GLfloat *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib3s))(GLuint index, GLshort x, GLshort y, GLshort z) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib3sv))(GLuint index, const GLshort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Nbv))(GLuint index, const GLbyte *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Niv))(GLuint index, const GLint *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Nsv))(GLuint index, const GLshort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Nub))(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Nubv))(GLuint index, const GLubyte *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Nuiv))(GLuint index, const GLuint *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4Nusv))(GLuint index, const GLushort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4bv))(GLuint index, const GLbyte *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4d))(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4dv))(GLuint index, const GLdouble *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4f))(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4fv))(GLuint index, const GLfloat *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4iv))(GLuint index, const GLint *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4s))(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4sv))(GLuint index, const GLshort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4ubv))(GLuint index, const GLubyte *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4uiv))(GLuint index, const GLuint *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttrib4usv))(GLuint index, const GLushort *v) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribPointer))(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEnableVertexAttribArray))(GLuint index) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDisableVertexAttribArray))(GLuint index) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribdv))(GLuint index, GLenum pname, GLdouble *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribfv))(GLuint index, GLenum pname, GLfloat *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribiv))(GLuint index, GLenum pname, GLint *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribPointerv))(GLuint index, GLenum pname, GLvoid* *pointer) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsShader))(GLuint shader) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsProgram))(GLuint program) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetShaderiv))(GLuint program, GLenum pname, GLint *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetProgramiv))(GLuint program, GLenum pname, GLint *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetAttachedShaders))(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetShaderInfoLog))(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetProgramInfoLog))(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) INIT_FUNC_POINTERS;
GLint (GLApi *GLFuncPtrName(glGetUniformLocation))(GLuint program, const GLchar *name) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveUniform))(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetUniformfv))(GLuint program, GLint location, GLfloat *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetUniformiv))(GLuint program, GLint location, GLint *params) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetShaderSource))(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveAttrib))(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawBuffers))(GLsizei n, const GLenum *bufs) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glStencilFuncSeparate))(GLenum face, GLenum func, GLint ref, GLuint mask) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glStencilOpSeparate))(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glStencilMaskSeparate))(GLenum face, GLuint mask) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBlendEquationSeparate))(GLenum modeRGB, GLenum modeAlpha) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_20__

bool GLEH_OPENGL_2_0 = false;

int CGL4ExtensionHandler::n_GetGL20FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_20__

	if(!(GLFuncPtrName(glDeleteShader) = (void(GLApi*)(GLuint))wglGetProcAddress("glDeleteShader"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDetachShader) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glDetachShader"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCreateShader) = (GLuint(GLApi*)(GLenum))wglGetProcAddress("glCreateShader"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glShaderSource) = (void(GLApi*)(GLuint, GLsizei, const GLchar**, const GLint*))wglGetProcAddress("glShaderSource"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCompileShader) = (void(GLApi*)(GLuint))wglGetProcAddress("glCompileShader"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glCreateProgram) = (GLuint(GLApi*)(void))wglGetProcAddress("glCreateProgram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glAttachShader) = (void(GLApi*)(GLuint, GLuint shader))wglGetProcAddress("glAttachShader"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glLinkProgram) = (void(GLApi*)(GLuint))wglGetProcAddress("glLinkProgram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUseProgram) = (void(GLApi*)(GLuint))wglGetProcAddress("glUseProgram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDeleteProgram) = (void(GLApi*)(GLuint))wglGetProcAddress("glDeleteProgram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glValidateProgram) = (void(GLApi*)(GLuint))wglGetProcAddress("glValidateProgram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform1f) = (void(GLApi*)(GLint, GLfloat))wglGetProcAddress("glUniform1f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform2f) = (void(GLApi*)(GLint, GLfloat, GLfloat))wglGetProcAddress("glUniform2f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform3f) = (void(GLApi*)(GLint, GLfloat, GLfloat, GLfloat))wglGetProcAddress("glUniform3f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform4f) = (void(GLApi*)(GLint, GLfloat, GLfloat, GLfloat, GLfloat))wglGetProcAddress("glUniform4f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform1i) = (void(GLApi*)(GLint, GLint))wglGetProcAddress("glUniform1i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform2i) = (void(GLApi*)(GLint, GLint, GLint))wglGetProcAddress("glUniform2i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform3i) = (void(GLApi*)(GLint, GLint, GLint, GLint))wglGetProcAddress("glUniform3i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform4i) = (void(GLApi*)(GLint, GLint, GLint, GLint, GLint))wglGetProcAddress("glUniform4i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform1fv) = (void(GLApi*)(GLint, GLsizei, const GLfloat*))wglGetProcAddress("glUniform1fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform2fv) = (void(GLApi*)(GLint, GLsizei, const GLfloat*))wglGetProcAddress("glUniform2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform3fv) = (void(GLApi*)(GLint, GLsizei, const GLfloat*))wglGetProcAddress("glUniform3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform4fv) = (void(GLApi*)(GLint, GLsizei, const GLfloat*))wglGetProcAddress("glUniform4fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform1iv) = (void(GLApi*)(GLint, GLsizei, const GLint*))wglGetProcAddress("glUniform1iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform2iv) = (void(GLApi*)(GLint, GLsizei, const GLint*))wglGetProcAddress("glUniform2iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform3iv) = (void(GLApi*)(GLint, GLsizei, const GLint*))wglGetProcAddress("glUniform3iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform4iv) = (void(GLApi*)(GLint, GLsizei, const GLint*))wglGetProcAddress("glUniform4iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix2fv) = (void(GLApi*)(GLint, GLsizei, GLboolean transpose, const GLfloat*))wglGetProcAddress("glUniformMatrix2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix3fv) = (void(GLApi*)(GLint, GLsizei, GLboolean transpose, const GLfloat*))wglGetProcAddress("glUniformMatrix3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix4fv) = (void(GLApi*)(GLint, GLsizei, GLboolean transpose, const GLfloat*))wglGetProcAddress("glUniformMatrix4fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBindAttribLocation) = (void(GLApi*)(GLuint, GLuint, const GLchar *name))wglGetProcAddress("glBindAttribLocation"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetAttribLocation) = (GLint(GLApi*)(GLuint, const GLchar *name))wglGetProcAddress("glGetAttribLocation"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib1d) = (void(GLApi*)(GLuint, GLdouble))wglGetProcAddress("glVertexAttrib1d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib1dv) = (void(GLApi*)(GLuint, const GLdouble*))wglGetProcAddress("glVertexAttrib1dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib1f) = (void(GLApi*)(GLuint, GLfloat))wglGetProcAddress("glVertexAttrib1f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib1fv) = (void(GLApi*)(GLuint, const GLfloat*))wglGetProcAddress("glVertexAttrib1fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib1s) = (void(GLApi*)(GLuint, GLshort))wglGetProcAddress("glVertexAttrib1s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib1sv) = (void(GLApi*)(GLuint, const GLshort*))wglGetProcAddress("glVertexAttrib1sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib2d) = (void(GLApi*)(GLuint, GLdouble, GLdouble))wglGetProcAddress("glVertexAttrib2d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib2dv) = (void(GLApi*)(GLuint, const GLdouble*))wglGetProcAddress("glVertexAttrib2dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib2f) = (void(GLApi*)(GLuint, GLfloat, GLfloat))wglGetProcAddress("glVertexAttrib2f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib2fv) = (void(GLApi*)(GLuint, const GLfloat*))wglGetProcAddress("glVertexAttrib2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib2s) = (void(GLApi*)(GLuint, GLshort, GLshort))wglGetProcAddress("glVertexAttrib2s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib2sv) = (void(GLApi*)(GLuint, const GLshort*))wglGetProcAddress("glVertexAttrib2sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib3d) = (void(GLApi*)(GLuint, GLdouble, GLdouble, GLdouble))wglGetProcAddress("glVertexAttrib3d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib3dv) = (void(GLApi*)(GLuint, const GLdouble*))wglGetProcAddress("glVertexAttrib3dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib3f) = (void(GLApi*)(GLuint, GLfloat, GLfloat, GLfloat z))wglGetProcAddress("glVertexAttrib3f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib3fv) = (void(GLApi*)(GLuint, const GLfloat*))wglGetProcAddress("glVertexAttrib3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib3s) = (void(GLApi*)(GLuint, GLshort, GLshort, GLshort z))wglGetProcAddress("glVertexAttrib3s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib3sv) = (void(GLApi*)(GLuint, const GLshort*))wglGetProcAddress("glVertexAttrib3sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Nbv) = (void(GLApi*)(GLuint, const GLbyte*))wglGetProcAddress("glVertexAttrib4Nbv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Niv) = (void(GLApi*)(GLuint, const GLint*))wglGetProcAddress("glVertexAttrib4Niv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Nsv) = (void(GLApi*)(GLuint, const GLshort*))wglGetProcAddress("glVertexAttrib4Nsv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Nub) = (void(GLApi*)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte))wglGetProcAddress("glVertexAttrib4Nub"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Nubv) = (void(GLApi*)(GLuint, const GLubyte*))wglGetProcAddress("glVertexAttrib4Nubv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Nuiv) = (void(GLApi*)(GLuint, const GLuint*))wglGetProcAddress("glVertexAttrib4Nuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4Nusv) = (void(GLApi*)(GLuint, const GLushort*))wglGetProcAddress("glVertexAttrib4Nusv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4bv) = (void(GLApi*)(GLuint, const GLbyte*))wglGetProcAddress("glVertexAttrib4bv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4d) = (void(GLApi*)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble))wglGetProcAddress("glVertexAttrib4d"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4dv) = (void(GLApi*)(GLuint, const GLdouble*))wglGetProcAddress("glVertexAttrib4dv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4f) = (void(GLApi*)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat))wglGetProcAddress("glVertexAttrib4f"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4fv) = (void(GLApi*)(GLuint, const GLfloat*))wglGetProcAddress("glVertexAttrib4fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4iv) = (void(GLApi*)(GLuint, const GLint*))wglGetProcAddress("glVertexAttrib4iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4s) = (void(GLApi*)(GLuint, GLshort, GLshort, GLshort, GLshort))wglGetProcAddress("glVertexAttrib4s"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4sv) = (void(GLApi*)(GLuint, const GLshort*))wglGetProcAddress("glVertexAttrib4sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4ubv) = (void(GLApi*)(GLuint, const GLubyte*))wglGetProcAddress("glVertexAttrib4ubv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4uiv) = (void(GLApi*)(GLuint, const GLuint*))wglGetProcAddress("glVertexAttrib4uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttrib4usv) = (void(GLApi*)(GLuint, const GLushort*))wglGetProcAddress("glVertexAttrib4usv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribPointer) = (void(GLApi*)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*))wglGetProcAddress("glVertexAttribPointer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glEnableVertexAttribArray) = (void(GLApi*)(GLuint index))wglGetProcAddress("glEnableVertexAttribArray"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDisableVertexAttribArray) = (void(GLApi*)(GLuint index))wglGetProcAddress("glDisableVertexAttribArray"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetVertexAttribdv) = (void(GLApi*)(GLuint, GLenum, GLdouble*))wglGetProcAddress("glGetVertexAttribdv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetVertexAttribfv) = (void(GLApi*)(GLuint, GLenum, GLfloat*))wglGetProcAddress("glGetVertexAttribfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetVertexAttribiv) = (void(GLApi*)(GLuint, GLenum, GLint*))wglGetProcAddress("glGetVertexAttribiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetVertexAttribPointerv) = (void(GLApi*)(GLuint, GLenum, GLvoid**))wglGetProcAddress("glGetVertexAttribPointerv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glIsShader) = (GLboolean(GLApi*)(GLuint shader))wglGetProcAddress("glIsShader"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glIsProgram) = (GLboolean(GLApi*)(GLuint program))wglGetProcAddress("glIsProgram"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetShaderiv) = (void(GLApi*)(GLuint, GLenum, GLint*))wglGetProcAddress("glGetShaderiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetProgramiv) = (void(GLApi*)(GLuint, GLenum, GLint*))wglGetProcAddress("glGetProgramiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetAttachedShaders) = (void(GLApi*)(GLuint, GLsizei maxCount, GLsizei *count, GLuint*))wglGetProcAddress("glGetAttachedShaders"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetShaderInfoLog) = (void(GLApi*)(GLuint shader, GLsizei bufSize, GLsizei*, GLchar*))wglGetProcAddress("glGetShaderInfoLog"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetProgramInfoLog) = (void(GLApi*)(GLuint, GLsizei bufSize, GLsizei*, GLchar*))wglGetProcAddress("glGetProgramInfoLog"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetUniformLocation) = (GLint(GLApi*)(GLuint, const GLchar *name))wglGetProcAddress("glGetUniformLocation"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetActiveUniform) = (void(GLApi*)(GLuint, GLuint, GLsizei bufSize, GLsizei*, GLsizei*, GLenum*, GLchar*))wglGetProcAddress("glGetActiveUniform"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetUniformfv) = (void(GLApi*)(GLuint, GLint, GLfloat*))wglGetProcAddress("glGetUniformfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetUniformiv) = (void(GLApi*)(GLuint, GLint, GLint*))wglGetProcAddress("glGetUniformiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetShaderSource) = (void(GLApi*)(GLuint, GLsizei bufSize, GLsizei*, GLchar*))wglGetProcAddress("glGetShaderSource"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetActiveAttrib) = (void(GLApi*)(GLuint, GLuint, GLsizei bufSize, GLsizei*, GLsizei*, GLenum*, GLchar*))wglGetProcAddress("glGetActiveAttrib"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDrawBuffers) = (void(GLApi*)(GLsizei, const GLenum*))wglGetProcAddress("glDrawBuffers"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glStencilFuncSeparate) = (void(GLApi*)(GLenum, GLenum, GLint, GLuint))wglGetProcAddress("glStencilFuncSeparate"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glStencilOpSeparate) = (void(GLApi*)(GLenum, GLenum, GLenum, GLenum))wglGetProcAddress("glStencilOpSeparate"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glStencilMaskSeparate) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glStencilMaskSeparate"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBlendEquationSeparate) = (void(GLApi*)(GLenum, GLenum))wglGetProcAddress("glBlendEquationSeparate"))) ++ n_failed_function_num;

#endif // __GENERATE_GL_20__

	GLEH_OPENGL_2_0 = !n_failed_function_num && b_Support_OpenGL(2, 0);

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 2.0 ---
 */

/*
 *								--- OpenGL 2.1 ---
 */

#ifdef __GENERATE_GL_21__

void (GLApi *GLFuncPtrName(glUniformMatrix2x3fv))(GLint, GLsizei, GLboolean, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix3x2fv))(GLint, GLsizei, GLboolean, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix2x4fv))(GLint, GLsizei, GLboolean, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix4x2fv))(GLint, GLsizei, GLboolean, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix3x4fv))(GLint, GLsizei, GLboolean, const GLfloat*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix4x3fv))(GLint, GLsizei, GLboolean, const GLfloat*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_21__

bool GLEH_OPENGL_2_1 = false;

int CGL4ExtensionHandler::n_GetGL21FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_21__

	if(!(GLFuncPtrName(glUniformMatrix2x3fv) = (void(GLApi*)(GLint, GLsizei, GLboolean, const GLfloat*))wglGetProcAddress("glUniformMatrix2x3fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix3x2fv) = (void(GLApi*)(GLint, GLsizei, GLboolean, const GLfloat*))wglGetProcAddress("glUniformMatrix3x2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix2x4fv) = (void(GLApi*)(GLint, GLsizei, GLboolean, const GLfloat*))wglGetProcAddress("glUniformMatrix2x4fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix4x2fv) = (void(GLApi*)(GLint, GLsizei, GLboolean, const GLfloat*))wglGetProcAddress("glUniformMatrix4x2fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix3x4fv) = (void(GLApi*)(GLint, GLsizei, GLboolean, const GLfloat*))wglGetProcAddress("glUniformMatrix3x4fv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniformMatrix4x3fv) = (void(GLApi*)(GLint, GLsizei, GLboolean, const GLfloat*))wglGetProcAddress("glUniformMatrix4x3fv"))) ++ n_failed_function_num;

#endif // __GENERATE_GL_21__

	GLEH_OPENGL_2_1 = !n_failed_function_num && b_Support_OpenGL(2, 1);

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 2.1 ---
 */

/*
 *								--- OpenGL 3.0 ---
 */

#ifdef __GENERATE_GL_30__

void (GLApi *GLFuncPtrName(glColorMaski))(GLuint, GLboolean, GLboolean, GLboolean, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetBooleani_v))(GLenum, GLuint, GLboolean *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetIntegeri_v))(GLenum, GLuint, GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEnablei))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDisablei))(GLenum, GLuint) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsEnabledi))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBeginTransformFeedback))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEndTransformFeedback))(void) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindBufferRange))(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindBufferBase))(GLenum, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTransformFeedbackVaryings))(GLuint, GLsizei, const GLchar* *, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTransformFeedbackVarying))(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClampColor))(GLenum, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBeginConditionalRender))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEndConditionalRender))(void) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribIPointer))(GLuint, GLint, GLenum, GLsizei, const GLvoid *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribIiv))(GLuint, GLenum, GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribIuiv))(GLuint, GLenum, GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI1i))(GLuint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI2i))(GLuint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI3i))(GLuint, GLint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4i))(GLuint, GLint, GLint, GLint, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI1ui))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI2ui))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI3ui))(GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4ui))(GLuint, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI1iv))(GLuint, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI2iv))(GLuint, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI3iv))(GLuint, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4iv))(GLuint, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI1uiv))(GLuint, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI2uiv))(GLuint, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI3uiv))(GLuint, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4uiv))(GLuint, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4bv))(GLuint, const GLbyte *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4sv))(GLuint, const GLshort *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4ubv))(GLuint, const GLubyte *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribI4usv))(GLuint, const GLushort *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetUniformuiv))(GLuint, GLint, GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindFragDataLocation))(GLuint, GLuint, const GLchar *) INIT_FUNC_POINTERS;
GLint (GLApi *GLFuncPtrName(glGetFragDataLocation))(GLuint, const GLchar *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1ui))(GLint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2ui))(GLint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3ui))(GLint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4ui))(GLint, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1uiv))(GLint, GLsizei, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2uiv))(GLint, GLsizei, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3uiv))(GLint, GLsizei, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4uiv))(GLint, GLsizei, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexParameterIiv))(GLenum, GLenum, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexParameterIuiv))(GLenum, GLenum, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTexParameterIiv))(GLenum, GLenum, GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTexParameterIuiv))(GLenum, GLenum, GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearBufferiv))(GLenum, GLint, const GLint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearBufferuiv))(GLenum, GLint, const GLuint *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearBufferfv))(GLenum, GLint, const GLfloat *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearBufferfi))(GLenum, GLint, GLfloat, GLint) INIT_FUNC_POINTERS;
const GLubyte *(GLApi *GLFuncPtrName(glGetStringi))(GLenum, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_30__

bool GLEH_OPENGL_3_0 = false;

int CGL4ExtensionHandler::n_GetGL30FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_30__

	if(!(GLFuncPtrName(glColorMaski) = (void(GLApi*)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean))wglGetProcAddress("glColorMaski"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetBooleani_v) = (void(GLApi*)(GLenum, GLuint, GLboolean*))wglGetProcAddress("glGetBooleani_v"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetIntegeri_v) = (void(GLApi*)(GLenum, GLuint, GLint*))wglGetProcAddress("glGetIntegeri_v"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glEnablei) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEnablei"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glDisablei) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDisablei"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glIsEnabledi) = (GLboolean(GLApi*)(GLenum, GLuint))wglGetProcAddress("glIsEnabledi"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBeginTransformFeedback) = (void(GLApi*)(GLenum))wglGetProcAddress("glBeginTransformFeedback"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glEndTransformFeedback) = (void(GLApi*)(void))wglGetProcAddress("glEndTransformFeedback"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBindBufferRange) = (void(GLApi*)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr))wglGetProcAddress("glBindBufferRange"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBindBufferBase) = (void(GLApi*)(GLenum, GLuint, GLuint))wglGetProcAddress("glBindBufferBase"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glTransformFeedbackVaryings) = (void(GLApi*)(GLuint, GLsizei, const GLchar**, GLenum))wglGetProcAddress("glTransformFeedbackVaryings"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetTransformFeedbackVarying) = (void(GLApi*)(GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, GLchar*))wglGetProcAddress("glGetTransformFeedbackVarying"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glClampColor) = (void(GLApi*)(GLenum, GLenum))wglGetProcAddress("glClampColor"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBeginConditionalRender) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glBeginConditionalRender"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glEndConditionalRender) = (void(GLApi*)(void))wglGetProcAddress("glEndConditionalRender"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribIPointer) = (void(GLApi*)(GLuint, GLint, GLenum, GLsizei, const GLvoid*))wglGetProcAddress("glVertexAttribIPointer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetVertexAttribIiv) = (void(GLApi*)(GLuint, GLenum, GLint*))wglGetProcAddress("glGetVertexAttribIiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetVertexAttribIuiv) = (void(GLApi*)(GLuint, GLenum, GLuint*))wglGetProcAddress("glGetVertexAttribIuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI1i) = (void(GLApi*)(GLuint, GLint))wglGetProcAddress("glVertexAttribI1i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI2i) = (void(GLApi*)(GLuint, GLint, GLint))wglGetProcAddress("glVertexAttribI2i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI3i) = (void(GLApi*)(GLuint, GLint, GLint, GLint))wglGetProcAddress("glVertexAttribI3i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4i) = (void(GLApi*)(GLuint, GLint, GLint, GLint, GLint))wglGetProcAddress("glVertexAttribI4i"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI1ui) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glVertexAttribI1ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI2ui) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glVertexAttribI2ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI3ui) = (void(GLApi*)(GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glVertexAttribI3ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4ui) = (void(GLApi*)(GLuint, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glVertexAttribI4ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI1iv) = (void(GLApi*)(GLuint, const GLint*))wglGetProcAddress("glVertexAttribI1iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI2iv) = (void(GLApi*)(GLuint, const GLint*))wglGetProcAddress("glVertexAttribI2iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI3iv) = (void(GLApi*)(GLuint, const GLint*))wglGetProcAddress("glVertexAttribI3iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4iv) = (void(GLApi*)(GLuint, const GLint*))wglGetProcAddress("glVertexAttribI4iv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI1uiv) = (void(GLApi*)(GLuint, const GLuint*))wglGetProcAddress("glVertexAttribI1uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI2uiv) = (void(GLApi*)(GLuint, const GLuint*))wglGetProcAddress("glVertexAttribI2uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI3uiv) = (void(GLApi*)(GLuint, const GLuint*))wglGetProcAddress("glVertexAttribI3uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4uiv) = (void(GLApi*)(GLuint, const GLuint*))wglGetProcAddress("glVertexAttribI4uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4bv) = (void(GLApi*)(GLuint, const GLbyte*))wglGetProcAddress("glVertexAttribI4bv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4sv) = (void(GLApi*)(GLuint, const GLshort*))wglGetProcAddress("glVertexAttribI4sv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4ubv) = (void(GLApi*)(GLuint, const GLubyte*))wglGetProcAddress("glVertexAttribI4ubv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glVertexAttribI4usv) = (void(GLApi*)(GLuint, const GLushort*))wglGetProcAddress("glVertexAttribI4usv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetUniformuiv) = (void(GLApi*)(GLuint, GLint, GLuint*))wglGetProcAddress("glGetUniformuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glBindFragDataLocation) = (void(GLApi*)(GLuint, GLuint, const GLchar*))wglGetProcAddress("glBindFragDataLocation"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetFragDataLocation) = (GLint(GLApi*)(GLuint, const GLchar*))wglGetProcAddress("glGetFragDataLocation"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform1ui) = (void(GLApi*)(GLint, GLuint))wglGetProcAddress("glUniform1ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform2ui) = (void(GLApi*)(GLint, GLuint, GLuint))wglGetProcAddress("glUniform2ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform3ui) = (void(GLApi*)(GLint, GLuint, GLuint, GLuint))wglGetProcAddress("glUniform3ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform4ui) = (void(GLApi*)(GLint, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glUniform4ui"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform1uiv) = (void(GLApi*)(GLint, GLsizei, const GLuint*))wglGetProcAddress("glUniform1uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform2uiv) = (void(GLApi*)(GLint, GLsizei, const GLuint*))wglGetProcAddress("glUniform2uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform3uiv) = (void(GLApi*)(GLint, GLsizei, const GLuint*))wglGetProcAddress("glUniform3uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glUniform4uiv) = (void(GLApi*)(GLint, GLsizei, const GLuint*))wglGetProcAddress("glUniform4uiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glTexParameterIiv) = (void(GLApi*)(GLenum, GLenum, const GLint*))wglGetProcAddress("glTexParameterIiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glTexParameterIuiv) = (void(GLApi*)(GLenum, GLenum, const GLuint*))wglGetProcAddress("glTexParameterIuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetTexParameterIiv) = (void(GLApi*)(GLenum, GLenum, GLint*))wglGetProcAddress("glGetTexParameterIiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetTexParameterIuiv) = (void(GLApi*)(GLenum, GLenum, GLuint*))wglGetProcAddress("glGetTexParameterIuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glClearBufferiv) = (void(GLApi*)(GLenum, GLint, const GLint*))wglGetProcAddress("glClearBufferiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glClearBufferuiv) = (void(GLApi*)(GLenum, GLint, const GLuint*))wglGetProcAddress("glClearBufferuiv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glClearBufferfv) = (void(GLApi*)(GLenum, GLint, const GLfloat*))wglGetProcAddress("glClearBufferfv"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glClearBufferfi) = (void(GLApi*)(GLenum, GLint, GLfloat, GLint))wglGetProcAddress("glClearBufferfi"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetStringi) = (const GLubyte*(GLApi*)(GLenum, GLuint))wglGetProcAddress("glGetStringi"))) ++ n_failed_function_num;

#endif // __GENERATE_GL_30__

	n_failed_function_num +=
		n_GetARBDepthBufferFloatFuncPointers() +
		n_GetARBFramebufferObjectFuncPointers() +
		n_GetARBFramebufferSRGBFuncPointers() +
		n_GetARBHalfFloatVertexFuncPointers() +
		n_GetARBMapBufferRangeFuncPointers() +
		n_GetARBTextureCompressionRGtcFuncPointers() +
		n_GetARBTextureRGFuncPointers() +
		n_GetARBVertexArrayObjectFuncPointers();

	GLEH_OPENGL_3_0 = !n_failed_function_num && b_Support_OpenGL(3, 0) &&
		b_SupportedExtension("GL_ARB_depth_buffer_float") &&
		b_SupportedExtension("GL_ARB_framebuffer_object") &&
		b_SupportedExtension("GL_ARB_framebuffer_sRGB") &&
		b_SupportedExtension("GL_ARB_half_float_vertex") &&
		b_SupportedExtension("GL_ARB_map_buffer_range") &&
		b_SupportedExtension("GL_ARB_texture_compression_rgtc") &&
		b_SupportedExtension("GL_ARB_texture_rg") &&
		b_SupportedExtension("GL_ARB_vertex_array_object");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 3.0 ---
 */

/*
 *								--- OpenGL 3.1 ---
 */

#ifdef __GENERATE_GL_31__

void (GLApi *GLFuncPtrName(glTexBuffer))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPrimitiveRestartIndex))(GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_31__

bool GLEH_OPENGL_3_1 = false;

int CGL4ExtensionHandler::n_GetGL31FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_31__

	if(!(GLFuncPtrName(glTexBuffer) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glTexBuffer"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glPrimitiveRestartIndex) = (void(GLApi*)(GLuint))wglGetProcAddress("glPrimitiveRestartIndex"))) ++ n_failed_function_num;

#endif // __GENERATE_GL_31__

	n_failed_function_num += n_GetARBUniformBufferObjectFuncPointers() +
		n_GetARBDrawInstancedFuncPointers() +
		n_GetARBCopyBufferFuncPointers();

	GLEH_OPENGL_3_1 = !n_failed_function_num && b_Support_OpenGL(3, 1) &&
		b_SupportedExtension("GL_ARB_uniform_buffer_object") &&
		b_SupportedExtension("GL_ARB_draw_instanced") &&
		b_SupportedExtension("GL_ARB_copy_buffer");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 3.1 ---
 */

/*
 *								--- OpenGL 3.2 ---
 */

#ifdef __GENERATE_GL_32__

void (GLApi *GLFuncPtrName(glGetInteger64i_v))(GLenum, GLuint, GLint64 *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetBufferParameteri64v))(GLenum, GLenum, GLint64 *) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramParameteri))(GLuint, GLenum, GLint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferTexture))(GLenum, GLenum, GLuint, GLint) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glFramebufferTextureFace))(GLenum, GLenum, GLuint, GLint, GLenum) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_32__

bool GLEH_OPENGL_3_2 = false;

int CGL4ExtensionHandler::n_GetGL32FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_32__

	if(!(GLFuncPtrName(glGetInteger64i_v) = (void(GLApi*)(GLenum, GLuint, GLint64 *))wglGetProcAddress("glGetInteger64i_v"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glGetBufferParameteri64v) = (void(GLApi*)(GLenum, GLenum, GLint64 *))wglGetProcAddress("glGetBufferParameteri64v"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glProgramParameteri) = (void(GLApi*)(GLuint, GLenum, GLint))wglGetProcAddress("glProgramParameteri"))) ++ n_failed_function_num;
	if(!(GLFuncPtrName(glFramebufferTexture) = (void(GLApi*)(GLenum, GLenum, GLuint, GLint))wglGetProcAddress("glFramebufferTexture"))) ++ n_failed_function_num;
	//if(!(GLFuncPtrName(glFramebufferTextureFace) = (void(GLApi*)(GLenum, GLenum, GLuint, GLint, GLenum))wglGetProcAddress("glFramebufferTextureFace"))) ++ n_failed_function_num; // this one doesn't exist (a bug in the documentation)

#endif // __GENERATE_GL_32__

	n_failed_function_num +=
		n_GetARBDepthClampFuncPointers() +
		n_GetARBDrawElementsBaseVertexFuncPointers() +
		n_GetARBFragmentCoordConventionsFuncPointers() +
		n_GetARBProvokingVertexFuncPointers() +
		n_GetARBSeamlessCubeMapFuncPointers() +
		n_GetARBSyncFuncPointers() +
		n_GetARBTextureMultisampleFuncPointers() +
		n_GetARBVertexArrayBGRAFuncPointers();

	GLEH_OPENGL_3_2 = !n_failed_function_num && b_Support_OpenGL(3, 2) &&
		b_SupportedExtension("GL_ARB_depth_clamp") &&
		b_SupportedExtension("GL_ARB_draw_elements_base_vertex") &&
		b_SupportedExtension("GL_ARB_fragment_coord_conventions") &&
		b_SupportedExtension("GL_ARB_provoking_vertex") &&
		b_SupportedExtension("GL_ARB_seamless_cube_map") &&
		b_SupportedExtension("GL_ARB_sync") &&
		b_SupportedExtension("GL_ARB_texture_multisample") &&
		b_SupportedExtension("GL_ARB_vertex_array_bgra");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 3.2 ---
 */

/*
 *								--- OpenGL 3.3 ---
 */

#ifdef __GENERATE_GL_33__

// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_33__

bool GLEH_OPENGL_3_3 = false;

int CGL4ExtensionHandler::n_GetGL33FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_33__

	// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_33__

	n_failed_function_num +=
		n_GetARBShaderBitEncodingFuncPointers() +
		n_GetARBBlendFuncExtendedFuncPointers() +
		n_GetARBExplicitAttribLocationFuncPointers() +
		n_GetARBOcclusionQuery2FuncPointers() +
		n_GetARBSamplerObjectsFuncPointers() +
		n_GetARBTextureRGB10A2uiFuncPointers() +
		n_GetARBTextureSwizzleFuncPointers() +
		n_GetARBTimerQueryFuncPointers() +
		n_GetARBInstancedArraysFuncPointers() +
		n_GetARBVertexType2101010RevFuncPointers();

	GLEH_OPENGL_3_3 = !n_failed_function_num && b_Support_OpenGL(3, 2) &&
		b_SupportedExtension("GL_ARB_shader_bit_encoding") &&
		b_SupportedExtension("GL_ARB_blend_func_extended") &&
		b_SupportedExtension("GL_ARB_explicit_attrib_location") &&
		b_SupportedExtension("GL_ARB_occlusion_query2") &&
		b_SupportedExtension("GL_ARB_sampler_objects") &&
		b_SupportedExtension("GL_ARB_texture_rgb10_a2ui") &&
		b_SupportedExtension("GL_ARB_texture_swizzle") &&
		b_SupportedExtension("GL_ARB_timer_query") &&
		b_SupportedExtension("GL_ARB_instanced_arrays") &&
		b_SupportedExtension("GL_ARB_vertex_type_2_10_10_10_rev");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 3.3 ---
 */

/*
 *								--- OpenGL 4.0 ---
 */

#ifdef __GENERATE_GL_40__

// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_40__

bool GLEH_OPENGL_4_0 = false;

int CGL4ExtensionHandler::n_GetGL40FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_40__

	// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_40__

	n_failed_function_num +=
		n_GetARBTextureQueryLodFuncPointers() +
		n_GetARBDrawBuffersBlendFuncPointers() +
		n_GetARBDrawIndirectFuncPointers() +
		n_GetARBGPUShader5FuncPointers() +
		n_GetARBGPUShaderFP64FuncPointers() +
		n_GetARBSampleShadingFuncPointers() +
		n_GetARBShaderSubroutineFuncPointers() +
		n_GetARBTessellationShaderFuncPointers() +
		n_GetARBTextureBufferObjectRGB32FuncPointers() +
		n_GetARBTextureGatherFuncPointers() +
		n_GetARBTextureCubeMapArrayFuncPointers() +
		n_GetARBTransformFeedback2FuncPointers() +
		n_GetARBTransformFeedback3FuncPointers();

	GLEH_OPENGL_4_0 = !n_failed_function_num && b_Support_OpenGL(4, 0) &&
		b_SupportedExtension("GL_ARB_texture_query_lod") &&
		b_SupportedExtension("GL_ARB_draw_buffers_blend") &&
		b_SupportedExtension("GL_ARB_draw_indirect") &&
		b_SupportedExtension("GL_ARB_gpu_shader5") &&
		b_SupportedExtension("GL_ARB_gpu_shader_fp64") &&
		b_SupportedExtension("GL_ARB_sample_shading") &&
		b_SupportedExtension("GL_ARB_shader_subroutine") &&
		b_SupportedExtension("GL_ARB_tessellation_shader") &&
		b_SupportedExtension("GL_ARB_texture_buffer_object_rgb32") &&
		b_SupportedExtension("GL_ARB_texture_cube_map_array") &&
		b_SupportedExtension("GL_ARB_texture_gather") &&
		b_SupportedExtension("GL_ARB_transform_feedback2") &&
		b_SupportedExtension("GL_ARB_transform_feedback3");

	return n_failed_function_num; 
}

/*
 *								--- ~OpenGL 4.0 ---
 */

/*
 *								--- OpenGL 4.1 ---
 */

#ifdef __GENERATE_GL_41__

// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_41__

bool GLEH_OPENGL_4_1 = false;

int CGL4ExtensionHandler::n_GetGL41FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_41__

	// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_41__

	n_failed_function_num +=
		n_GetARBES2CompatibilityFuncPointers() +
		n_GetARBGetProgramBinaryFuncPointers() +
		n_GetARBSeparateShaderObjectsFuncPointers() +
		n_GetARBShaderPrecisionFuncPointers() +
		n_GetARBVertexAttrib64bitFuncPointers() +
		n_GetARBViewportArrayFuncPointers();
 
	GLEH_OPENGL_4_1 = !n_failed_function_num && b_Support_OpenGL(4, 1) &&
		b_SupportedExtension("GL_ARB_ES2_compatibility") &&
		b_SupportedExtension("GL_ARB_get_program_binary") &&
		b_SupportedExtension("GL_ARB_separate_shader_objects") &&
		b_SupportedExtension("GL_ARB_shader_precision") &&
		b_SupportedExtension("GL_ARB_vertex_attrib_64bit") &&
		b_SupportedExtension("GL_ARB_viewport_array");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 4.1 ---
 */

/*
 *								--- OpenGL 4.2 ---
 */

#ifdef __GENERATE_GL_42__

// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_42__

bool GLEH_OPENGL_4_2 = false;

int CGL4ExtensionHandler::n_GetGL42FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_42__

	// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_42__

	n_failed_function_num +=
		n_GetARBTextureCompressionBptcFuncPointers() +
		n_GetARBCompressedTexturePixelStorageFuncPointers() +
		n_GetARBShaderAtomicCountersFuncPointers() +
		n_GetARBTextureStorageFuncPointers() +
		n_GetARBTransformFeedbackInstancedFuncPointers() +
		n_GetARBBaseInstanceFuncPointers() +
		n_GetARBShaderImageLoadStoreFuncPointers() +
		n_GetARBConservativeDepthFuncPointers() +
		n_GetARBShadingLanguage420packFuncPointers() +
		n_GetARBInternalformatQueryFuncPointers() +
		n_GetARBMapBufferAlignmentFuncPointers() +
		n_GetARBShadingLanguagePackingFuncPointers();

	GLEH_OPENGL_4_2 = !n_failed_function_num && b_Support_OpenGL(4, 2) &&
		b_SupportedExtension("GL_ARB_texture_compression_bptc") &&
		b_SupportedExtension("GL_ARB_compressed_texture_pixel_storage") &&
		b_SupportedExtension("GL_ARB_shader_atomic_counters") &&
		b_SupportedExtension("GL_ARB_texture_storage") &&
		b_SupportedExtension("GL_ARB_transform_feedback_instanced") &&
		b_SupportedExtension("GL_ARB_base_instance") &&
		b_SupportedExtension("GL_ARB_shader_image_load_store") &&
		b_SupportedExtension("GL_ARB_conservative_depth") &&
		b_SupportedExtension("GL_ARB_shading_language_420pack") &&
		b_SupportedExtension("GL_ARB_internalformat_query") &&
		b_SupportedExtension("GL_ARB_map_buffer_alignment") &&
		b_SupportedExtension("GL_ARB_shading_language_packing");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 4.2 ---
 */

/*
 *								--- OpenGL 4.3 ---
 */

#ifdef __GENERATE_GL_43__

// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_43__

bool GLEH_OPENGL_4_3 = false;

int CGL4ExtensionHandler::n_GetGL43FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_43__

	// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_43__

	n_failed_function_num += n_GetARBArraysOfArraysFuncPointers() +
		n_GetARBES3CompatibilityFuncPointers() +
		n_GetARBClearBufferObjectFuncPointers() +
		n_GetARBComputeShaderFuncPointers() +
		n_GetARBCopyImageFuncPointers() +
		n_GetARBDebugGroupFuncPointers() +
		n_GetARBDebugLabelFuncPointers() +
		n_GetARBDebugOutput2FuncPointers() +
		n_GetARBDebugOutputFuncPointers() +
		n_GetARBExplicitUniformLocationFuncPointers() +
		n_GetARBFragmentLayerViewportFuncPointers() +
		n_GetARBFramebufferNoAttachmentsFuncPointers() +
		n_GetARBInternalformatQuery2FuncPointers() +
		n_GetARBInvalidateSubdataFuncPointers() +
		n_GetARBMultiDrawIndirectFuncPointers() +
		n_GetARBProgramInterfaceQueryFuncPointers() +
		n_GetARBRobustBufferAccessBehaviorFuncPointers() +
		n_GetARBShaderImageSizeFuncPointers() +
		n_GetARBShaderStorageBufferObjectFuncPointers() +
		n_GetARBStencilTexturingFuncPointers() +
		n_GetARBTextureBufferRangeFuncPointers() +
		n_GetARBTextureQueryLevelsFuncPointers() +
		n_GetARBTextureStorageMultisampleFuncPointers() +
		n_GetARBTextureViewFuncPointers() +
		n_GetARBVertexAttribBindingFuncPointers() +
		n_GetKHRTextureCompressionASTC_HDRFuncPointers() +
		n_GetARBRobustnessIsolationFuncPointers();

	GLEH_OPENGL_4_3 = !n_failed_function_num && b_Support_OpenGL(4, 3) &&
		b_SupportedExtension("GL_ARB_arrays_of_arrays") &&
		b_SupportedExtension("GL_ARB_ES3_compatibility") &&
		b_SupportedExtension("GL_ARB_clear_buffer_object") &&
		b_SupportedExtension("GL_ARB_compute_shader") &&
		b_SupportedExtension("GL_ARB_copy_image") &&
		//b_SupportedExtension("GL_ARB_debug_group") &&
		//b_SupportedExtension("GL_ARB_debug_label") &&
		//b_SupportedExtension("GL_ARB_debug_output2") &&
		b_SupportedExtension("GL_ARB_debug_output") &&
		b_SupportedExtension("GL_ARB_explicit_uniform_location") &&
		b_SupportedExtension("GL_ARB_fragment_layer_viewport") &&
		b_SupportedExtension("GL_ARB_framebuffer_no_attachments") &&
		b_SupportedExtension("GL_ARB_internalformat_query2") &&
		b_SupportedExtension("GL_ARB_invalidate_subdata") &&
		b_SupportedExtension("GL_ARB_multi_draw_indirect") &&
		b_SupportedExtension("GL_ARB_program_interface_query") &&
		b_SupportedExtension("GL_ARB_robust_buffer_access_behavior") &&
		b_SupportedExtension("GL_ARB_shader_image_size") &&
		b_SupportedExtension("GL_ARB_shader_storage_buffer_object") &&
		b_SupportedExtension("GL_ARB_stencil_texturing") &&
		b_SupportedExtension("GL_ARB_texture_buffer_range") &&
		b_SupportedExtension("GL_ARB_texture_query_levels") &&
		b_SupportedExtension("GL_ARB_texture_storage_multisample") &&
		b_SupportedExtension("GL_ARB_texture_view") &&
		b_SupportedExtension("GL_ARB_vertex_attrib_binding") /*&&
		b_SupportedExtension("GL_KHR_texture_compression_astc_ldr") && // this is not in the lists of extensions supported by NVidia's GL 4.4 but the entry points are there
		b_SupportedExtension("GL_ARB_robustness_isolation")*/;

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 4.3 ---
 */

/*
 *								--- OpenGL 4.4 ---
 */

#ifdef __GENERATE_GL_44__

// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_44__

bool GLEH_OPENGL_4_4 = false;

int CGL4ExtensionHandler::n_GetGL44FuncPointers()
{
	int n_failed_function_num = 0;

#ifdef __GENERATE_GL_44__

	// f_ixme - no new tokens, except the exts?

#endif // __GENERATE_GL_44__

	n_failed_function_num += n_GetARBBufferStorageFuncPointers() +
		n_GetARBClearTextureFuncPointers() +
		n_GetARBEnhancedLayoutsFuncPointers() +
		n_GetARBMultiBindFuncPointers() +
		n_GetARBQueryBufferObjectFuncPointers() +
		n_GetARBTextureMirrorClampToEdgeFuncPointers() +
		n_GetARBTextureStencil8FuncPointers() +
		n_GetARBVertexType10f11f11fRevFuncPointers();

	GLEH_OPENGL_4_4 = !n_failed_function_num && b_Support_OpenGL(4, 4) &&
		b_SupportedExtension("GL_ARB_buffer_storage") &&
		b_SupportedExtension("GL_ARB_clear_texture") &&
		b_SupportedExtension("GL_ARB_enhanced_layouts") &&
		b_SupportedExtension("GL_ARB_multi_bind") &&
		b_SupportedExtension("GL_ARB_query_buffer_object") &&
		b_SupportedExtension("GL_ARB_texture_mirror_clamp_to_edge") &&
		b_SupportedExtension("GL_ARB_texture_stencil8") &&
		b_SupportedExtension("GL_ARB_vertex_type_10f_11f_11f_rev");

	return n_failed_function_num;
}

/*
 *								--- ~OpenGL 4.4 ---
 */

/*
 *								--- GL_ARB_depth_buffer_float (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_depth_buffer_float = false;

int CGL4ExtensionHandler::n_GetARBDepthBufferFloatFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_depth_buffer_float = !n_failed_functions && b_SupportedExtension("GL_ARB_depth_buffer_float");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_depth_buffer_float ---
 */

/*
 *								--- GL_ARB_framebuffer_object (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_framebuffer_object = false;

#ifdef __GENERATE_GL_ARB_framebuffer_object

GLboolean (GLApi *GLFuncPtrName(glIsRenderbuffer))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindRenderbuffer))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteRenderbuffers))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenRenderbuffers))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glRenderbufferStorage))(GLenum, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glRenderbufferStorageMultisample))(GLenum, GLsizei, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetRenderbufferParameteriv))(GLenum, GLenum, int*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsFramebuffer))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindFramebuffer))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteFramebuffers))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenFramebuffers))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
GLenum (GLApi *GLFuncPtrName(glCheckFramebufferStatus))(GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferTexture1D))(GLenum, GLenum, GLenum, GLuint, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferTexture2D))(GLenum, GLenum, GLenum, GLuint, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferTexture3D))(GLenum, GLenum, GLenum, GLuint, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferTextureLayer))(GLenum, GLenum, GLuint, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferRenderbuffer))(GLenum, GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetFramebufferAttachmentParameteriv))(GLenum, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBlitFramebuffer))(int, int, int, int, int, int, int, int, GLbitfield, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenerateMipmap))(GLenum) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_framebuffer_object

int CGL4ExtensionHandler::n_GetARBFramebufferObjectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_framebuffer_object

	if(!(GLFuncPtrName(glIsRenderbuffer) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsRenderbuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindRenderbuffer) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glBindRenderbuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteRenderbuffers) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteRenderbuffers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenRenderbuffers) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenRenderbuffers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glRenderbufferStorage) = (void(GLApi*)(GLenum, GLenum, GLsizei, GLsizei))wglGetProcAddress("glRenderbufferStorage"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glRenderbufferStorageMultisample) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei))wglGetProcAddress("glRenderbufferStorageMultisample"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetRenderbufferParameteriv) = (void(GLApi*)(GLenum, GLenum, int*))wglGetProcAddress("glGetRenderbufferParameteriv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsFramebuffer) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsFramebuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindFramebuffer) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glBindFramebuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteFramebuffers) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteFramebuffers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenFramebuffers) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenFramebuffers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCheckFramebufferStatus) = (GLenum(GLApi*)(GLenum))wglGetProcAddress("glCheckFramebufferStatus"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferTexture1D) = (void(GLApi*)(GLenum, GLenum, GLenum, GLuint, int))wglGetProcAddress("glFramebufferTexture1D"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferTexture2D) = (void(GLApi*)(GLenum, GLenum, GLenum, GLuint, int))wglGetProcAddress("glFramebufferTexture2D"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferTexture3D) = (void(GLApi*)(GLenum, GLenum, GLenum, GLuint, int, int))wglGetProcAddress("glFramebufferTexture3D"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferTextureLayer) = (void(GLApi*)(GLenum, GLenum, GLuint, int, int))wglGetProcAddress("glFramebufferTextureLayer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferRenderbuffer) = (void(GLApi*)(GLenum, GLenum, GLenum, GLuint))wglGetProcAddress("glFramebufferRenderbuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFramebufferAttachmentParameteriv) = (void(GLApi*)(GLenum, GLenum, GLenum, int*))wglGetProcAddress("glGetFramebufferAttachmentParameteriv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBlitFramebuffer) = (void(GLApi*)(int, int, int, int, int, int, int, int, GLbitfield, GLenum))wglGetProcAddress("glBlitFramebuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenerateMipmap) = (void(GLApi*)(GLenum))wglGetProcAddress("glGenerateMipmap"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_framebuffer_object

	GLEH_ARB_framebuffer_object = !n_failed_functions && b_SupportedExtension("GL_ARB_framebuffer_object");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_framebuffer_object ---
 */

/*
 *								--- GL_ARB_framebuffer_sRGB (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_framebuffer_sRGB = false;

int CGL4ExtensionHandler::n_GetARBFramebufferSRGBFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_framebuffer_sRGB = !n_failed_functions && b_SupportedExtension("GL_ARB_framebuffer_sRGB");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_framebuffer_sRGB ---
 */

/*
 *								--- GL_ARB_half_float_vertex (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_half_float_vertex = false;

int CGL4ExtensionHandler::n_GetARBHalfFloatVertexFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_half_float_vertex = !n_failed_functions && b_SupportedExtension("GL_ARB_half_float_vertex");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_half_float_vertex ---
 */

/*
 *								--- GL_ARB_map_buffer_range (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_map_buffer_range = false;

#ifdef __GENERATE_GL_ARB_map_buffer_range

void* (GLApi *GLFuncPtrName(glMapBufferRange))(GLenum, GLintptr, GLsizeiptr, GLbitfield) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFlushMappedBufferRange))(GLenum, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_map_buffer_range

int CGL4ExtensionHandler::n_GetARBMapBufferRangeFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_map_buffer_range

	if(!(GLFuncPtrName(glMapBufferRange) = (void*(GLApi*)(GLenum, GLintptr, GLsizeiptr, GLbitfield))wglGetProcAddress("glMapBufferRange"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFlushMappedBufferRange) = (void(GLApi*)(GLenum, GLintptr, GLsizeiptr))wglGetProcAddress("glFlushMappedBufferRange"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_map_buffer_range

	GLEH_ARB_map_buffer_range = !n_failed_functions && b_SupportedExtension("GL_ARB_map_buffer_range");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_map_buffer_range ---
 */

/*
 *								--- GL_ARB_texture_compression_rgtc (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_texture_compression_rgtc = false;

int CGL4ExtensionHandler::n_GetARBTextureCompressionRGtcFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_compression_rgtc = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_compression_rgtc");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_compression_rgtc ---
 */

/*
 *								--- GL_ARB_texture_rg (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_texture_rg = false;

int CGL4ExtensionHandler::n_GetARBTextureRGFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_rg = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_rg");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_rg ---
 */

/*
 *								--- GL_ARB_vertex_array_object (part of OpenGL 3.0 core) ---
 */

bool GLEH_ARB_vertex_array_object = false;

#ifdef __GENERATE_GL_ARB_vertex_array_object

void (GLApi *GLFuncPtrName(glBindVertexArray))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteVertexArrays))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenVertexArrays))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsVertexArray))(GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_vertex_array_object

int CGL4ExtensionHandler::n_GetARBVertexArrayObjectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_vertex_array_object

	if(!(GLFuncPtrName(glBindVertexArray) = (void(GLApi*)(GLuint))wglGetProcAddress("glBindVertexArray"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteVertexArrays) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteVertexArrays"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenVertexArrays) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenVertexArrays"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsVertexArray) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsVertexArray"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_vertex_array_object

	GLEH_ARB_vertex_array_object = !n_failed_functions && b_SupportedExtension("GL_ARB_vertex_array_object");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_vertex_array_object ---
 */

/*
 *								--- GL_ARB_uniform_buffer_object (part of OpenGL 3.1 core) ---
 */

bool GLEH_ARB_uniform_buffer_object = false;

#ifdef __GENERATE_GL_ARB_uniform_buffer_object

void (GLApi *GLFuncPtrName(glGetUniformIndices))(GLuint, GLsizei, const GLchar**, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveUniformsiv))(GLuint, GLsizei, const GLuint*, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveUniformName))(GLuint, GLuint, GLsizei, GLsizei*, GLchar*) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glGetUniformBlockIndex))(GLuint, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveUniformBlockiv))(GLuint, GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveUniformBlockName))(GLuint, GLuint, GLsizei, GLsizei*, GLchar*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glBindBufferRange))(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glBindBufferBase))(GLenum, GLuint, GLuint) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glGetIntegeri_v))(GLenum, GLuint, int*) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glUniformBlockBinding))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_uniform_buffer_object

int CGL4ExtensionHandler::n_GetARBUniformBufferObjectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_uniform_buffer_object

	if(!(GLFuncPtrName(glGetUniformIndices) = (void(GLApi*)(GLuint, GLsizei, const GLchar**, GLuint*))wglGetProcAddress("glGetUniformIndices"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveUniformsiv) = (void(GLApi*)(GLuint, GLsizei, const GLuint*, GLenum, int*))wglGetProcAddress("glGetActiveUniformsiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveUniformName) = (void(GLApi*)(GLuint, GLuint, GLsizei, GLsizei*, GLchar*))wglGetProcAddress("glGetActiveUniformName"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetUniformBlockIndex) = (GLuint(GLApi*)(GLuint, const GLchar*))wglGetProcAddress("glGetUniformBlockIndex"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveUniformBlockiv) = (void(GLApi*)(GLuint, GLuint, GLenum, int*))wglGetProcAddress("glGetActiveUniformBlockiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveUniformBlockName) = (void(GLApi*)(GLuint, GLuint, GLsizei, GLsizei*, GLchar*))wglGetProcAddress("glGetActiveUniformBlockName"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindBufferRange) = (void(GLApi*)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr))wglGetProcAddress("glBindBufferRange"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindBufferBase) = (void(GLApi*)(GLenum, GLuint, GLuint))wglGetProcAddress("glBindBufferBase"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetIntegeri_v) = (void(GLApi*)(GLenum, GLuint, int*))wglGetProcAddress("glGetIntegeri_v"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformBlockBinding) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glUniformBlockBinding"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_uniform_buffer_object

	GLEH_ARB_uniform_buffer_object = !n_failed_functions && b_SupportedExtension("GL_ARB_uniform_buffer_object");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_uniform_buffer_object ---
 */

/*
 *								--- GL_ARB_draw_instanced (part of OpenGL 3.1 core) ---
 */

bool GLEH_ARB_draw_instanced = false;

#ifdef __GENERATE_GL_ARB_draw_instanced

void (GLApi *GLFuncPtrName(glDrawArraysInstanced))(GLenum, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawElementsInstanced))(GLenum, GLsizei, GLenum, const void*, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_draw_instanced

int CGL4ExtensionHandler::n_GetARBDrawInstancedFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_draw_instanced

	if(!(GLFuncPtrName(glDrawArraysInstanced) = (void(GLApi*)(GLenum, int, GLsizei, GLsizei))wglGetProcAddress("glDrawArraysInstancedARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawElementsInstanced) = (void(GLApi*)(GLenum, GLsizei, GLenum, const void*, GLsizei))wglGetProcAddress("glDrawElementsInstancedARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_draw_instanced

	GLEH_ARB_draw_instanced = !n_failed_functions && b_SupportedExtension("GL_ARB_draw_instanced");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_draw_instanced ---
 */

/*
 *								--- GL_ARB_copy_buffer (part of OpenGL 3.1 core) ---
 */

bool GLEH_ARB_copy_buffer = false;

#ifdef __GENERATE_GL_ARB_copy_buffer

void (GLApi *GLFuncPtrName(glCopyBufferSubData))(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_copy_buffer

int CGL4ExtensionHandler::n_GetARBCopyBufferFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_copy_buffer

	if(!(GLFuncPtrName(glCopyBufferSubData) = (void(GLApi*)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr))wglGetProcAddress("glCopyBufferSubData"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_copy_buffer

	GLEH_ARB_copy_buffer = !n_failed_functions && b_SupportedExtension("GL_ARB_copy_buffer");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_copy_buffer ---
 */

/*
 *								--- GL_ARB_depth_clamp (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_depth_clamp = false;

int CGL4ExtensionHandler::n_GetARBDepthClampFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_depth_clamp = !n_failed_functions && b_SupportedExtension("GL_ARB_depth_clamp");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_depth_clamp ---
 */

/*
 *								--- GL_ARB_draw_elements_base_vertex (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_draw_elements_base_vertex = false;

#ifdef __GENERATE_GL_ARB_draw_elements_base_vertex

void (GLApi *GLFuncPtrName(glDrawElementsBaseVertex))(GLenum, GLsizei, GLenum, void*, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawRangeElementsBaseVertex))(GLenum, GLuint, GLuint, GLsizei, GLenum, void*, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawElementsInstancedBaseVertex))(GLenum, GLsizei, GLenum, const void*, GLsizei, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiDrawElementsBaseVertex))(GLenum, GLsizei*, GLenum, void**, GLsizei, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_draw_elements_base_vertex

int CGL4ExtensionHandler::n_GetARBDrawElementsBaseVertexFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_draw_elements_base_vertex

	if(!(GLFuncPtrName(glDrawElementsBaseVertex) = (void(GLApi*)(GLenum, GLsizei, GLenum, void*, int))wglGetProcAddress("glDrawElementsBaseVertex"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawRangeElementsBaseVertex) = (void(GLApi*)(GLenum, GLuint, GLuint, GLsizei, GLenum, void*, int))wglGetProcAddress("glDrawRangeElementsBaseVertex"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawElementsInstancedBaseVertex) = (void(GLApi*)(GLenum, GLsizei, GLenum, const void*, GLsizei, int))wglGetProcAddress("glDrawElementsInstancedBaseVertex"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiDrawElementsBaseVertex) = (void(GLApi*)(GLenum, GLsizei*, GLenum, void**, GLsizei, int*))wglGetProcAddress("glMultiDrawElementsBaseVertex"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_draw_elements_base_vertex

	GLEH_ARB_draw_elements_base_vertex = !n_failed_functions && b_SupportedExtension("GL_ARB_draw_elements_base_vertex");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_draw_elements_base_vertex ---
 */

/*
 *								--- GL_ARB_fragment_coord_conventions (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_fragment_coord_conventions = false;

int CGL4ExtensionHandler::n_GetARBFragmentCoordConventionsFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_fragment_coord_conventions = !n_failed_functions && b_SupportedExtension("GL_ARB_fragment_coord_conventions");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_fragment_coord_conventions ---
 */

/*
 *								--- GL_ARB_provoking_vertex (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_provoking_vertex = false;

#ifdef __GENERATE_GL_ARB_provoking_vertex

void (GLApi *GLFuncPtrName(glProvokingVertex))(GLenum) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_provoking_vertex

int CGL4ExtensionHandler::n_GetARBProvokingVertexFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_provoking_vertex

	if(!(GLFuncPtrName(glProvokingVertex) = (void(GLApi*)(GLenum))wglGetProcAddress("glProvokingVertex"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_provoking_vertex

	GLEH_ARB_provoking_vertex = !n_failed_functions && b_SupportedExtension("GL_ARB_provoking_vertex");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_provoking_vertex ---
 */

/*
 *								--- GL_ARB_seamless_cube_map (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_seamless_cube_map = false;

int CGL4ExtensionHandler::n_GetARBSeamlessCubeMapFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_seamless_cube_map = !n_failed_functions && b_SupportedExtension("GL_ARB_seamless_cube_map");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_seamless_cube_map ---
 */

/*
 *								--- GL_ARB_sync (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_sync = false;

#ifdef __GENERATE_GL_ARB_sync

GLsync (GLApi *GLFuncPtrName(glFenceSync))(GLenum, GLbitfield) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsSync))(GLsync) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteSync))(GLsync) INIT_FUNC_POINTERS;
GLenum (GLApi *GLFuncPtrName(glClientWaitSync))(GLsync, GLbitfield, GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glWaitSync))(GLsync, GLbitfield, GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetInteger64v))(GLenum, GLint64*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetSynciv))(GLsync, GLenum, GLsizei, GLsizei*, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_sync

int CGL4ExtensionHandler::n_GetARBSyncFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_sync

	if(!(GLFuncPtrName(glFenceSync) = (GLsync(GLApi*)(GLenum, GLbitfield))wglGetProcAddress("glFenceSync"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsSync) = (GLboolean(GLApi*)(GLsync))wglGetProcAddress("glIsSync"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteSync) = (void(GLApi*)(GLsync))wglGetProcAddress("glDeleteSync"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glClientWaitSync) = (GLenum(GLApi*)(GLsync, GLbitfield, GLuint64))wglGetProcAddress("glClientWaitSync"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glWaitSync) = (void(GLApi*)(GLsync, GLbitfield, GLuint64))wglGetProcAddress("glWaitSync"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetInteger64v) = (void(GLApi*)(GLenum, GLint64*))wglGetProcAddress("glGetInteger64v"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetSynciv) = (void(GLApi*)(GLsync, GLenum, GLsizei, GLsizei*, int*))wglGetProcAddress("glGetSynciv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_sync

	GLEH_ARB_sync = !n_failed_functions && b_SupportedExtension("GL_ARB_sync");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_sync ---
 */

/*
 *								--- GL_ARB_texture_multisample (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_texture_multisample = false;

#ifdef __GENERATE_GL_ARB_texture_multisample

void (GLApi *GLFuncPtrName(glTexImage2DMultisample))(GLenum, GLsizei, int, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexImage3DMultisample))(GLenum, GLsizei, int, GLsizei, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultisamplefv))(GLenum, GLuint, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSampleMaski))(GLuint, GLbitfield) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_texture_multisample

int CGL4ExtensionHandler::n_GetARBTextureMultisampleFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_texture_multisample

	if(!(GLFuncPtrName(glTexImage2DMultisample) = (void(GLApi*)(GLenum, GLsizei, int, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTexImage2DMultisample"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTexImage3DMultisample) = (void(GLApi*)(GLenum, GLsizei, int, GLsizei, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTexImage3DMultisample"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultisamplefv) = (void(GLApi*)(GLenum, GLuint, float*))wglGetProcAddress("glGetMultisamplefv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSampleMaski) = (void(GLApi*)(GLuint, GLbitfield))wglGetProcAddress("glSampleMaski"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_texture_multisample

	GLEH_ARB_texture_multisample = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_multisample");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_multisample ---
 */

/*
 *								--- GL_ARB_vertex_array_bgra (part of OpenGL 3.2 core) ---
 */

bool GLEH_ARB_vertex_array_bgra = false;

int CGL4ExtensionHandler::n_GetARBVertexArrayBGRAFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_vertex_array_bgra = !n_failed_functions && b_SupportedExtension("GL_ARB_vertex_array_bgra");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_vertex_array_bgra ---
 */

/*
 *								--- GL_ARB_shader_bit_encoding (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_shader_bit_encoding = false;

int CGL4ExtensionHandler::n_GetARBShaderBitEncodingFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_bit_encoding = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_bit_encoding");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_bit_encoding ---
 */

/*
 *								--- GL_ARB_blend_func_extended (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_blend_func_extended = false;

#ifdef __GENERATE_GL_ARB_blend_func_extended

void (GLApi *GLFuncPtrName(glBindFragDataLocationIndexed))(GLuint, GLuint, GLuint, const GLchar*) INIT_FUNC_POINTERS;
int (GLApi *GLFuncPtrName(glGetFragDataIndex))(GLuint, const GLchar*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_blend_func_extended

int CGL4ExtensionHandler::n_GetARBBlendFuncExtendedFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_blend_func_extended

	if(!(GLFuncPtrName(glBindFragDataLocationIndexed) = (void(GLApi*)(GLuint, GLuint, GLuint, const GLchar*))wglGetProcAddress("glBindFragDataLocationIndexed"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFragDataIndex) = (int(GLApi*)(GLuint, const GLchar*))wglGetProcAddress("glGetFragDataIndex"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_blend_func_extended

	GLEH_ARB_blend_func_extended = !n_failed_functions && b_SupportedExtension("GL_ARB_blend_func_extended");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_blend_func_extended ---
 */

/*
 *								--- GL_ARB_explicit_attrib_location (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_explicit_attrib_location = false;

int CGL4ExtensionHandler::n_GetARBExplicitAttribLocationFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_explicit_attrib_location = !n_failed_functions && b_SupportedExtension("GL_ARB_explicit_attrib_location");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_explicit_attrib_location ---
 */

/*
 *								--- GL_ARB_occlusion_query2 (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_occlusion_query2 = false;

int CGL4ExtensionHandler::n_GetARBOcclusionQuery2FuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_occlusion_query2 = !n_failed_functions && b_SupportedExtension("GL_ARB_occlusion_query2");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_occlusion_query2 ---
 */

/*
 *								--- GL_ARB_sampler_objects (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_sampler_objects = false;

#ifdef __GENERATE_GL_ARB_sampler_objects

void (GLApi *GLFuncPtrName(glGenSamplers))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteSamplers))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsSampler))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindSampler))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSamplerParameteri))(GLuint, GLenum, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSamplerParameterf))(GLuint, GLenum, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSamplerParameteriv))(GLuint, GLenum, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSamplerParameterfv))(GLuint, GLenum, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSamplerParameterIiv))(GLuint, GLenum, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glSamplerParameterIuiv))(GLuint, GLenum, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetSamplerParameteriv))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetSamplerParameterfv))(GLuint, GLenum, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetSamplerParameterIiv))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetSamplerParameterIuiv))(GLuint, GLenum, GLuint*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_sampler_objects

int CGL4ExtensionHandler::n_GetARBSamplerObjectsFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_sampler_objects

	if(!(GLFuncPtrName(glGenSamplers) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenSamplers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteSamplers) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteSamplers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsSampler) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsSampler"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindSampler) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glBindSampler"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSamplerParameteri) = (void(GLApi*)(GLuint, GLenum, int))wglGetProcAddress("glSamplerParameteri"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSamplerParameterf) = (void(GLApi*)(GLuint, GLenum, float))wglGetProcAddress("glSamplerParameterf"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSamplerParameteriv) = (void(GLApi*)(GLuint, GLenum, const int*))wglGetProcAddress("glSamplerParameteriv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSamplerParameterfv) = (void(GLApi*)(GLuint, GLenum, const float*))wglGetProcAddress("glSamplerParameterfv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSamplerParameterIiv) = (void(GLApi*)(GLuint, GLenum, const int*))wglGetProcAddress("glSamplerParameterIiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glSamplerParameterIuiv) = (void(GLApi*)(GLuint, GLenum, const GLuint*))wglGetProcAddress("glSamplerParameterIuiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetSamplerParameteriv) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetSamplerParameteriv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetSamplerParameterfv) = (void(GLApi*)(GLuint, GLenum, float*))wglGetProcAddress("glGetSamplerParameterfv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetSamplerParameterIiv) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetSamplerParameterIiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetSamplerParameterIuiv) = (void(GLApi*)(GLuint, GLenum, GLuint*))wglGetProcAddress("glGetSamplerParameterIuiv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_sampler_objects

	GLEH_ARB_sampler_objects = !n_failed_functions && b_SupportedExtension("GL_ARB_sampler_objects");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_sampler_objects ---
 */

/*
 *								--- GL_ARB_texture_rgb10_a2ui (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_texture_rgb10_a2ui = false;

int CGL4ExtensionHandler::n_GetARBTextureRGB10A2uiFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_rgb10_a2ui = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_rgb10_a2ui");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_rgb10_a2ui ---
 */

/*
 *								--- GL_ARB_texture_swizzle (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_texture_swizzle = false;

int CGL4ExtensionHandler::n_GetARBTextureSwizzleFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_swizzle = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_swizzle");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_swizzle ---
 */

/*
 *								--- GL_ARB_timer_query (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_timer_query = false;

#ifdef __GENERATE_GL_ARB_timer_query

void (GLApi *GLFuncPtrName(glQueryCounter))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetQueryObjecti64v))(GLuint, GLenum, GLint64*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetQueryObjectui64v))(GLuint, GLenum, GLuint64*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_timer_query

int CGL4ExtensionHandler::n_GetARBTimerQueryFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_timer_query

	if(!(GLFuncPtrName(glQueryCounter) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glQueryCounter"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetQueryObjecti64v) = (void(GLApi*)(GLuint, GLenum, GLint64*))wglGetProcAddress("glGetQueryObjecti64v"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetQueryObjectui64v) = (void(GLApi*)(GLuint, GLenum, GLuint64*))wglGetProcAddress("glGetQueryObjectui64v"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_timer_query

	GLEH_ARB_timer_query = !n_failed_functions && b_SupportedExtension("GL_ARB_timer_query");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_timer_query ---
 */

/*
 *								--- GL_ARB_instanced_arrays (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_instanced_arrays = false;

#ifdef __GENERATE_GL_ARB_instanced_arrays

void (GLApi *GLFuncPtrName(glVertexAttribDivisor))(GLuint, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_instanced_arrays

int CGL4ExtensionHandler::n_GetARBInstancedArraysFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_instanced_arrays

	if(!(GLFuncPtrName(glVertexAttribDivisor) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glVertexAttribDivisorARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_instanced_arrays

	GLEH_ARB_instanced_arrays = !n_failed_functions && b_SupportedExtension("GL_ARB_instanced_arrays");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_instanced_arrays ---
 */

/*
 *								--- GL_ARB_vertex_type_2_10_10_10_rev (part of OpenGL 3.3 core) ---
 */

bool GLEH_ARB_vertex_type_2_10_10_10_rev = false;

#ifdef __GENERATE_GL_ARB_vertex_type_2_10_10_10_rev

//void (GLApi *GLFuncPtrName(glVertexP2ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexP3ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexP4ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexP2uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexP3uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexP4uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP1ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP2ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP3ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP4ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP1uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP2uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP3uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glTexCoordP4uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP1ui))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP2ui))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP3ui))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP4ui))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP1uiv))(GLenum, GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP2uiv))(GLenum, GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP3uiv))(GLenum, GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexCoordP4uiv))(GLenum, GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glNormalP3ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glNormalP3uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glColorP3ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glColorP4ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glColorP3uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glColorP4uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glSecondaryColorP3ui))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glSecondaryColorP3uiv))(GLenum, const GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glVertexAttribP1ui))(GLuint, GLenum, GLboolean, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP2ui))(GLuint, GLenum, GLboolean, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP3ui))(GLuint, GLenum, GLboolean, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP4ui))(GLuint, GLenum, GLboolean, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP1uiv))(GLuint, GLenum, GLboolean, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP2uiv))(GLuint, GLenum, GLboolean, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP3uiv))(GLuint, GLenum, GLboolean, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribP4uiv))(GLuint, GLenum, GLboolean, const GLuint*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_vertex_type_2_10_10_10_rev

int CGL4ExtensionHandler::n_GetARBVertexType2101010RevFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_vertex_type_2_10_10_10_rev

	//if(!(GLFuncPtrName(glVertexP2ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glVertexP2ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexP3ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glVertexP3ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexP4ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glVertexP4ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexP2uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glVertexP2uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexP3uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glVertexP3uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexP4uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glVertexP4uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP1ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glTexCoordP1ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP2ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glTexCoordP2ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP3ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glTexCoordP3ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP4ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glTexCoordP4ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP1uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glTexCoordP1uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP2uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glTexCoordP2uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP3uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glTexCoordP3uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glTexCoordP4uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glTexCoordP4uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP1ui) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glMultiTexCoordP1ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP2ui) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glMultiTexCoordP2ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP3ui) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glMultiTexCoordP3ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP4ui) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glMultiTexCoordP4ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP1uiv) = (void(GLApi*)(GLenum, GLenum, const GLuint*))wglGetProcAddress("glMultiTexCoordP1uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP2uiv) = (void(GLApi*)(GLenum, GLenum, const GLuint*))wglGetProcAddress("glMultiTexCoordP2uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP3uiv) = (void(GLApi*)(GLenum, GLenum, const GLuint*))wglGetProcAddress("glMultiTexCoordP3uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexCoordP4uiv) = (void(GLApi*)(GLenum, GLenum, const GLuint*))wglGetProcAddress("glMultiTexCoordP4uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glNormalP3ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glNormalP3ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glNormalP3uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glNormalP3uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glColorP3ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glColorP3ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glColorP4ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glColorP4ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glColorP3uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glColorP3uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glColorP4uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glColorP4uiv"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glSecondaryColorP3ui) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glSecondaryColorP3ui"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glSecondaryColorP3uiv) = (void(GLApi*)(GLenum, const GLuint*))wglGetProcAddress("glSecondaryColorP3uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP1ui) = (void(GLApi*)(GLuint, GLenum, GLboolean, GLuint))wglGetProcAddress("glVertexAttribP1ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP2ui) = (void(GLApi*)(GLuint, GLenum, GLboolean, GLuint))wglGetProcAddress("glVertexAttribP2ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP3ui) = (void(GLApi*)(GLuint, GLenum, GLboolean, GLuint))wglGetProcAddress("glVertexAttribP3ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP4ui) = (void(GLApi*)(GLuint, GLenum, GLboolean, GLuint))wglGetProcAddress("glVertexAttribP4ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP1uiv) = (void(GLApi*)(GLuint, GLenum, GLboolean, const GLuint*))wglGetProcAddress("glVertexAttribP1uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP2uiv) = (void(GLApi*)(GLuint, GLenum, GLboolean, const GLuint*))wglGetProcAddress("glVertexAttribP2uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP3uiv) = (void(GLApi*)(GLuint, GLenum, GLboolean, const GLuint*))wglGetProcAddress("glVertexAttribP3uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribP4uiv) = (void(GLApi*)(GLuint, GLenum, GLboolean, const GLuint*))wglGetProcAddress("glVertexAttribP4uiv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_vertex_type_2_10_10_10_rev

	GLEH_ARB_vertex_type_2_10_10_10_rev = !n_failed_functions && b_SupportedExtension("GL_ARB_vertex_type_2_10_10_10_rev");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_vertex_type_2_10_10_10_rev ---
 */

/*
 *								--- GL_ARB_texture_query_lod (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_texture_query_lod = false;

int CGL4ExtensionHandler::n_GetARBTextureQueryLodFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_query_lod = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_query_lod");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_query_lod ---
 */

/*
 *								--- GL_ARB_draw_buffers_blend (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_draw_buffers_blend = false;

#ifdef __GENERATE_GL_ARB_draw_buffers_blend

void (GLApi *GLFuncPtrName(glBlendEquationi))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBlendEquationSeparatei))(GLuint, GLenum, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBlendFunci))(GLuint, GLenum, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBlendFuncSeparatei))(GLuint, GLenum, GLenum, GLenum, GLenum) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_draw_buffers_blend

int CGL4ExtensionHandler::n_GetARBDrawBuffersBlendFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_draw_buffers_blend

	if(!(GLFuncPtrName(glBlendEquationi) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glBlendEquationiARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBlendEquationSeparatei) = (void(GLApi*)(GLuint, GLenum, GLenum))wglGetProcAddress("glBlendEquationSeparateiARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBlendFunci) = (void(GLApi*)(GLuint, GLenum, GLenum))wglGetProcAddress("glBlendFunciARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBlendFuncSeparatei) = (void(GLApi*)(GLuint, GLenum, GLenum, GLenum, GLenum))wglGetProcAddress("glBlendFuncSeparateiARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_draw_buffers_blend

	GLEH_ARB_draw_buffers_blend = !n_failed_functions && b_SupportedExtension("GL_ARB_draw_buffers_blend");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_draw_buffers_blend ---
 */

/*
 *								--- GL_ARB_draw_indirect (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_draw_indirect = false;

#ifdef __GENERATE_GL_ARB_draw_indirect

void (GLApi *GLFuncPtrName(glDrawArraysIndirect))(GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawElementsIndirect))(GLenum, GLenum, const void*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_draw_indirect

int CGL4ExtensionHandler::n_GetARBDrawIndirectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_draw_indirect

	if(!(GLFuncPtrName(glDrawArraysIndirect) = (void(GLApi*)(GLenum, const void*))wglGetProcAddress("glDrawArraysIndirect"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawElementsIndirect) = (void(GLApi*)(GLenum, GLenum, const void*))wglGetProcAddress("glDrawElementsIndirect"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_draw_indirect

	GLEH_ARB_draw_indirect = !n_failed_functions && b_SupportedExtension("GL_ARB_draw_indirect");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_draw_indirect ---
 */

/*
 *								--- GL_ARB_gpu_shader5 (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_gpu_shader5 = false;

int CGL4ExtensionHandler::n_GetARBGPUShader5FuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_gpu_shader5 = !n_failed_functions && b_SupportedExtension("GL_ARB_gpu_shader5");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_gpu_shader5 ---
 */

/*
 *								--- GL_ARB_gpu_shader_fp64 (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_gpu_shader_fp64 = false;

#ifdef __GENERATE_GL_ARB_gpu_shader_fp64

void (GLApi *GLFuncPtrName(glUniform1d))(int, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2d))(int, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3d))(int, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4d))(int, double, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform1dv))(int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform2dv))(int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform3dv))(int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniform4dv))(int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix2dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix3dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix4dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix2x3dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix2x4dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix3x2dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix3x4dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix4x2dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformMatrix4x3dv))(int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetUniformdv))(GLuint, int, double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1d))(GLuint, int, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2d))(GLuint, int, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3d))(GLuint, int, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4d))(GLuint, int, double, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x3dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x4dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x2dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x4dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x2dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x3dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_gpu_shader_fp64

int CGL4ExtensionHandler::n_GetARBGPUShaderFP64FuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_gpu_shader_fp64

	if(!(GLFuncPtrName(glUniform1d) = (void(GLApi*)(int, double))wglGetProcAddress("glUniform1d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform2d) = (void(GLApi*)(int, double, double))wglGetProcAddress("glUniform2d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform3d) = (void(GLApi*)(int, double, double, double))wglGetProcAddress("glUniform3d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform4d) = (void(GLApi*)(int, double, double, double, double))wglGetProcAddress("glUniform4d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform1dv) = (void(GLApi*)(int, GLsizei, const double*))wglGetProcAddress("glUniform1dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform2dv) = (void(GLApi*)(int, GLsizei, const double*))wglGetProcAddress("glUniform2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform3dv) = (void(GLApi*)(int, GLsizei, const double*))wglGetProcAddress("glUniform3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniform4dv) = (void(GLApi*)(int, GLsizei, const double*))wglGetProcAddress("glUniform4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix2dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix3dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix4dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix2x3dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix2x3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix2x4dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix2x4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix3x2dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix3x2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix3x4dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix3x4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix4x2dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix4x2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformMatrix4x3dv) = (void(GLApi*)(int, GLsizei, GLboolean, const double*))wglGetProcAddress("glUniformMatrix4x3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetUniformdv) = (void(GLApi*)(GLuint, int, double*))wglGetProcAddress("glGetUniformdv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1d) = (void(GLApi*)(GLuint, int, double))wglGetProcAddress("glProgramUniform1d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2d) = (void(GLApi*)(GLuint, int, double, double))wglGetProcAddress("glProgramUniform2d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3d) = (void(GLApi*)(GLuint, int, double, double, double))wglGetProcAddress("glProgramUniform3d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4d) = (void(GLApi*)(GLuint, int, double, double, double, double))wglGetProcAddress("glProgramUniform4d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform1dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x3dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix2x3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x4dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix2x4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x2dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix3x2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x4dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix3x4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x2dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix4x2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x3dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix4x3dv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_gpu_shader_fp64

	GLEH_ARB_gpu_shader_fp64 = !n_failed_functions && b_SupportedExtension("GL_ARB_gpu_shader_fp64");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_gpu_shader_fp64 ---
 */

/*
 *								--- GL_ARB_sample_shading (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_sample_shading = false;

#ifdef __GENERATE_GL_ARB_sample_shading

void (GLApi *GLFuncPtrName(glMinSampleShading))(GLclampf) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_sample_shading

int CGL4ExtensionHandler::n_GetARBSampleShadingFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_sample_shading

	if(!(GLFuncPtrName(glMinSampleShading) = (void(GLApi*)(GLclampf))wglGetProcAddress("glMinSampleShadingARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_sample_shading

	GLEH_ARB_sample_shading = !n_failed_functions && b_SupportedExtension("GL_ARB_sample_shading");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_sample_shading ---
 */

/*
 *								--- GL_ARB_shader_subroutine (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_shader_subroutine = false;

#ifdef __GENERATE_GL_ARB_shader_subroutine

int (GLApi *GLFuncPtrName(glGetSubroutineUniformLocation))(GLuint, GLenum, const GLchar*) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glGetSubroutineIndex))(GLuint, GLenum, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveSubroutineUniformiv))(GLuint, GLenum, GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveSubroutineUniformName))(GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetActiveSubroutineName))(GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformSubroutinesuiv))(GLenum, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetUniformSubroutineuiv))(GLenum, int, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetProgramStageiv))(GLuint, GLenum, GLenum, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_shader_subroutine

int CGL4ExtensionHandler::n_GetARBShaderSubroutineFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_shader_subroutine

	if(!(GLFuncPtrName(glGetSubroutineUniformLocation) = (int(GLApi*)(GLuint, GLenum, const GLchar*))wglGetProcAddress("glGetSubroutineUniformLocation"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetSubroutineIndex) = (GLuint(GLApi*)(GLuint, GLenum, const GLchar*))wglGetProcAddress("glGetSubroutineIndex"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveSubroutineUniformiv) = (void(GLApi*)(GLuint, GLenum, GLuint, GLenum, int*))wglGetProcAddress("glGetActiveSubroutineUniformiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveSubroutineUniformName) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*))wglGetProcAddress("glGetActiveSubroutineUniformName"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetActiveSubroutineName) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*))wglGetProcAddress("glGetActiveSubroutineName"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformSubroutinesuiv) = (void(GLApi*)(GLenum, GLsizei, const GLuint*))wglGetProcAddress("glUniformSubroutinesuiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetUniformSubroutineuiv) = (void(GLApi*)(GLenum, int, GLuint*))wglGetProcAddress("glGetUniformSubroutineuiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramStageiv) = (void(GLApi*)(GLuint, GLenum, GLenum, int*))wglGetProcAddress("glGetProgramStageiv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_shader_subroutine

	GLEH_ARB_shader_subroutine = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_subroutine");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_subroutine ---
 */

/*
 *								--- GL_ARB_tessellation_shader (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_tessellation_shader = false;

#ifdef __GENERATE_GL_ARB_tessellation_shader

void (GLApi *GLFuncPtrName(glPatchParameteri))(GLenum, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPatchParameterfv))(GLenum, const float*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_tessellation_shader

int CGL4ExtensionHandler::n_GetARBTessellationShaderFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_tessellation_shader

	if(!(GLFuncPtrName(glPatchParameteri) = (void(GLApi*)(GLenum, int))wglGetProcAddress("glPatchParameteri"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glPatchParameterfv) = (void(GLApi*)(GLenum, const float*))wglGetProcAddress("glPatchParameterfv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_tessellation_shader

	GLEH_ARB_tessellation_shader = !n_failed_functions && b_SupportedExtension("GL_ARB_tessellation_shader");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_tessellation_shader ---
 */

/*
 *								--- GL_ARB_texture_buffer_object_rgb32 (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_texture_buffer_object_rgb32 = false;

int CGL4ExtensionHandler::n_GetARBTextureBufferObjectRGB32FuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_buffer_object_rgb32 = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_buffer_object_rgb32");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_buffer_object_rgb32 ---
 */

/*
 *								--- GL_ARB_texture_cube_map_array (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_texture_cube_map_array = false;

int CGL4ExtensionHandler::n_GetARBTextureCubeMapArrayFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_cube_map_array = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_cube_map_array");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_cube_map_array ---
 */

/*
 *								--- GL_ARB_texture_gather (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_texture_gather = false;

int CGL4ExtensionHandler::n_GetARBTextureGatherFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_gather = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_gather");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_gather ---
 */

/*
 *								--- GL_ARB_transform_feedback2 (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_transform_feedback2 = false;

#ifdef __GENERATE_GL_ARB_transform_feedback2

void (GLApi *GLFuncPtrName(glBindTransformFeedback))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteTransformFeedbacks))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenTransformFeedbacks))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsTransformFeedback))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glPauseTransformFeedback))() INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glResumeTransformFeedback))() INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawTransformFeedback))(GLenum, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_transform_feedback2

int CGL4ExtensionHandler::n_GetARBTransformFeedback2FuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_transform_feedback2

	if(!(GLFuncPtrName(glBindTransformFeedback) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glBindTransformFeedback"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteTransformFeedbacks) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteTransformFeedbacks"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenTransformFeedbacks) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenTransformFeedbacks"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsTransformFeedback) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsTransformFeedback"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glPauseTransformFeedback) = (void(GLApi*)())wglGetProcAddress("glPauseTransformFeedback"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glResumeTransformFeedback) = (void(GLApi*)())wglGetProcAddress("glResumeTransformFeedback"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawTransformFeedback) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDrawTransformFeedback"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_transform_feedback2

	GLEH_ARB_transform_feedback2 = !n_failed_functions && b_SupportedExtension("GL_ARB_transform_feedback2");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_transform_feedback2 ---
 */

/*
 *								--- GL_ARB_transform_feedback3 (part of OpenGL 4.0 core) ---
 */

bool GLEH_ARB_transform_feedback3 = false;

#ifdef __GENERATE_GL_ARB_transform_feedback3

void (GLApi *GLFuncPtrName(glDrawTransformFeedbackStream))(GLenum, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBeginQueryIndexed))(GLenum, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEndQueryIndexed))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetQueryIndexediv))(GLenum, GLuint, GLenum, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_transform_feedback3

int CGL4ExtensionHandler::n_GetARBTransformFeedback3FuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_transform_feedback3

	if(!(GLFuncPtrName(glDrawTransformFeedbackStream) = (void(GLApi*)(GLenum, GLuint, GLuint))wglGetProcAddress("glDrawTransformFeedbackStream"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBeginQueryIndexed) = (void(GLApi*)(GLenum, GLuint, GLuint))wglGetProcAddress("glBeginQueryIndexed"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glEndQueryIndexed) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEndQueryIndexed"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetQueryIndexediv) = (void(GLApi*)(GLenum, GLuint, GLenum, int*))wglGetProcAddress("glGetQueryIndexediv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_transform_feedback3

	GLEH_ARB_transform_feedback3 = !n_failed_functions && b_SupportedExtension("GL_ARB_transform_feedback3");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_transform_feedback3 ---
 */

/*
 *								--- GL_ARB_ES2_compatibility (part of OpenGL 4.1 core) ---
 */

bool GLEH_ARB_ES2_compatibility = false;

#ifdef __GENERATE_GL_ARB_ES2_compatibility

void (GLApi *GLFuncPtrName(glReleaseShaderCompiler))() INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glShaderBinary))(GLsizei, const GLuint*, GLenum, const void*, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetShaderPrecisionFormat))(GLenum, GLenum, int*, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDepthRangef))(GLclampf, GLclampf) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearDepthf))(GLclampf) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_ES2_compatibility

int CGL4ExtensionHandler::n_GetARBES2CompatibilityFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_ES2_compatibility

	if(!(GLFuncPtrName(glReleaseShaderCompiler) = (void(GLApi*)())wglGetProcAddress("glReleaseShaderCompiler"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glShaderBinary) = (void(GLApi*)(GLsizei, const GLuint*, GLenum, const void*, GLsizei))wglGetProcAddress("glShaderBinary"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetShaderPrecisionFormat) = (void(GLApi*)(GLenum, GLenum, int*, int*))wglGetProcAddress("glGetShaderPrecisionFormat"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDepthRangef) = (void(GLApi*)(GLclampf, GLclampf))wglGetProcAddress("glDepthRangef"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glClearDepthf) = (void(GLApi*)(GLclampf))wglGetProcAddress("glClearDepthf"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_ES2_compatibility

	GLEH_ARB_ES2_compatibility = !n_failed_functions && b_SupportedExtension("GL_ARB_ES2_compatibility");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_ES2_compatibility ---
 */

/*
 *								--- GL_ARB_get_program_binary (part of OpenGL 4.1 core) ---
 */

bool GLEH_ARB_get_program_binary = false;

#ifdef __GENERATE_GL_ARB_get_program_binary

void (GLApi *GLFuncPtrName(glGetProgramBinary))(GLuint, GLsizei, GLsizei*, GLenum*, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramBinary))(GLuint, GLenum, const void*, GLsizei) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glProgramParameteri))(GLuint, GLenum, int) INIT_FUNC_POINTERS; // defined above

#endif // __GENERATE_GL_ARB_get_program_binary

int CGL4ExtensionHandler::n_GetARBGetProgramBinaryFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_get_program_binary

	if(!(GLFuncPtrName(glGetProgramBinary) = (void(GLApi*)(GLuint, GLsizei, GLsizei*, GLenum*, void*))wglGetProcAddress("glGetProgramBinary"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramBinary) = (void(GLApi*)(GLuint, GLenum, const void*, GLsizei))wglGetProcAddress("glProgramBinary"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramParameteri) = (void(GLApi*)(GLuint, GLenum, int))wglGetProcAddress("glProgramParameteri"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_get_program_binary

	GLEH_ARB_get_program_binary = !n_failed_functions && b_SupportedExtension("GL_ARB_get_program_binary");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_get_program_binary ---
 */

/*
 *								--- GL_ARB_separate_shader_objects (part of OpenGL 4.1 core) ---
 */

bool GLEH_ARB_separate_shader_objects = false;

#ifdef __GENERATE_GL_ARB_separate_shader_objects

void (GLApi *GLFuncPtrName(glUseProgramStages))(GLuint, GLbitfield, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glActiveShaderProgram))(GLuint, GLuint) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glCreateShaderProgramv))(GLenum, GLsizei, const GLchar**) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindProgramPipeline))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteProgramPipelines))(GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenProgramPipelines))(GLsizei, GLuint*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsProgramPipeline))(GLuint) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glProgramParameteri))(GLuint, GLenum, int) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glGetProgramPipelineiv))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1i))(GLuint, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2i))(GLuint, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3i))(GLuint, int, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4i))(GLuint, int, int, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1ui))(GLuint, int, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2ui))(GLuint, int, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3ui))(GLuint, int, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4ui))(GLuint, int, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1f))(GLuint, int, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2f))(GLuint, int, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3f))(GLuint, int, float, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4f))(GLuint, int, float, float, float, float) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glProgramUniform1d))(GLuint, int, double) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniform2d))(GLuint, int, double, double) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniform3d))(GLuint, int, double, double, double) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniform4d))(GLuint, int, double, double, double, double) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glProgramUniform1iv))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2iv))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3iv))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4iv))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1uiv))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2uiv))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3uiv))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4uiv))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1fv))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2fv))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3fv))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4fv))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glProgramUniform1dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniform2dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniform3dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniform4dv))(GLuint, int, GLsizei, const double*) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix2dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix3dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix4dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x3fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x2fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x4fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x2fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x4fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x3fv))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x3dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x2dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x4dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x2dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x4dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x3dv))(GLuint, int, GLsizei, GLboolean, const double*) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glValidateProgramPipeline))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetProgramPipelineInfoLog))(GLuint, GLsizei, GLsizei*, GLchar*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_separate_shader_objects

int CGL4ExtensionHandler::n_GetARBSeparateShaderObjectsFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_separate_shader_objects

	if(!(GLFuncPtrName(glUseProgramStages) = (void(GLApi*)(GLuint, GLbitfield, GLuint))wglGetProcAddress("glUseProgramStages"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glActiveShaderProgram) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glActiveShaderProgram"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCreateShaderProgramv) = (GLuint(GLApi*)(GLenum, GLsizei, const GLchar**))wglGetProcAddress("glCreateShaderProgramv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindProgramPipeline) = (void(GLApi*)(GLuint))wglGetProcAddress("glBindProgramPipeline"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteProgramPipelines) = (void(GLApi*)(GLsizei, const GLuint*))wglGetProcAddress("glDeleteProgramPipelines"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenProgramPipelines) = (void(GLApi*)(GLsizei, GLuint*))wglGetProcAddress("glGenProgramPipelines"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsProgramPipeline) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glIsProgramPipeline"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramParameteri) = (void(GLApi*)(GLuint, GLenum, int))wglGetProcAddress("glProgramParameteri"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramPipelineiv) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetProgramPipelineiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1i) = (void(GLApi*)(GLuint, int, int))wglGetProcAddress("glProgramUniform1i"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2i) = (void(GLApi*)(GLuint, int, int, int))wglGetProcAddress("glProgramUniform2i"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3i) = (void(GLApi*)(GLuint, int, int, int, int))wglGetProcAddress("glProgramUniform3i"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4i) = (void(GLApi*)(GLuint, int, int, int, int, int))wglGetProcAddress("glProgramUniform4i"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1ui) = (void(GLApi*)(GLuint, int, GLuint))wglGetProcAddress("glProgramUniform1ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2ui) = (void(GLApi*)(GLuint, int, GLuint, GLuint))wglGetProcAddress("glProgramUniform2ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3ui) = (void(GLApi*)(GLuint, int, GLuint, GLuint, GLuint))wglGetProcAddress("glProgramUniform3ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4ui) = (void(GLApi*)(GLuint, int, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glProgramUniform4ui"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1f) = (void(GLApi*)(GLuint, int, float))wglGetProcAddress("glProgramUniform1f"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2f) = (void(GLApi*)(GLuint, int, float, float))wglGetProcAddress("glProgramUniform2f"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3f) = (void(GLApi*)(GLuint, int, float, float, float))wglGetProcAddress("glProgramUniform3f"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4f) = (void(GLApi*)(GLuint, int, float, float, float, float))wglGetProcAddress("glProgramUniform4f"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1d) = (void(GLApi*)(GLuint, int, double))wglGetProcAddress("glProgramUniform1d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2d) = (void(GLApi*)(GLuint, int, double, double))wglGetProcAddress("glProgramUniform2d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3d) = (void(GLApi*)(GLuint, int, double, double, double))wglGetProcAddress("glProgramUniform3d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4d) = (void(GLApi*)(GLuint, int, double, double, double, double))wglGetProcAddress("glProgramUniform4d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1iv) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform1iv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2iv) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform2iv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3iv) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform3iv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4iv) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform4iv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1uiv) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform1uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2uiv) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform2uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3uiv) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform3uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4uiv) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform4uiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1fv) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform1fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2fv) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform2fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3fv) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform3fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4fv) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform4fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform1dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4dv) = (void(GLApi*)(GLuint, int, GLsizei, const double*))wglGetProcAddress("glProgramUniform4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix2fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix3fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix4fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x3fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix2x3fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x2fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix3x2fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x4fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix2x4fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x2fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix4x2fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x4fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix3x4fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x3fv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix4x3fv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x3dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix2x3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x2dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix3x2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x4dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix2x4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x2dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix4x2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x4dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix3x4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x3dv) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const double*))wglGetProcAddress("glProgramUniformMatrix4x3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glValidateProgramPipeline) = (void(GLApi*)(GLuint))wglGetProcAddress("glValidateProgramPipeline"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramPipelineInfoLog) = (void(GLApi*)(GLuint, GLsizei, GLsizei*, GLchar*))wglGetProcAddress("glGetProgramPipelineInfoLog"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_separate_shader_objects

	GLEH_ARB_separate_shader_objects = !n_failed_functions && b_SupportedExtension("GL_ARB_separate_shader_objects");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_separate_shader_objects ---
 */

/*
 *								--- GL_ARB_shader_precision (part of OpenGL 4.1 core) ---
 */

bool GLEH_ARB_shader_precision = false;

int CGL4ExtensionHandler::n_GetARBShaderPrecisionFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_precision = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_precision");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_precision ---
 */

/*
 *								--- GL_ARB_vertex_attrib_64bit (part of OpenGL 4.1 core) ---
 */

bool GLEH_ARB_vertex_attrib_64bit = false;

#ifdef __GENERATE_GL_ARB_vertex_attrib_64bit

void (GLApi *GLFuncPtrName(glVertexAttribL1d))(GLuint, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL2d))(GLuint, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL3d))(GLuint, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL4d))(GLuint, double, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL1dv))(GLuint, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL2dv))(GLuint, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL3dv))(GLuint, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL4dv))(GLuint, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribLPointer))(GLuint, int, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribLdv))(GLuint, GLenum, double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribLOffsetEXT))(GLuint, GLuint, GLuint, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_vertex_attrib_64bit

int CGL4ExtensionHandler::n_GetARBVertexAttrib64bitFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_vertex_attrib_64bit

	if(!(GLFuncPtrName(glVertexAttribL1d) = (void(GLApi*)(GLuint, double))wglGetProcAddress("glVertexAttribL1d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL2d) = (void(GLApi*)(GLuint, double, double))wglGetProcAddress("glVertexAttribL2d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL3d) = (void(GLApi*)(GLuint, double, double, double))wglGetProcAddress("glVertexAttribL3d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL4d) = (void(GLApi*)(GLuint, double, double, double, double))wglGetProcAddress("glVertexAttribL4d"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL1dv) = (void(GLApi*)(GLuint, const double*))wglGetProcAddress("glVertexAttribL1dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL2dv) = (void(GLApi*)(GLuint, const double*))wglGetProcAddress("glVertexAttribL2dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL3dv) = (void(GLApi*)(GLuint, const double*))wglGetProcAddress("glVertexAttribL3dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL4dv) = (void(GLApi*)(GLuint, const double*))wglGetProcAddress("glVertexAttribL4dv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribLPointer) = (void(GLApi*)(GLuint, int, GLenum, GLsizei, const void*))wglGetProcAddress("glVertexAttribLPointer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetVertexAttribLdv) = (void(GLApi*)(GLuint, GLenum, double*))wglGetProcAddress("glGetVertexAttribLdv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribLOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLuint, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayVertexAttribLOffsetEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_vertex_attrib_64bit

	GLEH_ARB_vertex_attrib_64bit = !n_failed_functions && b_SupportedExtension("GL_ARB_vertex_attrib_64bit");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_vertex_attrib_64bit ---
 */

/*
 *								--- GL_ARB_viewport_array (part of OpenGL 4.1 core) ---
 */

bool GLEH_ARB_viewport_array = false;

#ifdef __GENERATE_GL_ARB_viewport_array

void (GLApi *GLFuncPtrName(glViewportArrayv))(GLuint, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glViewportIndexedf))(GLuint, float, float, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glViewportIndexedfv))(GLuint, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glScissorArrayv))(GLuint, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glScissorIndexed))(GLuint, int, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glScissorIndexedv))(GLuint, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDepthRangeArrayv))(GLuint, GLsizei, const GLclampd*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDepthRangeIndexed))(GLuint, GLclampd, GLclampd) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetFloati_v))(GLenum, GLuint, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetDoublei_v))(GLenum, GLuint, double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetIntegerIndexediv))(GLenum, GLuint, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEnableIndexed))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDisableIndexed))(GLenum, GLuint) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsEnabledIndexed))(GLenum, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_viewport_array

int CGL4ExtensionHandler::n_GetARBViewportArrayFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_viewport_array

	if(!(GLFuncPtrName(glViewportArrayv) = (void(GLApi*)(GLuint, GLsizei, const float*))wglGetProcAddress("glViewportArrayv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glViewportIndexedf) = (void(GLApi*)(GLuint, float, float, float, float))wglGetProcAddress("glViewportIndexedf"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glViewportIndexedfv) = (void(GLApi*)(GLuint, const float*))wglGetProcAddress("glViewportIndexedfv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glScissorArrayv) = (void(GLApi*)(GLuint, GLsizei, const int*))wglGetProcAddress("glScissorArrayv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glScissorIndexed) = (void(GLApi*)(GLuint, int, int, GLsizei, GLsizei))wglGetProcAddress("glScissorIndexed"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glScissorIndexedv) = (void(GLApi*)(GLuint, const int*))wglGetProcAddress("glScissorIndexedv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDepthRangeArrayv) = (void(GLApi*)(GLuint, GLsizei, const GLclampd*))wglGetProcAddress("glDepthRangeArrayv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDepthRangeIndexed) = (void(GLApi*)(GLuint, GLclampd, GLclampd))wglGetProcAddress("glDepthRangeIndexed"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFloati_v) = (void(GLApi*)(GLenum, GLuint, float*))wglGetProcAddress("glGetFloati_v"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetDoublei_v) = (void(GLApi*)(GLenum, GLuint, double*))wglGetProcAddress("glGetDoublei_v"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetIntegerIndexediv) = (void(GLApi*)(GLenum, GLuint, int*))wglGetProcAddress("glGetIntegeri_v"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glEnableIndexed) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEnablei"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDisableIndexed) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDisablei"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsEnabledIndexed) = (GLboolean(GLApi*)(GLenum, GLuint))wglGetProcAddress("glIsEnabledi"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_viewport_array

	GLEH_ARB_viewport_array = !n_failed_functions && b_SupportedExtension("GL_ARB_viewport_array");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_viewport_array ---
 */

/*
 *								--- GL_ARB_texture_compression_bptc (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_texture_compression_bptc = false;

int CGL4ExtensionHandler::n_GetARBTextureCompressionBptcFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_compression_bptc = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_compression_bptc");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_compression_bptc ---
 */

/*
 *								--- GL_ARB_compressed_texture_pixel_storage (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_compressed_texture_pixel_storage = false;

int CGL4ExtensionHandler::n_GetARBCompressedTexturePixelStorageFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_compressed_texture_pixel_storage = !n_failed_functions && b_SupportedExtension("GL_ARB_compressed_texture_pixel_storage");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_compressed_texture_pixel_storage ---
 */

/*
 *								--- GL_ARB_shader_atomic_counters (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_shader_atomic_counters = false;

#ifdef __GENERATE_GL_ARB_shader_atomic_counters

void (GLApi *GLFuncPtrName(glGetActiveAtomicCounterBufferiv))(GLuint, GLuint, GLenum, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_shader_atomic_counters

int CGL4ExtensionHandler::n_GetARBShaderAtomicCountersFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_shader_atomic_counters

	if(!(GLFuncPtrName(glGetActiveAtomicCounterBufferiv) = (void(GLApi*)(GLuint, GLuint, GLenum, int*))wglGetProcAddress("glGetActiveAtomicCounterBufferiv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_shader_atomic_counters

	GLEH_ARB_shader_atomic_counters = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_atomic_counters");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_atomic_counters ---
 */

/*
 *								--- GL_ARB_texture_storage (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_texture_storage = false;

#ifdef __GENERATE_GL_ARB_texture_storage

void (GLApi *GLFuncPtrName(glTexStorage1D))(GLenum, GLsizei, GLenum, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexStorage2D))(GLenum, GLsizei, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexStorage3D))(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureStorage1DEXT))(GLuint, GLenum, GLsizei, GLenum, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureStorage2DEXT))(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureStorage3DEXT))(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_texture_storage

int CGL4ExtensionHandler::n_GetARBTextureStorageFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_texture_storage

	if(!(GLFuncPtrName(glTexStorage1D) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLsizei))wglGetProcAddress("glTexStorage1D"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTexStorage2D) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei))wglGetProcAddress("glTexStorage2D"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTexStorage3D) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei))wglGetProcAddress("glTexStorage3D"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureStorage1DEXT) = (void(GLApi*)(GLuint, GLenum, GLsizei, GLenum, GLsizei))wglGetProcAddress("glTextureStorage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureStorage2DEXT) = (void(GLApi*)(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei))wglGetProcAddress("glTextureStorage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureStorage3DEXT) = (void(GLApi*)(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei))wglGetProcAddress("glTextureStorage3DEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_texture_storage

	GLEH_ARB_texture_storage = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_storage");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_storage ---
 */

/*
 *								--- GL_ARB_transform_feedback_instanced (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_transform_feedback_instanced = false;

#ifdef __GENERATE_GL_ARB_transform_feedback_instanced

void (GLApi *GLFuncPtrName(glDrawTransformFeedbackInstanced))(GLenum, GLuint, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawTransformFeedbackStreamInstanced))(GLenum, GLuint, GLuint, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_transform_feedback_instanced

int CGL4ExtensionHandler::n_GetARBTransformFeedbackInstancedFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_transform_feedback_instanced

	if(!(GLFuncPtrName(glDrawTransformFeedbackInstanced) = (void(GLApi*)(GLenum, GLuint, GLsizei))wglGetProcAddress("glDrawTransformFeedbackInstanced"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawTransformFeedbackStreamInstanced) = (void(GLApi*)(GLenum, GLuint, GLuint, GLsizei))wglGetProcAddress("glDrawTransformFeedbackStreamInstanced"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_transform_feedback_instanced

	GLEH_ARB_transform_feedback_instanced = !n_failed_functions && b_SupportedExtension("GL_ARB_transform_feedback_instanced");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_transform_feedback_instanced ---
 */

/*
 *								--- GL_ARB_base_instance (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_base_instance = false;

#ifdef __GENERATE_GL_ARB_base_instance

void (GLApi *GLFuncPtrName(glDrawArraysInstancedBaseInstance))(GLenum, int, GLsizei, GLsizei, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawElementsInstancedBaseInstance))(GLenum, GLsizei, GLenum, const void*, GLsizei, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDrawElementsInstancedBaseVertexBaseInstance))(GLenum, GLsizei, GLenum, const void*, GLsizei, int, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_base_instance

int CGL4ExtensionHandler::n_GetARBBaseInstanceFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_base_instance

	if(!(GLFuncPtrName(glDrawArraysInstancedBaseInstance) = (void(GLApi*)(GLenum, int, GLsizei, GLsizei, GLuint))wglGetProcAddress("glDrawArraysInstancedBaseInstance"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawElementsInstancedBaseInstance) = (void(GLApi*)(GLenum, GLsizei, GLenum, const void*, GLsizei, GLuint))wglGetProcAddress("glDrawElementsInstancedBaseInstance"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDrawElementsInstancedBaseVertexBaseInstance) = (void(GLApi*)(GLenum, GLsizei, GLenum, const void*, GLsizei, int, GLuint))wglGetProcAddress("glDrawElementsInstancedBaseVertexBaseInstance"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_base_instance

	GLEH_ARB_base_instance = !n_failed_functions && b_SupportedExtension("GL_ARB_base_instance");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_base_instance ---
 */

/*
 *								--- GL_ARB_shader_image_load_store (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_shader_image_load_store = false;

#ifdef __GENERATE_GL_ARB_shader_image_load_store

void (GLApi *GLFuncPtrName(glBindImageTexture))(GLuint, GLuint, int, GLboolean, int, GLenum, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMemoryBarrier))(GLbitfield) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_shader_image_load_store

int CGL4ExtensionHandler::n_GetARBShaderImageLoadStoreFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_shader_image_load_store

	if(!(GLFuncPtrName(glBindImageTexture) = (void(GLApi*)(GLuint, GLuint, int, GLboolean, int, GLenum, GLenum))wglGetProcAddress("glBindImageTexture"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMemoryBarrier) = (void(GLApi*)(GLbitfield))wglGetProcAddress("glMemoryBarrier"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_shader_image_load_store

	GLEH_ARB_shader_image_load_store = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_image_load_store");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_image_load_store ---
 */

/*
 *								--- GL_ARB_conservative_depth (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_conservative_depth = false;

int CGL4ExtensionHandler::n_GetARBConservativeDepthFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_conservative_depth = !n_failed_functions && b_SupportedExtension("GL_ARB_conservative_depth");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_conservative_depth ---
 */

/*
 *								--- GL_ARB_shading_language_420pack (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_shading_language_420pack = false;

int CGL4ExtensionHandler::n_GetARBShadingLanguage420packFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shading_language_420pack = !n_failed_functions && b_SupportedExtension("GL_ARB_shading_language_420pack");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shading_language_420pack ---
 */

/*
 *								--- GL_ARB_internalformat_query (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_internalformat_query = false;

#ifdef __GENERATE_GL_ARB_internalformat_query

void (GLApi *GLFuncPtrName(glGetInternalformativ))(GLenum, GLenum, GLenum, GLsizei, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_internalformat_query

int CGL4ExtensionHandler::n_GetARBInternalformatQueryFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_internalformat_query

	if(!(GLFuncPtrName(glGetInternalformativ) = (void(GLApi*)(GLenum, GLenum, GLenum, GLsizei, int*))wglGetProcAddress("glGetInternalformativ"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_internalformat_query

	GLEH_ARB_internalformat_query = !n_failed_functions && b_SupportedExtension("GL_ARB_internalformat_query");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_internalformat_query ---
 */

/*
 *								--- GL_ARB_map_buffer_alignment (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_map_buffer_alignment = false;

int CGL4ExtensionHandler::n_GetARBMapBufferAlignmentFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_map_buffer_alignment = !n_failed_functions && b_SupportedExtension("GL_ARB_map_buffer_alignment");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_map_buffer_alignment ---
 */

/*
 *								--- GL_ARB_shading_language_packing (part of OpenGL 4.2 core) ---
 */

bool GLEH_ARB_shading_language_packing = false;

int CGL4ExtensionHandler::n_GetARBShadingLanguagePackingFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shading_language_packing = !n_failed_functions && b_SupportedExtension("GL_ARB_shading_language_packing");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shading_language_packing ---
 */

/*
 *								--- GL_ARB_arrays_of_arrays (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_arrays_of_arrays = false;

int CGL4ExtensionHandler::n_GetARBArraysOfArraysFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_arrays_of_arrays = !n_failed_functions && b_SupportedExtension("GL_ARB_arrays_of_arrays");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_arrays_of_arrays ---
 */

/*
 *								--- GL_ARB_ES3_compatibility (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_ES3_compatibility = false;

int CGL4ExtensionHandler::n_GetARBES3CompatibilityFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_ES3_compatibility = !n_failed_functions && b_SupportedExtension("GL_ARB_ES3_compatibility");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_ES3_compatibility ---
 */

/*
 *								--- GL_ARB_clear_buffer_object (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_clear_buffer_object = false;

#ifdef __GENERATE_GL_ARB_clear_buffer_object

void (GLApi *GLFuncPtrName(glClearBufferData))(GLenum, GLenum, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearBufferSubData))(GLenum, GLenum, GLintptr, GLsizeiptr, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearNamedBufferDataEXT))(GLuint, GLenum, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearNamedBufferSubDataEXT))(GLuint, GLenum, GLintptr, GLsizeiptr, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_clear_buffer_object

int CGL4ExtensionHandler::n_GetARBClearBufferObjectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_clear_buffer_object

	if(!(GLFuncPtrName(glClearBufferData) = (void(GLApi*)(GLenum, GLenum, GLenum, GLenum, const void*))wglGetProcAddress("glClearBufferData"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glClearBufferSubData) = (void(GLApi*)(GLenum, GLenum, GLintptr, GLsizeiptr, GLenum, GLenum, const void*))wglGetProcAddress("glClearBufferSubData"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glClearNamedBufferDataEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLenum, const void*))wglGetProcAddress("glClearNamedBufferDataEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glClearNamedBufferSubDataEXT) = (void(GLApi*)(GLuint, GLenum, GLintptr, GLsizeiptr, GLenum, GLenum, const void*))wglGetProcAddress("glClearNamedBufferSubDataEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_clear_buffer_object

	GLEH_ARB_clear_buffer_object = !n_failed_functions && b_SupportedExtension("GL_ARB_clear_buffer_object");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_clear_buffer_object ---
 */

/*
 *								--- GL_ARB_compute_shader (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_compute_shader = false;

#ifdef __GENERATE_GL_ARB_compute_shader

void (GLApi *GLFuncPtrName(glDispatchCompute))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDispatchComputeIndirect))(GLintptr) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_compute_shader

int CGL4ExtensionHandler::n_GetARBComputeShaderFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_compute_shader

	if(!(GLFuncPtrName(glDispatchCompute) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glDispatchCompute"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDispatchComputeIndirect) = (void(GLApi*)(GLintptr))wglGetProcAddress("glDispatchComputeIndirect"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_compute_shader

	GLEH_ARB_compute_shader = !n_failed_functions && b_SupportedExtension("GL_ARB_compute_shader");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_compute_shader ---
 */

/*
 *								--- GL_ARB_copy_image (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_copy_image = false;

#ifdef __GENERATE_GL_ARB_copy_image

void (GLApi *GLFuncPtrName(glCopyImageSubData))(GLuint, GLenum, int, int, int, int, GLuint, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_copy_image

int CGL4ExtensionHandler::n_GetARBCopyImageFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_copy_image

	if(!(GLFuncPtrName(glCopyImageSubData) = (void(GLApi*)(GLuint, GLenum, int, int, int, int, GLuint, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei))wglGetProcAddress("glCopyImageSubData"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_copy_image

	GLEH_ARB_copy_image = !n_failed_functions && b_SupportedExtension("GL_ARB_copy_image");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_copy_image ---
 */

/*
 *								--- GL_ARB_debug_group (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_debug_group = false;

int CGL4ExtensionHandler::n_GetARBDebugGroupFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_debug_group = !n_failed_functions && b_SupportedExtension("GL_ARB_debug_group");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_debug_group ---
 */

/*
 *								--- GL_ARB_debug_label (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_debug_label = false;

int CGL4ExtensionHandler::n_GetARBDebugLabelFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_debug_label = !n_failed_functions && b_SupportedExtension("GL_ARB_debug_label");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_debug_label ---
 */

/*
 *								--- GL_ARB_debug_output2 (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_debug_output2 = false;

int CGL4ExtensionHandler::n_GetARBDebugOutput2FuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_debug_output2 = !n_failed_functions && b_SupportedExtension("GL_ARB_debug_output2");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_debug_output2 ---
 */

/*
 *								--- GL_ARB_debug_output (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_debug_output = false;

#ifdef __GENERATE_GL_ARB_debug_output

void (GLApi *GLFuncPtrName(glDebugMessageControl))(GLenum, GLenum, GLenum, GLsizei, const GLuint*, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDebugMessageInsert))(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDebugMessageCallback))(GLDEBUGPROCARB, void*) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glGetDebugMessageLog))(GLuint, GLsizei, GLenum*, GLenum*, GLuint*, GLenum*, GLsizei*, GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetPointerv))(GLenum, void**) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_debug_output

int CGL4ExtensionHandler::n_GetARBDebugOutputFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_debug_output

	if(!(GLFuncPtrName(glDebugMessageControl) = (void(GLApi*)(GLenum, GLenum, GLenum, GLsizei, const GLuint*, GLboolean))wglGetProcAddress("glDebugMessageControlARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDebugMessageInsert) = (void(GLApi*)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*))wglGetProcAddress("glDebugMessageInsertARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDebugMessageCallback) = (void(GLApi*)(GLDEBUGPROCARB, void*))wglGetProcAddress("glDebugMessageCallbackARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetDebugMessageLog) = (GLuint(GLApi*)(GLuint, GLsizei, GLenum*, GLenum*, GLuint*, GLenum*, GLsizei*, GLchar*))wglGetProcAddress("glGetDebugMessageLogARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetPointerv) = (void(GLApi*)(GLenum, void**))wglGetProcAddress("glGetPointerv"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_debug_output

	GLEH_ARB_debug_output = !n_failed_functions && b_SupportedExtension("GL_ARB_debug_output");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_debug_output ---
 */

/*
 *								--- GL_ARB_explicit_uniform_location (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_explicit_uniform_location = false;

int CGL4ExtensionHandler::n_GetARBExplicitUniformLocationFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_explicit_uniform_location = !n_failed_functions && b_SupportedExtension("GL_ARB_explicit_uniform_location");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_explicit_uniform_location ---
 */

/*
 *								--- GL_ARB_fragment_layer_viewport (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_fragment_layer_viewport = false;

int CGL4ExtensionHandler::n_GetARBFragmentLayerViewportFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_fragment_layer_viewport = !n_failed_functions && b_SupportedExtension("GL_ARB_fragment_layer_viewport");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_fragment_layer_viewport ---
 */

/*
 *								--- GL_ARB_framebuffer_no_attachments (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_framebuffer_no_attachments = false;

#ifdef __GENERATE_GL_ARB_framebuffer_no_attachments

void (GLApi *GLFuncPtrName(glFramebufferParameteri))(GLenum, GLenum, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetFramebufferParameteriv))(GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferParameteriEXT))(GLuint, GLenum, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedFramebufferParameterivEXT))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_framebuffer_no_attachments

int CGL4ExtensionHandler::n_GetARBFramebufferNoAttachmentsFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_framebuffer_no_attachments

	if(!(GLFuncPtrName(glFramebufferParameteri) = (void(GLApi*)(GLenum, GLenum, int))wglGetProcAddress("glFramebufferParameteri"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFramebufferParameteriv) = (void(GLApi*)(GLenum, GLenum, int*))wglGetProcAddress("glGetFramebufferParameteriv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferParameteriEXT) = (void(GLApi*)(GLuint, GLenum, int))wglGetProcAddress("glNamedFramebufferParameteriEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedFramebufferParameterivEXT) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetNamedFramebufferParameterivEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_framebuffer_no_attachments

	GLEH_ARB_framebuffer_no_attachments = !n_failed_functions && b_SupportedExtension("GL_ARB_framebuffer_no_attachments");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_framebuffer_no_attachments ---
 */

/*
 *								--- GL_ARB_internalformat_query2 (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_internalformat_query2 = false;

#ifdef __GENERATE_GL_ARB_internalformat_query2

void (GLApi *GLFuncPtrName(glGetInternalformati64v))(GLenum, GLenum, GLenum, GLsizei, GLint64*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_internalformat_query2

int CGL4ExtensionHandler::n_GetARBInternalformatQuery2FuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_internalformat_query2

	if(!(GLFuncPtrName(glGetInternalformati64v) = (void(GLApi*)(GLenum, GLenum, GLenum, GLsizei, GLint64*))wglGetProcAddress("glGetInternalformati64v"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_internalformat_query2

	GLEH_ARB_internalformat_query2 = !n_failed_functions && b_SupportedExtension("GL_ARB_internalformat_query2");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_internalformat_query2 ---
 */

/*
 *								--- GL_ARB_invalidate_subdata (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_invalidate_subdata = false;

#ifdef __GENERATE_GL_ARB_invalidate_subdata

void (GLApi *GLFuncPtrName(glInvalidateTexSubImage))(GLuint, int, int, int, int, GLsizei, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glInvalidateTexImage))(GLuint, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glInvalidateBufferSubData))(GLuint, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glInvalidateBufferData))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glInvalidateFramebuffer))(GLenum, GLsizei, const GLenum*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glInvalidateSubFramebuffer))(GLenum, GLsizei, const GLenum*, int, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_invalidate_subdata

int CGL4ExtensionHandler::n_GetARBInvalidateSubdataFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_invalidate_subdata

	if(!(GLFuncPtrName(glInvalidateTexSubImage) = (void(GLApi*)(GLuint, int, int, int, int, GLsizei, GLsizei, GLsizei))wglGetProcAddress("glInvalidateTexSubImage"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glInvalidateTexImage) = (void(GLApi*)(GLuint, int))wglGetProcAddress("glInvalidateTexImage"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glInvalidateBufferSubData) = (void(GLApi*)(GLuint, GLintptr, GLsizeiptr))wglGetProcAddress("glInvalidateBufferSubData"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glInvalidateBufferData) = (void(GLApi*)(GLuint))wglGetProcAddress("glInvalidateBufferData"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glInvalidateFramebuffer) = (void(GLApi*)(GLenum, GLsizei, const GLenum*))wglGetProcAddress("glInvalidateFramebuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glInvalidateSubFramebuffer) = (void(GLApi*)(GLenum, GLsizei, const GLenum*, int, int, GLsizei, GLsizei))wglGetProcAddress("glInvalidateSubFramebuffer"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_invalidate_subdata

	GLEH_ARB_invalidate_subdata = !n_failed_functions && b_SupportedExtension("GL_ARB_invalidate_subdata");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_invalidate_subdata ---
 */

/*
 *								--- GL_ARB_multi_draw_indirect (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_multi_draw_indirect = false;

#ifdef __GENERATE_GL_ARB_multi_draw_indirect

void (GLApi *GLFuncPtrName(glMultiDrawArraysIndirect))(GLenum, const void*, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiDrawElementsIndirect))(GLenum, GLenum, const void*, GLsizei, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_multi_draw_indirect

int CGL4ExtensionHandler::n_GetARBMultiDrawIndirectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_multi_draw_indirect

	if(!(GLFuncPtrName(glMultiDrawArraysIndirect) = (void(GLApi*)(GLenum, const void*, GLsizei, GLsizei))wglGetProcAddress("glMultiDrawArraysIndirect"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiDrawElementsIndirect) = (void(GLApi*)(GLenum, GLenum, const void*, GLsizei, GLsizei))wglGetProcAddress("glMultiDrawElementsIndirect"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_multi_draw_indirect

	GLEH_ARB_multi_draw_indirect = !n_failed_functions && b_SupportedExtension("GL_ARB_multi_draw_indirect");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_multi_draw_indirect ---
 */

/*
 *								--- GL_ARB_program_interface_query (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_program_interface_query = false;

#ifdef __GENERATE_GL_ARB_program_interface_query

void (GLApi *GLFuncPtrName(glGetProgramInterfaceiv))(GLuint, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
GLuint (GLApi *GLFuncPtrName(glGetProgramResourceIndex))(GLuint, GLenum, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetProgramResourceName))(GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetProgramResourceiv))(GLuint, GLenum, GLuint, GLsizei, const GLenum*, GLsizei, GLsizei*, int*) INIT_FUNC_POINTERS;
int (GLApi *GLFuncPtrName(glGetProgramResourceLocation))(GLuint, GLenum, const GLchar*) INIT_FUNC_POINTERS;
int (GLApi *GLFuncPtrName(glGetProgramResourceLocationIndex))(GLuint, GLenum, const GLchar*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_program_interface_query

int CGL4ExtensionHandler::n_GetARBProgramInterfaceQueryFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_program_interface_query

	if(!(GLFuncPtrName(glGetProgramInterfaceiv) = (void(GLApi*)(GLuint, GLenum, GLenum, int*))wglGetProcAddress("glGetProgramInterfaceiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramResourceIndex) = (GLuint(GLApi*)(GLuint, GLenum, const GLchar*))wglGetProcAddress("glGetProgramResourceIndex"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramResourceName) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*))wglGetProcAddress("glGetProgramResourceName"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramResourceiv) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, const GLenum*, GLsizei, GLsizei*, int*))wglGetProcAddress("glGetProgramResourceiv"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramResourceLocation) = (int(GLApi*)(GLuint, GLenum, const GLchar*))wglGetProcAddress("glGetProgramResourceLocation"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetProgramResourceLocationIndex) = (int(GLApi*)(GLuint, GLenum, const GLchar*))wglGetProcAddress("glGetProgramResourceLocationIndex"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_program_interface_query

	GLEH_ARB_program_interface_query = !n_failed_functions && b_SupportedExtension("GL_ARB_program_interface_query");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_program_interface_query ---
 */

/*
 *								--- GL_ARB_robust_buffer_access_behavior (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_robust_buffer_access_behavior = false;

int CGL4ExtensionHandler::n_GetARBRobustBufferAccessBehaviorFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_robust_buffer_access_behavior = !n_failed_functions && b_SupportedExtension("GL_ARB_robust_buffer_access_behavior");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_robust_buffer_access_behavior ---
 */

/*
 *								--- GL_ARB_shader_image_size (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_shader_image_size = false;

int CGL4ExtensionHandler::n_GetARBShaderImageSizeFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_image_size = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_image_size");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_image_size ---
 */

/*
 *								--- GL_ARB_shader_storage_buffer_object (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_shader_storage_buffer_object = false;

#ifdef __GENERATE_GL_ARB_shader_storage_buffer_object

void (GLApi *GLFuncPtrName(glShaderStorageBlockBinding))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_shader_storage_buffer_object

int CGL4ExtensionHandler::n_GetARBShaderStorageBufferObjectFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_shader_storage_buffer_object

	if(!(GLFuncPtrName(glShaderStorageBlockBinding) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glShaderStorageBlockBinding"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_shader_storage_buffer_object

	GLEH_ARB_shader_storage_buffer_object = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_storage_buffer_object");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_storage_buffer_object ---
 */

/*
 *								--- GL_ARB_stencil_texturing (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_stencil_texturing = false;

int CGL4ExtensionHandler::n_GetARBStencilTexturingFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_stencil_texturing = !n_failed_functions && b_SupportedExtension("GL_ARB_stencil_texturing");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_stencil_texturing ---
 */

/*
 *								--- GL_ARB_texture_buffer_range (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_texture_buffer_range = false;

#ifdef __GENERATE_GL_ARB_texture_buffer_range

void (GLApi *GLFuncPtrName(glTexBufferRange))(GLenum, GLenum, GLuint, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureBufferRangeEXT))(GLuint, GLenum, GLenum, GLuint, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_texture_buffer_range

int CGL4ExtensionHandler::n_GetARBTextureBufferRangeFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_texture_buffer_range

	if(!(GLFuncPtrName(glTexBufferRange) = (void(GLApi*)(GLenum, GLenum, GLuint, GLintptr, GLsizeiptr))wglGetProcAddress("glTexBufferRange"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureBufferRangeEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint, GLintptr, GLsizeiptr))wglGetProcAddress("glTextureBufferRangeEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_texture_buffer_range

	GLEH_ARB_texture_buffer_range = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_buffer_range");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_buffer_range ---
 */

/*
 *								--- GL_ARB_texture_query_levels (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_texture_query_levels = false;

int CGL4ExtensionHandler::n_GetARBTextureQueryLevelsFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_query_levels = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_query_levels");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_query_levels ---
 */

/*
 *								--- GL_ARB_texture_storage_multisample (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_texture_storage_multisample = false;

#ifdef __GENERATE_GL_ARB_texture_storage_multisample

void (GLApi *GLFuncPtrName(glTexStorage2DMultisample))(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexStorage3DMultisample))(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureStorage2DMultisampleEXT))(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureStorage3DMultisampleEXT))(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_texture_storage_multisample

int CGL4ExtensionHandler::n_GetARBTextureStorageMultisampleFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_texture_storage_multisample

	if(!(GLFuncPtrName(glTexStorage2DMultisample) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTexStorage2DMultisample"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTexStorage3DMultisample) = (void(GLApi*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTexStorage3DMultisample"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureStorage2DMultisampleEXT) = (void(GLApi*)(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTextureStorage2DMultisampleEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureStorage3DMultisampleEXT) = (void(GLApi*)(GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTextureStorage3DMultisampleEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_texture_storage_multisample

	GLEH_ARB_texture_storage_multisample = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_storage_multisample");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_storage_multisample ---
 */

/*
 *								--- GL_ARB_texture_view (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_texture_view = false;

#ifdef __GENERATE_GL_ARB_texture_view

void (GLApi *GLFuncPtrName(glTextureView))(GLuint, GLenum, GLuint, GLenum, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_texture_view

int CGL4ExtensionHandler::n_GetARBTextureViewFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_texture_view

	if(!(GLFuncPtrName(glTextureView) = (void(GLApi*)(GLuint, GLenum, GLuint, GLenum, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glTextureView"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_texture_view

	GLEH_ARB_texture_view = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_view");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_view ---
 */

/*
 *								--- GL_ARB_vertex_attrib_binding (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_vertex_attrib_binding = false;

#ifdef __GENERATE_GL_ARB_vertex_attrib_binding

void (GLApi *GLFuncPtrName(glBindVertexBuffer))(GLuint, GLuint, GLintptr, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribFormat))(GLuint, int, GLenum, GLboolean, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribIFormat))(GLuint, int, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribLFormat))(GLuint, int, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribBinding))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexBindingDivisor))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayBindVertexBufferEXT))(GLuint, GLuint, GLuint, GLintptr, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribFormatEXT))(GLuint, GLuint, int, GLenum, GLboolean, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribIFormatEXT))(GLuint, GLuint, int, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribLFormatEXT))(GLuint, GLuint, int, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribBindingEXT))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexBindingDivisorEXT))(GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_vertex_attrib_binding

int CGL4ExtensionHandler::n_GetARBVertexAttribBindingFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_vertex_attrib_binding

	if(!(GLFuncPtrName(glBindVertexBuffer) = (void(GLApi*)(GLuint, GLuint, GLintptr, GLsizei))wglGetProcAddress("glBindVertexBuffer"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribFormat) = (void(GLApi*)(GLuint, int, GLenum, GLboolean, GLuint))wglGetProcAddress("glVertexAttribFormat"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribIFormat) = (void(GLApi*)(GLuint, int, GLenum, GLuint))wglGetProcAddress("glVertexAttribIFormat"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribLFormat) = (void(GLApi*)(GLuint, int, GLenum, GLuint))wglGetProcAddress("glVertexAttribLFormat"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribBinding) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glVertexAttribBinding"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexBindingDivisor) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glVertexBindingDivisor"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayBindVertexBufferEXT) = (void(GLApi*)(GLuint, GLuint, GLuint, GLintptr, GLsizei))wglGetProcAddress("glVertexArrayBindVertexBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribFormatEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLboolean, GLuint))wglGetProcAddress("glVertexArrayVertexAttribFormatEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribIFormatEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLuint))wglGetProcAddress("glVertexArrayVertexAttribIFormatEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribLFormatEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLuint))wglGetProcAddress("glVertexArrayVertexAttribLFormatEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribBindingEXT) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glVertexArrayVertexAttribBindingEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexBindingDivisorEXT) = (void(GLApi*)(GLuint, GLuint, GLuint))wglGetProcAddress("glVertexArrayVertexBindingDivisorEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_vertex_attrib_binding

	GLEH_ARB_vertex_attrib_binding = !n_failed_functions && b_SupportedExtension("GL_ARB_vertex_attrib_binding");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_vertex_attrib_binding ---
 */

/*
 *								--- GL_KHR_texture_compression_astc_hdr (part of OpenGL 4.3 core) ---
 */

bool GLEH_KHR_texture_compression_astc_hdr = false;

int CGL4ExtensionHandler::n_GetKHRTextureCompressionASTC_HDRFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_KHR_texture_compression_astc_hdr = !n_failed_functions && b_SupportedExtension("GL_KHR_texture_compression_astc_hdr");

	return n_failed_functions;
}

/*
 *								--- ~GL_KHR_texture_compression_astc_hdr ---
 */

/*
 *								--- GL_ARB_robustness_isolation (part of OpenGL 4.3 core) ---
 */

bool GLEH_ARB_robustness_isolation = false;

int CGL4ExtensionHandler::n_GetARBRobustnessIsolationFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_robustness_isolation = !n_failed_functions && b_SupportedExtension("GL_ARB_robustness_isolation");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_robustness_isolation ---
 */

/*
 *								--- GL_ARB_buffer_storage (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_buffer_storage = false;

#ifdef __GENERATE_GL_ARB_buffer_storage

void (GLApi *GLFuncPtrName(glBufferStorage))(GLenum, GLsizeiptr, const void*, GLbitfield) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedBufferStorageEXT))(GLuint, GLsizeiptr, const void*, GLbitfield) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_buffer_storage

int CGL4ExtensionHandler::n_GetARBBufferStorageFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_buffer_storage

	if(!(GLFuncPtrName(glBufferStorage) = (void(GLApi*)(GLenum, GLsizeiptr, const void*, GLbitfield))wglGetProcAddress("glBufferStorage"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedBufferStorageEXT) = (void(GLApi*)(GLuint, GLsizeiptr, const void*, GLbitfield))wglGetProcAddress("glNamedBufferStorageEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_buffer_storage

	GLEH_ARB_buffer_storage = !n_failed_functions && b_SupportedExtension("GL_ARB_buffer_storage");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_buffer_storage ---
 */

/*
 *								--- GL_ARB_clear_texture (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_clear_texture = false;

#ifdef __GENERATE_GL_ARB_clear_texture

void (GLApi *GLFuncPtrName(glClearTexImage))(GLuint, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glClearTexSubImage))(GLuint, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_clear_texture

int CGL4ExtensionHandler::n_GetARBClearTextureFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_clear_texture

	if(!(GLFuncPtrName(glClearTexImage) = (void(GLApi*)(GLuint, int, GLenum, GLenum, const void*))wglGetProcAddress("glClearTexImage"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glClearTexSubImage) = (void(GLApi*)(GLuint, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glClearTexSubImage"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_clear_texture

	GLEH_ARB_clear_texture = !n_failed_functions && b_SupportedExtension("GL_ARB_clear_texture");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_clear_texture ---
 */

/*
 *								--- GL_ARB_enhanced_layouts (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_enhanced_layouts = false;

int CGL4ExtensionHandler::n_GetARBEnhancedLayoutsFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_enhanced_layouts = !n_failed_functions && b_SupportedExtension("GL_ARB_enhanced_layouts");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_enhanced_layouts ---
 */

/*
 *								--- GL_ARB_multi_bind (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_multi_bind = false;

#ifdef __GENERATE_GL_ARB_multi_bind

void (GLApi *GLFuncPtrName(glBindBuffersBase))(GLenum, GLuint, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindBuffersRange))(GLenum, GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizeiptr*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindTextures))(GLuint, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindSamplers))(GLuint, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindImageTextures))(GLuint, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindVertexBuffers))(GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizei*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_multi_bind

int CGL4ExtensionHandler::n_GetARBMultiBindFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_multi_bind

	if(!(GLFuncPtrName(glBindBuffersBase) = (void(GLApi*)(GLenum, GLuint, GLsizei, const GLuint*))wglGetProcAddress("glBindBuffersBase"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindBuffersRange) = (void(GLApi*)(GLenum, GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizeiptr*))wglGetProcAddress("glBindBuffersRange"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindTextures) = (void(GLApi*)(GLuint, GLsizei, const GLuint*))wglGetProcAddress("glBindTextures"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindSamplers) = (void(GLApi*)(GLuint, GLsizei, const GLuint*))wglGetProcAddress("glBindSamplers"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindImageTextures) = (void(GLApi*)(GLuint, GLsizei, const GLuint*))wglGetProcAddress("glBindImageTextures"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindVertexBuffers) = (void(GLApi*)(GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizei*))wglGetProcAddress("glBindVertexBuffers"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_multi_bind

	GLEH_ARB_multi_bind = !n_failed_functions && b_SupportedExtension("GL_ARB_multi_bind");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_multi_bind ---
 */

/*
 *								--- GL_ARB_query_buffer_object (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_query_buffer_object = false;

int CGL4ExtensionHandler::n_GetARBQueryBufferObjectFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_query_buffer_object = !n_failed_functions && b_SupportedExtension("GL_ARB_query_buffer_object");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_query_buffer_object ---
 */

/*
 *								--- GL_ARB_texture_mirror_clamp_to_edge (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_texture_mirror_clamp_to_edge = false;

int CGL4ExtensionHandler::n_GetARBTextureMirrorClampToEdgeFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_mirror_clamp_to_edge = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_mirror_clamp_to_edge");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_mirror_clamp_to_edge ---
 */

/*
 *								--- GL_ARB_texture_stencil8 (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_texture_stencil8 = false;

int CGL4ExtensionHandler::n_GetARBTextureStencil8FuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_texture_stencil8 = !n_failed_functions && b_SupportedExtension("GL_ARB_texture_stencil8");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_texture_stencil8 ---
 */

/*
 *								--- GL_ARB_vertex_type_10f_11f_11f_rev (part of OpenGL 4.4 core) ---
 */

bool GLEH_ARB_vertex_type_10f_11f_11f_rev = false;

int CGL4ExtensionHandler::n_GetARBVertexType10f11f11fRevFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_vertex_type_10f_11f_11f_rev = !n_failed_functions && b_SupportedExtension("GL_ARB_vertex_type_10f_11f_11f_rev");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_vertex_type_10f_11f_11f_rev ---
 */

/*
 *								--- GL_ARB_bindless_texture ---
 */

bool GLEH_ARB_bindless_texture = false;

#ifdef __GENERATE_GL_ARB_bindless_texture

GLuint64 (GLApi *GLFuncPtrName(glGetTextureHandleARB))(GLuint) INIT_FUNC_POINTERS;
GLuint64 (GLApi *GLFuncPtrName(glGetTextureSamplerHandleARB))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMakeTextureHandleResidentARB))(GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMakeTextureHandleNonResidentARB))(GLuint64) INIT_FUNC_POINTERS;
GLuint64 (GLApi *GLFuncPtrName(glGetImageHandleARB))(GLuint, int, GLboolean, int, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMakeImageHandleResidentARB))(GLuint64, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMakeImageHandleNonResidentARB))(GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformHandleui64ARB))(int, GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glUniformHandleui64vARB))(int, GLsizei, const GLuint64*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformHandleui64ARB))(GLuint, int, GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformHandleui64vARB))(GLuint, int, GLsizei, const GLuint64*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsTextureHandleResidentARB))(GLuint64) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsImageHandleResidentARB))(GLuint64) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL1ui64ARB))(GLuint, GLuint64EXT) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexAttribL1ui64vARB))(GLuint, const GLuint64EXT*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexAttribLui64vARB))(GLuint, GLenum, GLuint64EXT*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_bindless_texture

int CGL4ExtensionHandler::n_GetARBBindlessTextureFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_bindless_texture

	if(!(GLFuncPtrName(glGetTextureHandleARB) = (GLuint64(GLApi*)(GLuint))wglGetProcAddress("glGetTextureHandleARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureSamplerHandleARB) = (GLuint64(GLApi*)(GLuint, GLuint))wglGetProcAddress("glGetTextureSamplerHandleARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMakeTextureHandleResidentARB) = (void(GLApi*)(GLuint64))wglGetProcAddress("glMakeTextureHandleResidentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMakeTextureHandleNonResidentARB) = (void(GLApi*)(GLuint64))wglGetProcAddress("glMakeTextureHandleNonResidentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetImageHandleARB) = (GLuint64(GLApi*)(GLuint, int, GLboolean, int, GLenum))wglGetProcAddress("glGetImageHandleARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMakeImageHandleResidentARB) = (void(GLApi*)(GLuint64, GLenum))wglGetProcAddress("glMakeImageHandleResidentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMakeImageHandleNonResidentARB) = (void(GLApi*)(GLuint64))wglGetProcAddress("glMakeImageHandleNonResidentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformHandleui64ARB) = (void(GLApi*)(int, GLuint64))wglGetProcAddress("glUniformHandleui64ARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUniformHandleui64vARB) = (void(GLApi*)(int, GLsizei, const GLuint64*))wglGetProcAddress("glUniformHandleui64vARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformHandleui64ARB) = (void(GLApi*)(GLuint, int, GLuint64))wglGetProcAddress("glProgramUniformHandleui64ARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformHandleui64vARB) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint64*))wglGetProcAddress("glProgramUniformHandleui64vARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsTextureHandleResidentARB) = (GLboolean(GLApi*)(GLuint64))wglGetProcAddress("glIsTextureHandleResidentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsImageHandleResidentARB) = (GLboolean(GLApi*)(GLuint64))wglGetProcAddress("glIsImageHandleResidentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL1ui64ARB) = (void(GLApi*)(GLuint, GLuint64EXT))wglGetProcAddress("glVertexAttribL1ui64ARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexAttribL1ui64vARB) = (void(GLApi*)(GLuint, const GLuint64EXT*))wglGetProcAddress("glVertexAttribL1ui64vARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetVertexAttribLui64vARB) = (void(GLApi*)(GLuint, GLenum, GLuint64EXT*))wglGetProcAddress("glGetVertexAttribLui64vARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_bindless_texture

	GLEH_ARB_bindless_texture = !n_failed_functions && b_SupportedExtension("GL_ARB_bindless_texture");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_bindless_texture ---
 */

/*
 *								--- GL_ARB_sparse_texture ---
 */

bool GLEH_ARB_sparse_texture = false;

#ifdef __GENERATE_GL_ARB_sparse_texture

void (GLApi *GLFuncPtrName(glTexPageCommitmentARB))(GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTexturePageCommitmentEXTARB))(GLuint, int, int, int, int, GLsizei, GLsizei, GLsizei, GLboolean) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_sparse_texture

int CGL4ExtensionHandler::n_GetARBSparseTextureFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_sparse_texture

	if(!(GLFuncPtrName(glTexPageCommitmentARB) = (void(GLApi*)(GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTexPageCommitmentARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTexturePageCommitmentEXTARB) = (void(GLApi*)(GLuint, int, int, int, int, GLsizei, GLsizei, GLsizei, GLboolean))wglGetProcAddress("glTexturePageCommitmentEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_sparse_texture

	GLEH_ARB_sparse_texture = !n_failed_functions && b_SupportedExtension("GL_ARB_sparse_texture");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_sparse_texture ---
 */

/*
 *								--- GL_ARB_compute_variable_group_size ---
 */

bool GLEH_ARB_compute_variable_group_size = false;

#ifdef __GENERATE_GL_ARB_compute_variable_group_size

void (GLApi *GLFuncPtrName(glDispatchComputeGroupSizeARB))(GLuint, GLuint, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_compute_variable_group_size

int CGL4ExtensionHandler::n_GetARBComputeVariableGroupSizeFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_compute_variable_group_size

	if(!(GLFuncPtrName(glDispatchComputeGroupSizeARB) = (void(GLApi*)(GLuint, GLuint, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glDispatchComputeGroupSizeARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_compute_variable_group_size

	GLEH_ARB_compute_variable_group_size = !n_failed_functions && b_SupportedExtension("GL_ARB_compute_variable_group_size");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_compute_variable_group_size ---
 */

/*
 *								--- GL_ARB_indirect_parameters ---
 */

bool GLEH_ARB_indirect_parameters = false;

#ifdef __GENERATE_GL_ARB_indirect_parameters

void (GLApi *GLFuncPtrName(glMultiDrawArraysIndirectCountARB))(GLenum, const void*, GLintptr, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiDrawElementsIndirectCountARB))(GLenum, GLenum, const void*, GLintptr, GLsizei, GLsizei) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_indirect_parameters

int CGL4ExtensionHandler::n_GetARBIndirectParametersFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_indirect_parameters

	if(!(GLFuncPtrName(glMultiDrawArraysIndirectCountARB) = (void(GLApi*)(GLenum, const void*, GLintptr, GLsizei, GLsizei))wglGetProcAddress("glMultiDrawArraysIndirectCountARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiDrawElementsIndirectCountARB) = (void(GLApi*)(GLenum, GLenum, const void*, GLintptr, GLsizei, GLsizei))wglGetProcAddress("glMultiDrawElementsIndirectCountARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_indirect_parameters

	GLEH_ARB_indirect_parameters = !n_failed_functions && b_SupportedExtension("GL_ARB_indirect_parameters");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_indirect_parameters ---
 */

/*
 *								--- GL_ARB_seamless_cubemap_per_texture ---
 */

bool GLEH_ARB_seamless_cubemap_per_texture = false;

int CGL4ExtensionHandler::n_GetARBSeamlessCubemapPerTextureFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_seamless_cubemap_per_texture = !n_failed_functions && b_SupportedExtension("GL_ARB_seamless_cubemap_per_texture");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_seamless_cubemap_per_texture ---
 */

/*
 *								--- GL_ARB_shader_draw_parameters ---
 */

bool GLEH_ARB_shader_draw_parameters = false;

int CGL4ExtensionHandler::n_GetARBShaderDrawParametersFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_draw_parameters = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_draw_parameters");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_draw_parameters ---
 */

/*
 *								--- GL_ARB_shader_group_vote ---
 */

bool GLEH_ARB_shader_group_vote = false;

int CGL4ExtensionHandler::n_GetARBShaderGroupVoteFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_group_vote = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_group_vote");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_group_vote ---
 */

/*
 *								--- GL_EXT_draw_buffers2 ---
 */

bool GLEH_EXT_draw_buffers2 = false;

#ifdef __GENERATE_GL_EXT_draw_buffers2

void (GLApi *GLFuncPtrName(glColorMaskIndexedEXT))(GLuint, GLboolean, GLboolean, GLboolean, GLboolean) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetBooleanIndexedvEXT))(GLenum, GLuint, GLboolean*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetIntegerIndexedvEXT))(GLenum, GLuint, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glEnableIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDisableIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsEnabledIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_EXT_draw_buffers2

int CGL4ExtensionHandler::n_GetEXTDrawBuffers2FuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_EXT_draw_buffers2

	if(!(GLFuncPtrName(glColorMaskIndexedEXT) = (void(GLApi*)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean))wglGetProcAddress("glColorMaskIndexedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetBooleanIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, GLboolean*))wglGetProcAddress("glGetBooleanIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetIntegerIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, int*))wglGetProcAddress("glGetIntegerIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glEnableIndexedEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEnableIndexedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDisableIndexedEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDisableIndexedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsEnabledIndexedEXT) = (GLboolean(GLApi*)(GLenum, GLuint))wglGetProcAddress("glIsEnabledIndexedEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_EXT_draw_buffers2

	GLEH_EXT_draw_buffers2 = !n_failed_functions && b_SupportedExtension("GL_EXT_draw_buffers2");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_draw_buffers2 ---
 */

/*
 *								--- GL_EXT_gpu_program_parameters ---
 */

bool GLEH_EXT_gpu_program_parameters = false;

#ifdef __GENERATE_GL_EXT_gpu_program_parameters

void (GLApi *GLFuncPtrName(glProgramEnvParameters4fvEXT))(GLenum, GLuint, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramLocalParameters4fvEXT))(GLenum, GLuint, GLsizei, const float*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_EXT_gpu_program_parameters

int CGL4ExtensionHandler::n_GetEXTGPUProgramParametersFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_EXT_gpu_program_parameters

	if(!(GLFuncPtrName(glProgramEnvParameters4fvEXT) = (void(GLApi*)(GLenum, GLuint, GLsizei, const float*))wglGetProcAddress("glProgramEnvParameters4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramLocalParameters4fvEXT) = (void(GLApi*)(GLenum, GLuint, GLsizei, const float*))wglGetProcAddress("glProgramLocalParameters4fvEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_EXT_gpu_program_parameters

	GLEH_EXT_gpu_program_parameters = !n_failed_functions && b_SupportedExtension("GL_EXT_gpu_program_parameters");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_gpu_program_parameters ---
 */

/*
 *								--- GL_EXT_bindable_uniform ---
 */

bool GLEH_EXT_bindable_uniform = false;

#ifdef __GENERATE_GL_EXT_bindable_uniform

void (GLApi *GLFuncPtrName(glUniformBufferEXT))(GLuint, int, GLuint) INIT_FUNC_POINTERS;
int (GLApi *GLFuncPtrName(glGetUniformBufferSizeEXT))(GLuint, int) INIT_FUNC_POINTERS;
GLintptr (GLApi *GLFuncPtrName(glGetUniformOffsetEXT))(GLuint, int) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_EXT_bindable_uniform

int CGL4ExtensionHandler::n_GetEXTBindableUniformFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_EXT_bindable_uniform

	if(!(GLFuncPtrName(glUniformBufferEXT) = (void(GLApi*)(GLuint, int, GLuint))wglGetProcAddress("glUniformBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetUniformBufferSizeEXT) = (int(GLApi*)(GLuint, int))wglGetProcAddress("glGetUniformBufferSizeEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetUniformOffsetEXT) = (GLintptr(GLApi*)(GLuint, int))wglGetProcAddress("glGetUniformOffsetEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_EXT_bindable_uniform

	GLEH_EXT_bindable_uniform = !n_failed_functions && b_SupportedExtension("GL_EXT_bindable_uniform");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_bindable_uniform ---
 */

/*
 *								--- GL_ARB_shader_texture_lod ---
 */

bool GLEH_ARB_shader_texture_lod = false;

int CGL4ExtensionHandler::n_GetARBShaderTextureLodFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_texture_lod = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_texture_lod");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_texture_lod ---
 */

/*
 *								--- GL_S3_s3tc ---
 */

bool GLEH_S3_s3tc = false;

int CGL4ExtensionHandler::n_GetS3_S3TCFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_S3_s3tc = !n_failed_functions && b_SupportedExtension("GL_S3_s3tc");

	return n_failed_functions;
}

/*
 *								--- ~GL_S3_s3tc ---
 */

/*
 *								--- GL_EXT_texture_compression_latc ---
 */

bool GLEH_EXT_texture_compression_latc = false;

int CGL4ExtensionHandler::n_GetEXTTextureCompressionLATCFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_EXT_texture_compression_latc = !n_failed_functions && b_SupportedExtension("GL_EXT_texture_compression_latc");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_texture_compression_latc ---
 */

/*
 *								--- GL_EXT_texture_compression_s3tc ---
 */

bool GLEH_EXT_texture_compression_s3tc = false;

int CGL4ExtensionHandler::n_GetEXTTextureCompressionS3TCFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_EXT_texture_compression_s3tc = !n_failed_functions && b_SupportedExtension("GL_EXT_texture_compression_s3tc");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_texture_compression_s3tc ---
 */

/*
 *								--- GL_EXT_texture_filter_anisotropic ---
 */

bool GLEH_EXT_texture_filter_anisotropic = false;

int CGL4ExtensionHandler::n_GetEXTTextureFilterAnisotropicFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_EXT_texture_filter_anisotropic = !n_failed_functions && b_SupportedExtension("GL_EXT_texture_filter_anisotropic");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_texture_filter_anisotropic ---
 */

/*
 *								--- GL_EXT_abgr ---
 */

bool GLEH_EXT_abgr = false;

int CGL4ExtensionHandler::n_GetEXTABGRFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_EXT_abgr = !n_failed_functions && b_SupportedExtension("GL_EXT_abgr");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_abgr ---
 */

/*
 *								--- GL_ARB_shading_language_include ---
 */

bool GLEH_ARB_shading_language_include = false;

#ifdef __GENERATE_GL_ARB_shading_language_include

void (GLApi *GLFuncPtrName(glNamedStringARB))(GLenum, int, const GLchar*, int, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDeleteNamedStringARB))(int, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompileShaderIncludeARB))(GLuint, GLsizei, const GLchar**, const int*) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glIsNamedStringARB))(int, const GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedStringARB))(int, const GLchar*, GLsizei, int*, GLchar*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedStringivARB))(int, const GLchar*, GLenum, int*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_shading_language_include

int CGL4ExtensionHandler::n_GetARBShadingLanguageIncludeFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_shading_language_include

	if(!(GLFuncPtrName(glNamedStringARB) = (void(GLApi*)(GLenum, int, const GLchar*, int, const GLchar*))wglGetProcAddress("glNamedStringARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDeleteNamedStringARB) = (void(GLApi*)(int, const GLchar*))wglGetProcAddress("glDeleteNamedStringARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompileShaderIncludeARB) = (void(GLApi*)(GLuint, GLsizei, const GLchar**, const int*))wglGetProcAddress("glCompileShaderIncludeARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsNamedStringARB) = (GLboolean(GLApi*)(int, const GLchar*))wglGetProcAddress("glIsNamedStringARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedStringARB) = (void(GLApi*)(int, const GLchar*, GLsizei, int*, GLchar*))wglGetProcAddress("glGetNamedStringARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedStringivARB) = (void(GLApi*)(int, const GLchar*, GLenum, int*))wglGetProcAddress("glGetNamedStringivARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_shading_language_include

	GLEH_ARB_shading_language_include = !n_failed_functions && b_SupportedExtension("GL_ARB_shading_language_include");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shading_language_include ---
 */

/*
 *								--- GL_ARB_cl_event ---
 */

bool GLEH_ARB_cl_event = false;

#ifdef __GENERATE_GL_ARB_cl_event

GLsync (GLApi *GLFuncPtrName(glCreateSyncFromCLeventARB))(cl_context, cl_event, GLbitfield) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_cl_event

int CGL4ExtensionHandler::n_GetARBCLEventFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_cl_event

	if(!(GLFuncPtrName(glCreateSyncFromCLeventARB) = (GLsync(GLApi*)(cl_context, cl_event, GLbitfield))wglGetProcAddress("glCreateSyncFromCLeventARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_cl_event

	GLEH_ARB_cl_event = !n_failed_functions && b_SupportedExtension("GL_ARB_cl_event");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_cl_event ---
 */

/*
 *								--- GL_ARB_robustness ---
 */

bool GLEH_ARB_robustness = false;

#ifdef __GENERATE_GL_ARB_robustness

GLenum (GLApi *GLFuncPtrName(glGetGraphicsResetStatusARB))() INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glGetnMapdvARB))(GLenum, GLenum, GLsizei, double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (evaluators)
//void (GLApi *GLFuncPtrName(glGetnMapfvARB))(GLenum, GLenum, GLsizei, float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (evaluators)
//void (GLApi *GLFuncPtrName(glGetnMapivARB))(GLenum, GLenum, GLsizei, int*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (evaluators)
//void (GLApi *GLFuncPtrName(glGetnPixelMapfvARB))(GLenum, GLsizei, float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
//void (GLApi *GLFuncPtrName(glGetnPixelMapuivARB))(GLenum, GLsizei, GLuint*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
//void (GLApi *GLFuncPtrName(glGetnPixelMapusvARB))(GLenum, GLsizei, GLushort*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
//void (GLApi *GLFuncPtrName(glGetnPolygonStippleARB))(GLsizei, GLubyte*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (polygon stipple)
void (GLApi *GLFuncPtrName(glGetnTexImageARB))(GLenum, int, GLenum, GLenum, GLsizei, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glReadnPixelsARB))(int, int, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glGetnColorTableARB))(GLenum, GLenum, GLenum, GLsizei, void*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (color index mode)
//void (GLApi *GLFuncPtrName(glGetnConvolutionFilterARB))(GLenum, GLenum, GLenum, GLsizei, void*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
//void (GLApi *GLFuncPtrName(glGetnSeparableFilterARB))(GLenum, GLenum, GLenum, GLsizei, void*, GLsizei, void*, void*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
//void (GLApi *GLFuncPtrName(glGetnHistogramARB))(GLenum, GLboolean, GLenum, GLenum, GLsizei, void*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
//void (GLApi *GLFuncPtrName(glGetnMinmaxARB))(GLenum, GLboolean, GLenum, GLenum, GLsizei, void*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (pixel transfer modes and operations)
void (GLApi *GLFuncPtrName(glGetnCompressedTexImageARB))(GLenum, int, GLsizei, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetnUniformfvARB))(GLuint, int, GLsizei, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetnUniformivARB))(GLuint, int, GLsizei, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetnUniformuivARB))(GLuint, int, GLsizei, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetnUniformdvARB))(GLuint, int, GLsizei, double*) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_ARB_robustness

int CGL4ExtensionHandler::n_GetARBRobustnessFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_ARB_robustness

	if(!(GLFuncPtrName(glGetGraphicsResetStatusARB) = (GLenum(GLApi*)())wglGetProcAddress("glGetGraphicsResetStatusARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnMapdvARB) = (void(GLApi*)(GLenum, GLenum, GLsizei, double*))wglGetProcAddress("glGetnMapdvARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnMapfvARB) = (void(GLApi*)(GLenum, GLenum, GLsizei, float*))wglGetProcAddress("glGetnMapfvARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnMapivARB) = (void(GLApi*)(GLenum, GLenum, GLsizei, int*))wglGetProcAddress("glGetnMapivARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnPixelMapfvARB) = (void(GLApi*)(GLenum, GLsizei, float*))wglGetProcAddress("glGetnPixelMapfvARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnPixelMapuivARB) = (void(GLApi*)(GLenum, GLsizei, GLuint*))wglGetProcAddress("glGetnPixelMapuivARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnPixelMapusvARB) = (void(GLApi*)(GLenum, GLsizei, GLushort*))wglGetProcAddress("glGetnPixelMapusvARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnPolygonStippleARB) = (void(GLApi*)(GLsizei, GLubyte*))wglGetProcAddress("glGetnPolygonStippleARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetnTexImageARB) = (void(GLApi*)(GLenum, int, GLenum, GLenum, GLsizei, void*))wglGetProcAddress("glGetnTexImageARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glReadnPixelsARB) = (void(GLApi*)(int, int, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*))wglGetProcAddress("glReadnPixelsARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnColorTableARB) = (void(GLApi*)(GLenum, GLenum, GLenum, GLsizei, void*))wglGetProcAddress("glGetnColorTableARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnConvolutionFilterARB) = (void(GLApi*)(GLenum, GLenum, GLenum, GLsizei, void*))wglGetProcAddress("glGetnConvolutionFilterARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnSeparableFilterARB) = (void(GLApi*)(GLenum, GLenum, GLenum, GLsizei, void*, GLsizei, void*, void*))wglGetProcAddress("glGetnSeparableFilterARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnHistogramARB) = (void(GLApi*)(GLenum, GLboolean, GLenum, GLenum, GLsizei, void*))wglGetProcAddress("glGetnHistogramARB"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetnMinmaxARB) = (void(GLApi*)(GLenum, GLboolean, GLenum, GLenum, GLsizei, void*))wglGetProcAddress("glGetnMinmaxARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetnCompressedTexImageARB) = (void(GLApi*)(GLenum, int, GLsizei, void*))wglGetProcAddress("glGetnCompressedTexImageARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetnUniformfvARB) = (void(GLApi*)(GLuint, int, GLsizei, float*))wglGetProcAddress("glGetnUniformfvARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetnUniformivARB) = (void(GLApi*)(GLuint, int, GLsizei, int*))wglGetProcAddress("glGetnUniformivARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetnUniformuivARB) = (void(GLApi*)(GLuint, int, GLsizei, GLuint*))wglGetProcAddress("glGetnUniformuivARB"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetnUniformdvARB) = (void(GLApi*)(GLuint, int, GLsizei, double*))wglGetProcAddress("glGetnUniformdvARB"))) ++ n_failed_functions;

#endif // __GENERATE_GL_ARB_robustness

	GLEH_ARB_robustness = !n_failed_functions && b_SupportedExtension("GL_ARB_robustness");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_robustness ---
 */

/*
 *								--- GL_ARB_shader_stencil_export ---
 */

bool GLEH_ARB_shader_stencil_export = false;

int CGL4ExtensionHandler::n_GetARBShaderStencilExportFuncPointers()
{
	int n_failed_functions = 0;

	// no new functions or procedures here

	GLEH_ARB_shader_stencil_export = !n_failed_functions && b_SupportedExtension("GL_ARB_shader_stencil_export");

	return n_failed_functions;
}

/*
 *								--- ~GL_ARB_shader_stencil_export ---
 */

/*
 *								--- GL_EXT_direct_state_access ---
 */

bool GLEH_EXT_direct_state_access = false;

#ifdef __GENERATE_GL_EXT_direct_state_access

//void (GLApi *GLFuncPtrName(glClientAttribDefaultEXT))(GLbitfield) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (attribute stacks)
//void (GLApi *GLFuncPtrName(glPushClientAttribDefaultEXT))(GLbitfield) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (attribute stacks)
//void (GLApi *GLFuncPtrName(glMatrixLoadfEXT))(GLenum, const float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixLoaddEXT))(GLenum, const double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixMultfEXT))(GLenum, const float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixMultdEXT))(GLenum, const double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixLoadIdentityEXT))(GLenum) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixRotatefEXT))(GLenum, float, float, float, float) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixRotatedEXT))(GLenum, double, double, double, double) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixScalefEXT))(GLenum, float, float, float) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixScaledEXT))(GLenum, double, double, double) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixTranslatefEXT))(GLenum, float, float, float) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixTranslatedEXT))(GLenum, double, double, double) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixOrthoEXT))(GLenum, double, double, double, double, double, double) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixFrustumEXT))(GLenum, double, double, double, double, double, double) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixPushEXT))(GLenum) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixPopEXT))(GLenum) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glTextureParameteriEXT))(GLuint, GLenum, GLenum, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureParameterivEXT))(GLuint, GLenum, GLenum, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureParameterfEXT))(GLuint, GLenum, GLenum, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureParameterfvEXT))(GLuint, GLenum, GLenum, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureImage1DEXT))(GLuint, GLenum, int, int, GLsizei, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureImage2DEXT))(GLuint, GLenum, int, int, GLsizei, GLsizei, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureSubImage1DEXT))(GLuint, GLenum, int, int, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureSubImage2DEXT))(GLuint, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyTextureImage1DEXT))(GLuint, GLenum, int, GLenum, int, int, GLsizei, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyTextureImage2DEXT))(GLuint, GLenum, int, GLenum, int, int, GLsizei, GLsizei, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyTextureSubImage1DEXT))(GLuint, GLenum, int, int, int, int, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyTextureSubImage2DEXT))(GLuint, GLenum, int, int, int, int, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureImageEXT))(GLuint, GLenum, int, GLenum, GLenum, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureParameterfvEXT))(GLuint, GLenum, GLenum, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureParameterivEXT))(GLuint, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureLevelParameterfvEXT))(GLuint, GLenum, int, GLenum, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureLevelParameterivEXT))(GLuint, GLenum, int, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureImage3DEXT))(GLuint, GLenum, int, int, GLsizei, GLsizei, GLsizei, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureSubImage3DEXT))(GLuint, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyTextureSubImage3DEXT))(GLuint, GLenum, int, int, int, int, int, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glBindMultiTextureEXT))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexCoordPointerEXT))(GLenum, int, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glMultiTexEnvfEXT))(GLenum, GLenum, GLenum, float) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function fragment processing)
//void (GLApi *GLFuncPtrName(glMultiTexEnvfvEXT))(GLenum, GLenum, GLenum, const float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function fragment processing)
//void (GLApi *GLFuncPtrName(glMultiTexEnviEXT))(GLenum, GLenum, GLenum, int) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function fragment processing)
//void (GLApi *GLFuncPtrName(glMultiTexEnvivEXT))(GLenum, GLenum, GLenum, const int*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function fragment processing)
//void (GLApi *GLFuncPtrName(glMultiTexGendEXT))(GLenum, GLenum, GLenum, double) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexGendvEXT))(GLenum, GLenum, GLenum, const double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexGenfEXT))(GLenum, GLenum, GLenum, float) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexGenfvEXT))(GLenum, GLenum, GLenum, const float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexGeniEXT))(GLenum, GLenum, GLenum, int) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMultiTexGenivEXT))(GLenum, GLenum, GLenum, const int*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glGetMultiTexEnvfvEXT))(GLenum, GLenum, GLenum, float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function fragment processing)
//void (GLApi *GLFuncPtrName(glGetMultiTexEnvivEXT))(GLenum, GLenum, GLenum, int*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function fragment processing)
//void (GLApi *GLFuncPtrName(glGetMultiTexGendvEXT))(GLenum, GLenum, GLenum, double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glGetMultiTexGenfvEXT))(GLenum, GLenum, GLenum, float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glGetMultiTexGenivEXT))(GLenum, GLenum, GLenum, int*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glMultiTexParameteriEXT))(GLenum, GLenum, GLenum, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexParameterivEXT))(GLenum, GLenum, GLenum, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexParameterfEXT))(GLenum, GLenum, GLenum, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexParameterfvEXT))(GLenum, GLenum, GLenum, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexImage1DEXT))(GLenum, GLenum, int, int, GLsizei, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexImage2DEXT))(GLenum, GLenum, int, int, GLsizei, GLsizei, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexSubImage1DEXT))(GLenum, GLenum, int, int, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexSubImage2DEXT))(GLenum, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyMultiTexImage1DEXT))(GLenum, GLenum, int, GLenum, int, int, GLsizei, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyMultiTexImage2DEXT))(GLenum, GLenum, int, GLenum, int, int, GLsizei, GLsizei, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyMultiTexSubImage1DEXT))(GLenum, GLenum, int, int, int, int, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyMultiTexSubImage2DEXT))(GLenum, GLenum, int, int, int, int, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexImageEXT))(GLenum, GLenum, int, GLenum, GLenum, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexParameterfvEXT))(GLenum, GLenum, GLenum, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexParameterivEXT))(GLenum, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexLevelParameterfvEXT))(GLenum, GLenum, int, GLenum, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexLevelParameterivEXT))(GLenum, GLenum, int, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexImage3DEXT))(GLenum, GLenum, int, int, GLsizei, GLsizei, GLsizei, int, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexSubImage3DEXT))(GLenum, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCopyMultiTexSubImage3DEXT))(GLenum, GLenum, int, int, int, int, int, int, GLsizei, GLsizei) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glEnableClientStateIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glDisableClientStateIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glEnableClientStateiEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glDisableClientStateiEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glGetFloatIndexedvEXT))(GLenum, GLuint, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetDoubleIndexedvEXT))(GLenum, GLuint, double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetPointerIndexedvEXT))(GLenum, GLuint, void**) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetFloati_vEXT))(GLenum, GLuint, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetDoublei_vEXT))(GLenum, GLuint, double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetPointeri_vEXT))(GLenum, GLuint, void**) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glEnableIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glDisableIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // defined above
//GLboolean (GLApi *GLFuncPtrName(glIsEnabledIndexedEXT))(GLenum, GLuint) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glGetIntegerIndexedvEXT))(GLenum, GLuint, int*) INIT_FUNC_POINTERS; // defined above
//void (GLApi *GLFuncPtrName(glGetBooleanIndexedvEXT))(GLenum, GLuint, GLboolean*) INIT_FUNC_POINTERS; // defined above
void (GLApi *GLFuncPtrName(glNamedProgramStringEXT))(GLuint, GLenum, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameter4dEXT))(GLuint, GLenum, GLuint, double, double, double, double) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameter4dvEXT))(GLuint, GLenum, GLuint, const double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameter4fEXT))(GLuint, GLenum, GLuint, float, float, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameter4fvEXT))(GLuint, GLenum, GLuint, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedProgramLocalParameterdvEXT))(GLuint, GLenum, GLuint, double*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedProgramLocalParameterfvEXT))(GLuint, GLenum, GLuint, float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedProgramivEXT))(GLuint, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedProgramStringEXT))(GLuint, GLenum, GLenum, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTextureImage3DEXT))(GLuint, GLenum, int, GLenum, GLsizei, GLsizei, GLsizei, int, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTextureImage2DEXT))(GLuint, GLenum, int, GLenum, GLsizei, GLsizei, int, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTextureImage1DEXT))(GLuint, GLenum, int, GLenum, GLsizei, int, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTextureSubImage3DEXT))(GLuint, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTextureSubImage2DEXT))(GLuint, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedTextureSubImage1DEXT))(GLuint, GLenum, int, int, GLsizei, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetCompressedTextureImageEXT))(GLuint, GLenum, int, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedMultiTexImage3DEXT))(GLenum, GLenum, int, GLenum, GLsizei, GLsizei, GLsizei, int, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedMultiTexImage2DEXT))(GLenum, GLenum, int, GLenum, GLsizei, GLsizei, int, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedMultiTexImage1DEXT))(GLenum, GLenum, int, GLenum, GLsizei, int, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedMultiTexSubImage3DEXT))(GLenum, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedMultiTexSubImage2DEXT))(GLenum, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glCompressedMultiTexSubImage1DEXT))(GLenum, GLenum, int, int, GLsizei, GLenum, GLsizei, const void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetCompressedMultiTexImageEXT))(GLenum, GLenum, int, void*) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glMatrixLoadTransposefEXT))(GLenum, const float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixLoadTransposedEXT))(GLenum, const double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixMultTransposefEXT))(GLenum, const float*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glMatrixMultTransposedEXT))(GLenum, const double*) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glNamedBufferDataEXT))(GLuint, GLsizeiptr, const void*, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedBufferSubDataEXT))(GLuint, GLintptr, GLsizeiptr, const void*) INIT_FUNC_POINTERS;
void* (GLApi *GLFuncPtrName(glMapNamedBufferEXT))(GLuint, GLenum) INIT_FUNC_POINTERS;
GLboolean (GLApi *GLFuncPtrName(glUnmapNamedBufferEXT))(GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedBufferParameterivEXT))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedBufferPointervEXT))(GLuint, GLenum, void**) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedBufferSubDataEXT))(GLuint, GLintptr, GLsizeiptr, void*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1fEXT))(GLuint, int, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2fEXT))(GLuint, int, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3fEXT))(GLuint, int, float, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4fEXT))(GLuint, int, float, float, float, float) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1iEXT))(GLuint, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2iEXT))(GLuint, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3iEXT))(GLuint, int, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4iEXT))(GLuint, int, int, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1fvEXT))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2fvEXT))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3fvEXT))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4fvEXT))(GLuint, int, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1ivEXT))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2ivEXT))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3ivEXT))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4ivEXT))(GLuint, int, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x3fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x2fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix2x4fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x2fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix3x4fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniformMatrix4x3fvEXT))(GLuint, int, GLsizei, GLboolean, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureBufferEXT))(GLuint, GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexBufferEXT))(GLenum, GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureParameterIivEXT))(GLuint, GLenum, GLenum, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureParameterIuivEXT))(GLuint, GLenum, GLenum, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureParameterIivEXT))(GLuint, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetTextureParameterIuivEXT))(GLuint, GLenum, GLenum, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexParameterIivEXT))(GLenum, GLenum, GLenum, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexParameterIuivEXT))(GLenum, GLenum, GLenum, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexParameterIivEXT))(GLenum, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetMultiTexParameterIuivEXT))(GLenum, GLenum, GLenum, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1uiEXT))(GLuint, int, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2uiEXT))(GLuint, int, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3uiEXT))(GLuint, int, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4uiEXT))(GLuint, int, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform1uivEXT))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform2uivEXT))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform3uivEXT))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glProgramUniform4uivEXT))(GLuint, int, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameters4fvEXT))(GLuint, GLenum, GLuint, GLsizei, const float*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameterI4iEXT))(GLuint, GLenum, GLuint, int, int, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameterI4ivEXT))(GLuint, GLenum, GLuint, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParametersI4ivEXT))(GLuint, GLenum, GLuint, GLsizei, const int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameterI4uiEXT))(GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParameterI4uivEXT))(GLuint, GLenum, GLuint, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedProgramLocalParametersI4uivEXT))(GLuint, GLenum, GLuint, GLsizei, const GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedProgramLocalParameterIivEXT))(GLuint, GLenum, GLuint, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedProgramLocalParameterIuivEXT))(GLuint, GLenum, GLuint, GLuint*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedRenderbufferStorageEXT))(GLuint, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedRenderbufferParameterivEXT))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedRenderbufferStorageMultisampleEXT))(GLuint, GLsizei, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedRenderbufferStorageMultisampleCoverageEXT))(GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei) INIT_FUNC_POINTERS;
GLenum (GLApi *GLFuncPtrName(glCheckNamedFramebufferStatusEXT))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferTexture1DEXT))(GLuint, GLenum, GLenum, GLuint, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferTexture2DEXT))(GLuint, GLenum, GLenum, GLuint, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferTexture3DEXT))(GLuint, GLenum, GLenum, GLuint, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferRenderbufferEXT))(GLuint, GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetNamedFramebufferAttachmentParameterivEXT))(GLuint, GLenum, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenerateTextureMipmapEXT))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGenerateMultiTexMipmapEXT))(GLenum, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferDrawBufferEXT))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferDrawBuffersEXT))(GLuint, GLsizei, const GLenum*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFramebufferReadBufferEXT))(GLuint, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetFramebufferParameterivEXT))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedCopyBufferSubDataEXT))(GLuint, GLuint, GLintptr, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferTextureEXT))(GLuint, GLenum, GLuint, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferTextureLayerEXT))(GLuint, GLenum, GLuint, int, int) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glNamedFramebufferTextureFaceEXT))(GLuint, GLenum, GLuint, int, GLenum) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glTextureRenderbufferEXT))(GLuint, GLenum, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glMultiTexRenderbufferEXT))(GLenum, GLenum, GLuint) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glVertexArrayVertexOffsetEXT))(GLuint, GLuint, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexArrayColorOffsetEXT))(GLuint, GLuint, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexArrayEdgeFlagOffsetEXT))(GLuint, GLuint, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glVertexArrayIndexOffsetEXT))(GLuint, GLuint, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glVertexArrayNormalOffsetEXT))(GLuint, GLuint, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexArrayTexCoordOffsetEXT))(GLuint, GLuint, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexArrayMultiTexCoordOffsetEXT))(GLuint, GLuint, GLenum, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexArrayFogCoordOffsetEXT))(GLuint, GLuint, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glVertexArraySecondaryColorOffsetEXT))(GLuint, GLuint, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribOffsetEXT))(GLuint, GLuint, GLuint, int, GLenum, GLboolean, GLsizei, GLintptr) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glVertexArrayVertexAttribIOffsetEXT))(GLuint, GLuint, GLuint, int, GLenum, GLsizei, GLintptr) INIT_FUNC_POINTERS;
//void (GLApi *GLFuncPtrName(glEnableVertexArrayEXT))(GLuint, GLenum) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
//void (GLApi *GLFuncPtrName(glDisableVertexArrayEXT))(GLuint, GLenum) INIT_FUNC_POINTERS; // deprecated as of OpenGL 3.0 (fixed-function vertex processing)
void (GLApi *GLFuncPtrName(glEnableVertexArrayAttribEXT))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glDisableVertexArrayAttribEXT))(GLuint, GLuint) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexArrayIntegervEXT))(GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexArrayPointervEXT))(GLuint, GLenum, void**) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexArrayIntegeri_vEXT))(GLuint, GLuint, GLenum, int*) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glGetVertexArrayPointeri_vEXT))(GLuint, GLuint, GLenum, void**) INIT_FUNC_POINTERS;
void* (GLApi *GLFuncPtrName(glMapNamedBufferRangeEXT))(GLuint, GLintptr, GLsizeiptr, GLbitfield) INIT_FUNC_POINTERS;
void (GLApi *GLFuncPtrName(glFlushMappedNamedBufferRangeEXT))(GLuint, GLintptr, GLsizeiptr) INIT_FUNC_POINTERS;

#endif // __GENERATE_GL_EXT_direct_state_access

int CGL4ExtensionHandler::n_GetEXTDirectStateAccessFuncPointers()
{
	int n_failed_functions = 0;

#ifdef __GENERATE_GL_EXT_direct_state_access

	//if(!(GLFuncPtrName(glClientAttribDefaultEXT) = (void(GLApi*)(GLbitfield))wglGetProcAddress("glClientAttribDefaultEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glPushClientAttribDefaultEXT) = (void(GLApi*)(GLbitfield))wglGetProcAddress("glPushClientAttribDefaultEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixLoadfEXT) = (void(GLApi*)(GLenum, const float*))wglGetProcAddress("glMatrixLoadfEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixLoaddEXT) = (void(GLApi*)(GLenum, const double*))wglGetProcAddress("glMatrixLoaddEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixMultfEXT) = (void(GLApi*)(GLenum, const float*))wglGetProcAddress("glMatrixMultfEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixMultdEXT) = (void(GLApi*)(GLenum, const double*))wglGetProcAddress("glMatrixMultdEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixLoadIdentityEXT) = (void(GLApi*)(GLenum))wglGetProcAddress("glMatrixLoadIdentityEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixRotatefEXT) = (void(GLApi*)(GLenum, float, float, float, float))wglGetProcAddress("glMatrixRotatefEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixRotatedEXT) = (void(GLApi*)(GLenum, double, double, double, double))wglGetProcAddress("glMatrixRotatedEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixScalefEXT) = (void(GLApi*)(GLenum, float, float, float))wglGetProcAddress("glMatrixScalefEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixScaledEXT) = (void(GLApi*)(GLenum, double, double, double))wglGetProcAddress("glMatrixScaledEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixTranslatefEXT) = (void(GLApi*)(GLenum, float, float, float))wglGetProcAddress("glMatrixTranslatefEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixTranslatedEXT) = (void(GLApi*)(GLenum, double, double, double))wglGetProcAddress("glMatrixTranslatedEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixOrthoEXT) = (void(GLApi*)(GLenum, double, double, double, double, double, double))wglGetProcAddress("glMatrixOrthoEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixFrustumEXT) = (void(GLApi*)(GLenum, double, double, double, double, double, double))wglGetProcAddress("glMatrixFrustumEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixPushEXT) = (void(GLApi*)(GLenum))wglGetProcAddress("glMatrixPushEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixPopEXT) = (void(GLApi*)(GLenum))wglGetProcAddress("glMatrixPopEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureParameteriEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, int))wglGetProcAddress("glTextureParameteriEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureParameterivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, const int*))wglGetProcAddress("glTextureParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureParameterfEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, float))wglGetProcAddress("glTextureParameterfEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureParameterfvEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, const float*))wglGetProcAddress("glTextureParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureImage1DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, GLsizei, int, GLenum, GLenum, const void*))wglGetProcAddress("glTextureImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureImage2DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, GLsizei, GLsizei, int, GLenum, GLenum, const void*))wglGetProcAddress("glTextureImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureSubImage1DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glTextureSubImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureSubImage2DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glTextureSubImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyTextureImage1DEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, int, int, GLsizei, int))wglGetProcAddress("glCopyTextureImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyTextureImage2DEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, int, int, GLsizei, GLsizei, int))wglGetProcAddress("glCopyTextureImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyTextureSubImage1DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, int, GLsizei))wglGetProcAddress("glCopyTextureSubImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyTextureSubImage2DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, int, int, GLsizei, GLsizei))wglGetProcAddress("glCopyTextureSubImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureImageEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, GLenum, void*))wglGetProcAddress("glGetTextureImageEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureParameterfvEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, float*))wglGetProcAddress("glGetTextureParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureParameterivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, int*))wglGetProcAddress("glGetTextureParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureLevelParameterfvEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, float*))wglGetProcAddress("glGetTextureLevelParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureLevelParameterivEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, int*))wglGetProcAddress("glGetTextureLevelParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureImage3DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, GLsizei, GLsizei, GLsizei, int, GLenum, GLenum, const void*))wglGetProcAddress("glTextureImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureSubImage3DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glTextureSubImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyTextureSubImage3DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, int, int, int, GLsizei, GLsizei))wglGetProcAddress("glCopyTextureSubImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glBindMultiTextureEXT) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glBindMultiTextureEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexCoordPointerEXT) = (void(GLApi*)(GLenum, int, GLenum, GLsizei, const void*))wglGetProcAddress("glMultiTexCoordPointerEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexEnvfEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, float))wglGetProcAddress("glMultiTexEnvfEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexEnvfvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const float*))wglGetProcAddress("glMultiTexEnvfvEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexEnviEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int))wglGetProcAddress("glMultiTexEnviEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexEnvivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const int*))wglGetProcAddress("glMultiTexEnvivEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexGendEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, double))wglGetProcAddress("glMultiTexGendEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexGendvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const double*))wglGetProcAddress("glMultiTexGendvEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexGenfEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, float))wglGetProcAddress("glMultiTexGenfEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexGenfvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const float*))wglGetProcAddress("glMultiTexGenfvEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexGeniEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int))wglGetProcAddress("glMultiTexGeniEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMultiTexGenivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const int*))wglGetProcAddress("glMultiTexGenivEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetMultiTexEnvfvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, float*))wglGetProcAddress("glGetMultiTexEnvfvEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetMultiTexEnvivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int*))wglGetProcAddress("glGetMultiTexEnvivEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetMultiTexGendvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, double*))wglGetProcAddress("glGetMultiTexGendvEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetMultiTexGenfvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, float*))wglGetProcAddress("glGetMultiTexGenfvEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glGetMultiTexGenivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int*))wglGetProcAddress("glGetMultiTexGenivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexParameteriEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int))wglGetProcAddress("glMultiTexParameteriEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexParameterivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const int*))wglGetProcAddress("glMultiTexParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexParameterfEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, float))wglGetProcAddress("glMultiTexParameterfEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexParameterfvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const float*))wglGetProcAddress("glMultiTexParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexImage1DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, GLsizei, int, GLenum, GLenum, const void*))wglGetProcAddress("glMultiTexImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexImage2DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, GLsizei, GLsizei, int, GLenum, GLenum, const void*))wglGetProcAddress("glMultiTexImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexSubImage1DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glMultiTexSubImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexSubImage2DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glMultiTexSubImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyMultiTexImage1DEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, int, int, GLsizei, int))wglGetProcAddress("glCopyMultiTexImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyMultiTexImage2DEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, int, int, GLsizei, GLsizei, int))wglGetProcAddress("glCopyMultiTexImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyMultiTexSubImage1DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, int, GLsizei))wglGetProcAddress("glCopyMultiTexSubImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyMultiTexSubImage2DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, int, int, GLsizei, GLsizei))wglGetProcAddress("glCopyMultiTexSubImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexImageEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, GLenum, void*))wglGetProcAddress("glGetMultiTexImageEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexParameterfvEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, float*))wglGetProcAddress("glGetMultiTexParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexParameterivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int*))wglGetProcAddress("glGetMultiTexParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexLevelParameterfvEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, float*))wglGetProcAddress("glGetMultiTexLevelParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexLevelParameterivEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, int*))wglGetProcAddress("glGetMultiTexLevelParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexImage3DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, GLsizei, GLsizei, GLsizei, int, GLenum, GLenum, const void*))wglGetProcAddress("glMultiTexImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexSubImage3DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*))wglGetProcAddress("glMultiTexSubImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCopyMultiTexSubImage3DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, int, int, int, GLsizei, GLsizei))wglGetProcAddress("glCopyMultiTexSubImage3DEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glEnableClientStateIndexedEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEnableClientStateIndexedEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glDisableClientStateIndexedEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDisableClientStateIndexedEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glEnableClientStateiEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEnableClientStateiEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glDisableClientStateiEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDisableClientStateiEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFloatIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, float*))wglGetProcAddress("glGetFloatIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetDoubleIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, double*))wglGetProcAddress("glGetDoubleIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetPointerIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, void**))wglGetProcAddress("glGetPointerIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFloati_vEXT) = (void(GLApi*)(GLenum, GLuint, float*))wglGetProcAddress("glGetFloati_vEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetDoublei_vEXT) = (void(GLApi*)(GLenum, GLuint, double*))wglGetProcAddress("glGetDoublei_vEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetPointeri_vEXT) = (void(GLApi*)(GLenum, GLuint, void**))wglGetProcAddress("glGetPointeri_vEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glEnableIndexedEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glEnableIndexedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDisableIndexedEXT) = (void(GLApi*)(GLenum, GLuint))wglGetProcAddress("glDisableIndexedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glIsEnabledIndexedEXT) = (GLboolean(GLApi*)(GLenum, GLuint))wglGetProcAddress("glIsEnabledIndexedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetIntegerIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, int*))wglGetProcAddress("glGetIntegerIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetBooleanIndexedvEXT) = (void(GLApi*)(GLenum, GLuint, GLboolean*))wglGetProcAddress("glGetBooleanIndexedvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramStringEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLsizei, const void*))wglGetProcAddress("glNamedProgramStringEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameter4dEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, double, double, double, double))wglGetProcAddress("glNamedProgramLocalParameter4dEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameter4dvEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, const double*))wglGetProcAddress("glNamedProgramLocalParameter4dvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameter4fEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, float, float, float, float))wglGetProcAddress("glNamedProgramLocalParameter4fEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameter4fvEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, const float*))wglGetProcAddress("glNamedProgramLocalParameter4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedProgramLocalParameterdvEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, double*))wglGetProcAddress("glGetNamedProgramLocalParameterdvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedProgramLocalParameterfvEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, float*))wglGetProcAddress("glGetNamedProgramLocalParameterfvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedProgramivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, int*))wglGetProcAddress("glGetNamedProgramivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedProgramStringEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, void*))wglGetProcAddress("glGetNamedProgramStringEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedTextureImage3DEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, GLsizei, GLsizei, GLsizei, int, GLsizei, const void*))wglGetProcAddress("glCompressedTextureImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedTextureImage2DEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, GLsizei, GLsizei, int, GLsizei, const void*))wglGetProcAddress("glCompressedTextureImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedTextureImage1DEXT) = (void(GLApi*)(GLuint, GLenum, int, GLenum, GLsizei, int, GLsizei, const void*))wglGetProcAddress("glCompressedTextureImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedTextureSubImage3DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*))wglGetProcAddress("glCompressedTextureSubImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedTextureSubImage2DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLsizei, const void*))wglGetProcAddress("glCompressedTextureSubImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedTextureSubImage1DEXT) = (void(GLApi*)(GLuint, GLenum, int, int, GLsizei, GLenum, GLsizei, const void*))wglGetProcAddress("glCompressedTextureSubImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetCompressedTextureImageEXT) = (void(GLApi*)(GLuint, GLenum, int, void*))wglGetProcAddress("glGetCompressedTextureImageEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedMultiTexImage3DEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, GLsizei, GLsizei, GLsizei, int, GLsizei, const void*))wglGetProcAddress("glCompressedMultiTexImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedMultiTexImage2DEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, GLsizei, GLsizei, int, GLsizei, const void*))wglGetProcAddress("glCompressedMultiTexImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedMultiTexImage1DEXT) = (void(GLApi*)(GLenum, GLenum, int, GLenum, GLsizei, int, GLsizei, const void*))wglGetProcAddress("glCompressedMultiTexImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedMultiTexSubImage3DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, int, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*))wglGetProcAddress("glCompressedMultiTexSubImage3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedMultiTexSubImage2DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, int, GLsizei, GLsizei, GLenum, GLsizei, const void*))wglGetProcAddress("glCompressedMultiTexSubImage2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCompressedMultiTexSubImage1DEXT) = (void(GLApi*)(GLenum, GLenum, int, int, GLsizei, GLenum, GLsizei, const void*))wglGetProcAddress("glCompressedMultiTexSubImage1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetCompressedMultiTexImageEXT) = (void(GLApi*)(GLenum, GLenum, int, void*))wglGetProcAddress("glGetCompressedMultiTexImageEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixLoadTransposefEXT) = (void(GLApi*)(GLenum, const float*))wglGetProcAddress("glMatrixLoadTransposefEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixLoadTransposedEXT) = (void(GLApi*)(GLenum, const double*))wglGetProcAddress("glMatrixLoadTransposedEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixMultTransposefEXT) = (void(GLApi*)(GLenum, const float*))wglGetProcAddress("glMatrixMultTransposefEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glMatrixMultTransposedEXT) = (void(GLApi*)(GLenum, const double*))wglGetProcAddress("glMatrixMultTransposedEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedBufferDataEXT) = (void(GLApi*)(GLuint, GLsizeiptr, const void*, GLenum))wglGetProcAddress("glNamedBufferDataEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedBufferSubDataEXT) = (void(GLApi*)(GLuint, GLintptr, GLsizeiptr, const void*))wglGetProcAddress("glNamedBufferSubDataEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMapNamedBufferEXT) = (void*(GLApi*)(GLuint, GLenum))wglGetProcAddress("glMapNamedBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glUnmapNamedBufferEXT) = (GLboolean(GLApi*)(GLuint))wglGetProcAddress("glUnmapNamedBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedBufferParameterivEXT) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetNamedBufferParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedBufferPointervEXT) = (void(GLApi*)(GLuint, GLenum, void**))wglGetProcAddress("glGetNamedBufferPointervEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedBufferSubDataEXT) = (void(GLApi*)(GLuint, GLintptr, GLsizeiptr, void*))wglGetProcAddress("glGetNamedBufferSubDataEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1fEXT) = (void(GLApi*)(GLuint, int, float))wglGetProcAddress("glProgramUniform1fEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2fEXT) = (void(GLApi*)(GLuint, int, float, float))wglGetProcAddress("glProgramUniform2fEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3fEXT) = (void(GLApi*)(GLuint, int, float, float, float))wglGetProcAddress("glProgramUniform3fEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4fEXT) = (void(GLApi*)(GLuint, int, float, float, float, float))wglGetProcAddress("glProgramUniform4fEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1iEXT) = (void(GLApi*)(GLuint, int, int))wglGetProcAddress("glProgramUniform1iEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2iEXT) = (void(GLApi*)(GLuint, int, int, int))wglGetProcAddress("glProgramUniform2iEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3iEXT) = (void(GLApi*)(GLuint, int, int, int, int))wglGetProcAddress("glProgramUniform3iEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4iEXT) = (void(GLApi*)(GLuint, int, int, int, int, int))wglGetProcAddress("glProgramUniform4iEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform1fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform2fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform3fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, const float*))wglGetProcAddress("glProgramUniform4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1ivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform1ivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2ivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform2ivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3ivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform3ivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4ivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const int*))wglGetProcAddress("glProgramUniform4ivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix2fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix3fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x3fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix2x3fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x2fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix3x2fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix2x4fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix2x4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x2fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix4x2fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix3x4fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix3x4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniformMatrix4x3fvEXT) = (void(GLApi*)(GLuint, int, GLsizei, GLboolean, const float*))wglGetProcAddress("glProgramUniformMatrix4x3fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureBufferEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint))wglGetProcAddress("glTextureBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexBufferEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, GLuint))wglGetProcAddress("glMultiTexBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureParameterIivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, const int*))wglGetProcAddress("glTextureParameterIivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureParameterIuivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, const GLuint*))wglGetProcAddress("glTextureParameterIuivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureParameterIivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, int*))wglGetProcAddress("glGetTextureParameterIivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetTextureParameterIuivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint*))wglGetProcAddress("glGetTextureParameterIuivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexParameterIivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const int*))wglGetProcAddress("glMultiTexParameterIivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexParameterIuivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, const GLuint*))wglGetProcAddress("glMultiTexParameterIuivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexParameterIivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, int*))wglGetProcAddress("glGetMultiTexParameterIivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetMultiTexParameterIuivEXT) = (void(GLApi*)(GLenum, GLenum, GLenum, GLuint*))wglGetProcAddress("glGetMultiTexParameterIuivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1uiEXT) = (void(GLApi*)(GLuint, int, GLuint))wglGetProcAddress("glProgramUniform1uiEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2uiEXT) = (void(GLApi*)(GLuint, int, GLuint, GLuint))wglGetProcAddress("glProgramUniform2uiEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3uiEXT) = (void(GLApi*)(GLuint, int, GLuint, GLuint, GLuint))wglGetProcAddress("glProgramUniform3uiEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4uiEXT) = (void(GLApi*)(GLuint, int, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glProgramUniform4uiEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform1uivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform1uivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform2uivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform2uivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform3uivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform3uivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glProgramUniform4uivEXT) = (void(GLApi*)(GLuint, int, GLsizei, const GLuint*))wglGetProcAddress("glProgramUniform4uivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameters4fvEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, const float*))wglGetProcAddress("glNamedProgramLocalParameters4fvEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameterI4iEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, int, int, int, int))wglGetProcAddress("glNamedProgramLocalParameterI4iEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameterI4ivEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, const int*))wglGetProcAddress("glNamedProgramLocalParameterI4ivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParametersI4ivEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, const int*))wglGetProcAddress("glNamedProgramLocalParametersI4ivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameterI4uiEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint))wglGetProcAddress("glNamedProgramLocalParameterI4uiEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParameterI4uivEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, const GLuint*))wglGetProcAddress("glNamedProgramLocalParameterI4uivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedProgramLocalParametersI4uivEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, GLsizei, const GLuint*))wglGetProcAddress("glNamedProgramLocalParametersI4uivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedProgramLocalParameterIivEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, int*))wglGetProcAddress("glGetNamedProgramLocalParameterIivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedProgramLocalParameterIuivEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, GLuint*))wglGetProcAddress("glGetNamedProgramLocalParameterIuivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedRenderbufferStorageEXT) = (void(GLApi*)(GLuint, GLenum, GLsizei, GLsizei))wglGetProcAddress("glNamedRenderbufferStorageEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedRenderbufferParameterivEXT) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetNamedRenderbufferParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedRenderbufferStorageMultisampleEXT) = (void(GLApi*)(GLuint, GLsizei, GLenum, GLsizei, GLsizei))wglGetProcAddress("glNamedRenderbufferStorageMultisampleEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedRenderbufferStorageMultisampleCoverageEXT) = (void(GLApi*)(GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei))wglGetProcAddress("glNamedRenderbufferStorageMultisampleCoverageEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glCheckNamedFramebufferStatusEXT) = (GLenum(GLApi*)(GLuint, GLenum))wglGetProcAddress("glCheckNamedFramebufferStatusEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferTexture1DEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint, int))wglGetProcAddress("glNamedFramebufferTexture1DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferTexture2DEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint, int))wglGetProcAddress("glNamedFramebufferTexture2DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferTexture3DEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint, int, int))wglGetProcAddress("glNamedFramebufferTexture3DEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferRenderbufferEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, GLuint))wglGetProcAddress("glNamedFramebufferRenderbufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetNamedFramebufferAttachmentParameterivEXT) = (void(GLApi*)(GLuint, GLenum, GLenum, int*))wglGetProcAddress("glGetNamedFramebufferAttachmentParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenerateTextureMipmapEXT) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glGenerateTextureMipmapEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGenerateMultiTexMipmapEXT) = (void(GLApi*)(GLenum, GLenum))wglGetProcAddress("glGenerateMultiTexMipmapEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferDrawBufferEXT) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glFramebufferDrawBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferDrawBuffersEXT) = (void(GLApi*)(GLuint, GLsizei, const GLenum*))wglGetProcAddress("glFramebufferDrawBuffersEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFramebufferReadBufferEXT) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glFramebufferReadBufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetFramebufferParameterivEXT) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetFramebufferParameterivEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedCopyBufferSubDataEXT) = (void(GLApi*)(GLuint, GLuint, GLintptr, GLintptr, GLsizeiptr))wglGetProcAddress("glNamedCopyBufferSubDataEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferTextureEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, int))wglGetProcAddress("glNamedFramebufferTextureEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferTextureLayerEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, int, int))wglGetProcAddress("glNamedFramebufferTextureLayerEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glNamedFramebufferTextureFaceEXT) = (void(GLApi*)(GLuint, GLenum, GLuint, int, GLenum))wglGetProcAddress("glNamedFramebufferTextureFaceEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glTextureRenderbufferEXT) = (void(GLApi*)(GLuint, GLenum, GLuint))wglGetProcAddress("glTextureRenderbufferEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMultiTexRenderbufferEXT) = (void(GLApi*)(GLenum, GLenum, GLuint))wglGetProcAddress("glMultiTexRenderbufferEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayVertexOffsetEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayVertexOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayColorOffsetEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayColorOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayEdgeFlagOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayEdgeFlagOffsetEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayIndexOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayIndexOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayNormalOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayNormalOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayTexCoordOffsetEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayTexCoordOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayMultiTexCoordOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLenum, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayMultiTexCoordOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArrayFogCoordOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayFogCoordOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glVertexArraySecondaryColorOffsetEXT) = (void(GLApi*)(GLuint, GLuint, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArraySecondaryColorOffsetEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLuint, int, GLenum, GLboolean, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayVertexAttribOffsetEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glVertexArrayVertexAttribIOffsetEXT) = (void(GLApi*)(GLuint, GLuint, GLuint, int, GLenum, GLsizei, GLintptr))wglGetProcAddress("glVertexArrayVertexAttribIOffsetEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glEnableVertexArrayEXT) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glEnableVertexArrayEXT"))) ++ n_failed_functions;
	//if(!(GLFuncPtrName(glDisableVertexArrayEXT) = (void(GLApi*)(GLuint, GLenum))wglGetProcAddress("glDisableVertexArrayEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glEnableVertexArrayAttribEXT) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glEnableVertexArrayAttribEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glDisableVertexArrayAttribEXT) = (void(GLApi*)(GLuint, GLuint))wglGetProcAddress("glDisableVertexArrayAttribEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetVertexArrayIntegervEXT) = (void(GLApi*)(GLuint, GLenum, int*))wglGetProcAddress("glGetVertexArrayIntegervEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetVertexArrayPointervEXT) = (void(GLApi*)(GLuint, GLenum, void**))wglGetProcAddress("glGetVertexArrayPointervEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetVertexArrayIntegeri_vEXT) = (void(GLApi*)(GLuint, GLuint, GLenum, int*))wglGetProcAddress("glGetVertexArrayIntegeri_vEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glGetVertexArrayPointeri_vEXT) = (void(GLApi*)(GLuint, GLuint, GLenum, void**))wglGetProcAddress("glGetVertexArrayPointeri_vEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glMapNamedBufferRangeEXT) = (void*(GLApi*)(GLuint, GLintptr, GLsizeiptr, GLbitfield))wglGetProcAddress("glMapNamedBufferRangeEXT"))) ++ n_failed_functions;
	if(!(GLFuncPtrName(glFlushMappedNamedBufferRangeEXT) = (void(GLApi*)(GLuint, GLintptr, GLsizeiptr))wglGetProcAddress("glFlushMappedNamedBufferRangeEXT"))) ++ n_failed_functions;

#endif // __GENERATE_GL_EXT_direct_state_access

	GLEH_EXT_direct_state_access = !n_failed_functions && b_SupportedExtension("GL_EXT_direct_state_access");

	return n_failed_functions;
}

/*
 *								--- ~GL_EXT_direct_state_access ---
 */

/*
 *								=== ~CGL4ExtensionHandler ===
 */
