// Copyright (C) 2018-2025, Tellusim Technologies Inc. All rights reserved
// https://tellusim.com/

#include <core/TellusimLog.h>
#include <platform/TellusimContext.h>

#include "../include/TellusimGLES.h"

/*
 */
namespace Tellusim {
	
	/*
	 */
	namespace GLES {
		
		/*
		 */
		bool init() {
			
			// function address
			#define GET_ADDRESS(TYPE, NAME) { \
				NAME = (TYPE)GLESContext::getProcAddress(#NAME); \
				if(NAME == nullptr && is_core) { \
					TS_LOGF(Error, "GLES::init(): can't get %s function\n", #NAME); \
					return false; \
				} \
			}
			
			// core functions
			bool is_core = true;
			
			// OpenGLES 20 functions
			GET_ADDRESS(PFNGLACTIVETEXTUREPROC, glActiveTexture)
			GET_ADDRESS(PFNGLATTACHSHADERPROC, glAttachShader)
			GET_ADDRESS(PFNGLBINDATTRIBLOCATIONPROC, glBindAttribLocation)
			GET_ADDRESS(PFNGLBINDBUFFERPROC, glBindBuffer)
			GET_ADDRESS(PFNGLBINDFRAMEBUFFERPROC, glBindFramebuffer)
			GET_ADDRESS(PFNGLBINDRENDERBUFFERPROC, glBindRenderbuffer)
			GET_ADDRESS(PFNGLBINDTEXTUREPROC, glBindTexture)
			GET_ADDRESS(PFNGLBLENDCOLORPROC, glBlendColor)
			GET_ADDRESS(PFNGLBLENDEQUATIONPROC, glBlendEquation)
			GET_ADDRESS(PFNGLBLENDEQUATIONSEPARATEPROC, glBlendEquationSeparate)
			GET_ADDRESS(PFNGLBLENDFUNCPROC, glBlendFunc)
			GET_ADDRESS(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate)
			GET_ADDRESS(PFNGLBUFFERDATAPROC, glBufferData)
			GET_ADDRESS(PFNGLBUFFERSUBDATAPROC, glBufferSubData)
			GET_ADDRESS(PFNGLCHECKFRAMEBUFFERSTATUSPROC, glCheckFramebufferStatus)
			GET_ADDRESS(PFNGLCLEARPROC, glClear)
			GET_ADDRESS(PFNGLCLEARCOLORPROC, glClearColor)
			GET_ADDRESS(PFNGLCLEARDEPTHFPROC, glClearDepthf)
			GET_ADDRESS(PFNGLCLEARSTENCILPROC, glClearStencil)
			GET_ADDRESS(PFNGLCOLORMASKPROC, glColorMask)
			GET_ADDRESS(PFNGLCOMPILESHADERPROC, glCompileShader)
			GET_ADDRESS(PFNGLCOMPRESSEDTEXIMAGE2DPROC, glCompressedTexImage2D)
			GET_ADDRESS(PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2D)
			GET_ADDRESS(PFNGLCOPYTEXIMAGE2DPROC, glCopyTexImage2D)
			GET_ADDRESS(PFNGLCOPYTEXSUBIMAGE2DPROC, glCopyTexSubImage2D)
			GET_ADDRESS(PFNGLCREATEPROGRAMPROC, glCreateProgram)
			GET_ADDRESS(PFNGLCREATESHADERPROC, glCreateShader)
			GET_ADDRESS(PFNGLCULLFACEPROC, glCullFace)
			GET_ADDRESS(PFNGLDELETEBUFFERSPROC, glDeleteBuffers)
			GET_ADDRESS(PFNGLDELETEFRAMEBUFFERSPROC, glDeleteFramebuffers)
			GET_ADDRESS(PFNGLDELETEPROGRAMPROC, glDeleteProgram)
			GET_ADDRESS(PFNGLDELETERENDERBUFFERSPROC, glDeleteRenderbuffers)
			GET_ADDRESS(PFNGLDELETESHADERPROC, glDeleteShader)
			GET_ADDRESS(PFNGLDELETETEXTURESPROC, glDeleteTextures)
			GET_ADDRESS(PFNGLDEPTHFUNCPROC, glDepthFunc)
			GET_ADDRESS(PFNGLDEPTHMASKPROC, glDepthMask)
			GET_ADDRESS(PFNGLDEPTHRANGEFPROC, glDepthRangef)
			GET_ADDRESS(PFNGLDETACHSHADERPROC, glDetachShader)
			GET_ADDRESS(PFNGLDISABLEPROC, glDisable)
			GET_ADDRESS(PFNGLDISABLEVERTEXATTRIBARRAYPROC, glDisableVertexAttribArray)
			GET_ADDRESS(PFNGLDRAWARRAYSPROC, glDrawArrays)
			GET_ADDRESS(PFNGLDRAWELEMENTSPROC, glDrawElements)
			GET_ADDRESS(PFNGLENABLEPROC, glEnable)
			GET_ADDRESS(PFNGLENABLEVERTEXATTRIBARRAYPROC, glEnableVertexAttribArray)
			GET_ADDRESS(PFNGLFINISHPROC, glFinish)
			GET_ADDRESS(PFNGLFLUSHPROC, glFlush)
			GET_ADDRESS(PFNGLFRAMEBUFFERRENDERBUFFERPROC, glFramebufferRenderbuffer)
			GET_ADDRESS(PFNGLFRAMEBUFFERTEXTURE2DPROC, glFramebufferTexture2D)
			GET_ADDRESS(PFNGLFRONTFACEPROC, glFrontFace)
			GET_ADDRESS(PFNGLGENBUFFERSPROC, glGenBuffers)
			GET_ADDRESS(PFNGLGENERATEMIPMAPPROC, glGenerateMipmap)
			GET_ADDRESS(PFNGLGENFRAMEBUFFERSPROC, glGenFramebuffers)
			GET_ADDRESS(PFNGLGENRENDERBUFFERSPROC, glGenRenderbuffers)
			GET_ADDRESS(PFNGLGENTEXTURESPROC, glGenTextures)
			GET_ADDRESS(PFNGLGETACTIVEATTRIBPROC, glGetActiveAttrib)
			GET_ADDRESS(PFNGLGETACTIVEUNIFORMPROC, glGetActiveUniform)
			GET_ADDRESS(PFNGLGETATTACHEDSHADERSPROC, glGetAttachedShaders)
			GET_ADDRESS(PFNGLGETATTRIBLOCATIONPROC, glGetAttribLocation)
			GET_ADDRESS(PFNGLGETBOOLEANVPROC, glGetBooleanv)
			GET_ADDRESS(PFNGLGETBUFFERPARAMETERIVPROC, glGetBufferParameteriv)
			GET_ADDRESS(PFNGLGETERRORPROC, glGetError)
			GET_ADDRESS(PFNGLGETFLOATVPROC, glGetFloatv)
			GET_ADDRESS(PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC, glGetFramebufferAttachmentParameteriv)
			GET_ADDRESS(PFNGLGETINTEGERVPROC, glGetIntegerv)
			GET_ADDRESS(PFNGLGETPROGRAMIVPROC, glGetProgramiv)
			GET_ADDRESS(PFNGLGETPROGRAMINFOLOGPROC, glGetProgramInfoLog)
			GET_ADDRESS(PFNGLGETRENDERBUFFERPARAMETERIVPROC, glGetRenderbufferParameteriv)
			GET_ADDRESS(PFNGLGETSHADERIVPROC, glGetShaderiv)
			GET_ADDRESS(PFNGLGETSHADERINFOLOGPROC, glGetShaderInfoLog)
			GET_ADDRESS(PFNGLGETSHADERPRECISIONFORMATPROC, glGetShaderPrecisionFormat)
			GET_ADDRESS(PFNGLGETSHADERSOURCEPROC, glGetShaderSource)
			GET_ADDRESS(PFNGLGETSTRINGPROC, glGetString)
			GET_ADDRESS(PFNGLGETTEXPARAMETERFVPROC, glGetTexParameterfv)
			GET_ADDRESS(PFNGLGETTEXPARAMETERIVPROC, glGetTexParameteriv)
			GET_ADDRESS(PFNGLGETUNIFORMFVPROC, glGetUniformfv)
			GET_ADDRESS(PFNGLGETUNIFORMIVPROC, glGetUniformiv)
			GET_ADDRESS(PFNGLGETUNIFORMLOCATIONPROC, glGetUniformLocation)
			GET_ADDRESS(PFNGLGETVERTEXATTRIBFVPROC, glGetVertexAttribfv)
			GET_ADDRESS(PFNGLGETVERTEXATTRIBIVPROC, glGetVertexAttribiv)
			GET_ADDRESS(PFNGLGETVERTEXATTRIBPOINTERVPROC, glGetVertexAttribPointerv)
			GET_ADDRESS(PFNGLHINTPROC, glHint)
			GET_ADDRESS(PFNGLISBUFFERPROC, glIsBuffer)
			GET_ADDRESS(PFNGLISENABLEDPROC, glIsEnabled)
			GET_ADDRESS(PFNGLISFRAMEBUFFERPROC, glIsFramebuffer)
			GET_ADDRESS(PFNGLISPROGRAMPROC, glIsProgram)
			GET_ADDRESS(PFNGLISRENDERBUFFERPROC, glIsRenderbuffer)
			GET_ADDRESS(PFNGLISSHADERPROC, glIsShader)
			GET_ADDRESS(PFNGLISTEXTUREPROC, glIsTexture)
			GET_ADDRESS(PFNGLLINEWIDTHPROC, glLineWidth)
			GET_ADDRESS(PFNGLLINKPROGRAMPROC, glLinkProgram)
			GET_ADDRESS(PFNGLPIXELSTOREIPROC, glPixelStorei)
			GET_ADDRESS(PFNGLPOLYGONOFFSETPROC, glPolygonOffset)
			GET_ADDRESS(PFNGLREADPIXELSPROC, glReadPixels)
			GET_ADDRESS(PFNGLRELEASESHADERCOMPILERPROC, glReleaseShaderCompiler)
			GET_ADDRESS(PFNGLRENDERBUFFERSTORAGEPROC, glRenderbufferStorage)
			GET_ADDRESS(PFNGLSAMPLECOVERAGEPROC, glSampleCoverage)
			GET_ADDRESS(PFNGLSCISSORPROC, glScissor)
			GET_ADDRESS(PFNGLSHADERBINARYPROC, glShaderBinary)
			GET_ADDRESS(PFNGLSHADERSOURCEPROC, glShaderSource)
			GET_ADDRESS(PFNGLSTENCILFUNCPROC, glStencilFunc)
			GET_ADDRESS(PFNGLSTENCILFUNCSEPARATEPROC, glStencilFuncSeparate)
			GET_ADDRESS(PFNGLSTENCILMASKPROC, glStencilMask)
			GET_ADDRESS(PFNGLSTENCILMASKSEPARATEPROC, glStencilMaskSeparate)
			GET_ADDRESS(PFNGLSTENCILOPPROC, glStencilOp)
			GET_ADDRESS(PFNGLSTENCILOPSEPARATEPROC, glStencilOpSeparate)
			GET_ADDRESS(PFNGLTEXIMAGE2DPROC, glTexImage2D)
			GET_ADDRESS(PFNGLTEXPARAMETERFPROC, glTexParameterf)
			GET_ADDRESS(PFNGLTEXPARAMETERFVPROC, glTexParameterfv)
			GET_ADDRESS(PFNGLTEXPARAMETERIPROC, glTexParameteri)
			GET_ADDRESS(PFNGLTEXPARAMETERIVPROC, glTexParameteriv)
			GET_ADDRESS(PFNGLTEXSUBIMAGE2DPROC, glTexSubImage2D)
			GET_ADDRESS(PFNGLUNIFORM1FPROC, glUniform1f)
			GET_ADDRESS(PFNGLUNIFORM1FVPROC, glUniform1fv)
			GET_ADDRESS(PFNGLUNIFORM1IPROC, glUniform1i)
			GET_ADDRESS(PFNGLUNIFORM1IVPROC, glUniform1iv)
			GET_ADDRESS(PFNGLUNIFORM2FPROC, glUniform2f)
			GET_ADDRESS(PFNGLUNIFORM2FVPROC, glUniform2fv)
			GET_ADDRESS(PFNGLUNIFORM2IPROC, glUniform2i)
			GET_ADDRESS(PFNGLUNIFORM2IVPROC, glUniform2iv)
			GET_ADDRESS(PFNGLUNIFORM3FPROC, glUniform3f)
			GET_ADDRESS(PFNGLUNIFORM3FVPROC, glUniform3fv)
			GET_ADDRESS(PFNGLUNIFORM3IPROC, glUniform3i)
			GET_ADDRESS(PFNGLUNIFORM3IVPROC, glUniform3iv)
			GET_ADDRESS(PFNGLUNIFORM4FPROC, glUniform4f)
			GET_ADDRESS(PFNGLUNIFORM4FVPROC, glUniform4fv)
			GET_ADDRESS(PFNGLUNIFORM4IPROC, glUniform4i)
			GET_ADDRESS(PFNGLUNIFORM4IVPROC, glUniform4iv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX2FVPROC, glUniformMatrix2fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX3FVPROC, glUniformMatrix3fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX4FVPROC, glUniformMatrix4fv)
			GET_ADDRESS(PFNGLUSEPROGRAMPROC, glUseProgram)
			GET_ADDRESS(PFNGLVALIDATEPROGRAMPROC, glValidateProgram)
			GET_ADDRESS(PFNGLVERTEXATTRIB1FPROC, glVertexAttrib1f)
			GET_ADDRESS(PFNGLVERTEXATTRIB1FVPROC, glVertexAttrib1fv)
			GET_ADDRESS(PFNGLVERTEXATTRIB2FPROC, glVertexAttrib2f)
			GET_ADDRESS(PFNGLVERTEXATTRIB2FVPROC, glVertexAttrib2fv)
			GET_ADDRESS(PFNGLVERTEXATTRIB3FPROC, glVertexAttrib3f)
			GET_ADDRESS(PFNGLVERTEXATTRIB3FVPROC, glVertexAttrib3fv)
			GET_ADDRESS(PFNGLVERTEXATTRIB4FPROC, glVertexAttrib4f)
			GET_ADDRESS(PFNGLVERTEXATTRIB4FVPROC, glVertexAttrib4fv)
			GET_ADDRESS(PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer)
			GET_ADDRESS(PFNGLVIEWPORTPROC, glViewport)
			
			// OpenGLES 30 functions
			GET_ADDRESS(PFNGLREADBUFFERPROC, glReadBuffer)
			GET_ADDRESS(PFNGLDRAWRANGEELEMENTSPROC, glDrawRangeElements)
			GET_ADDRESS(PFNGLTEXIMAGE3DPROC, glTexImage3D)
			GET_ADDRESS(PFNGLTEXSUBIMAGE3DPROC, glTexSubImage3D)
			GET_ADDRESS(PFNGLCOPYTEXSUBIMAGE3DPROC, glCopyTexSubImage3D)
			GET_ADDRESS(PFNGLCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3D)
			GET_ADDRESS(PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3D)
			GET_ADDRESS(PFNGLGENQUERIESPROC, glGenQueries)
			GET_ADDRESS(PFNGLDELETEQUERIESPROC, glDeleteQueries)
			GET_ADDRESS(PFNGLISQUERYPROC, glIsQuery)
			GET_ADDRESS(PFNGLBEGINQUERYPROC, glBeginQuery)
			GET_ADDRESS(PFNGLENDQUERYPROC, glEndQuery)
			GET_ADDRESS(PFNGLGETQUERYIVPROC, glGetQueryiv)
			GET_ADDRESS(PFNGLGETQUERYOBJECTUIVPROC, glGetQueryObjectuiv)
			GET_ADDRESS(PFNGLUNMAPBUFFERPROC, glUnmapBuffer)
			GET_ADDRESS(PFNGLGETBUFFERPOINTERVPROC, glGetBufferPointerv)
			GET_ADDRESS(PFNGLDRAWBUFFERSPROC, glDrawBuffers)
			GET_ADDRESS(PFNGLUNIFORMMATRIX2X3FVPROC, glUniformMatrix2x3fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX3X2FVPROC, glUniformMatrix3x2fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX2X4FVPROC, glUniformMatrix2x4fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX4X2FVPROC, glUniformMatrix4x2fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX3X4FVPROC, glUniformMatrix3x4fv)
			GET_ADDRESS(PFNGLUNIFORMMATRIX4X3FVPROC, glUniformMatrix4x3fv)
			GET_ADDRESS(PFNGLBLITFRAMEBUFFERPROC, glBlitFramebuffer)
			GET_ADDRESS(PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC, glRenderbufferStorageMultisample)
			GET_ADDRESS(PFNGLFRAMEBUFFERTEXTURELAYERPROC, glFramebufferTextureLayer)
			GET_ADDRESS(PFNGLMAPBUFFERRANGEPROC, glMapBufferRange)
			GET_ADDRESS(PFNGLFLUSHMAPPEDBUFFERRANGEPROC, glFlushMappedBufferRange)
			GET_ADDRESS(PFNGLBINDVERTEXARRAYPROC, glBindVertexArray)
			GET_ADDRESS(PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays)
			GET_ADDRESS(PFNGLGENVERTEXARRAYSPROC, glGenVertexArrays)
			GET_ADDRESS(PFNGLISVERTEXARRAYPROC, glIsVertexArray)
			GET_ADDRESS(PFNGLGETINTEGERI_VPROC, glGetIntegeri_v)
			GET_ADDRESS(PFNGLBEGINTRANSFORMFEEDBACKPROC, glBeginTransformFeedback)
			GET_ADDRESS(PFNGLENDTRANSFORMFEEDBACKPROC, glEndTransformFeedback)
			GET_ADDRESS(PFNGLBINDBUFFERRANGEPROC, glBindBufferRange)
			GET_ADDRESS(PFNGLBINDBUFFERBASEPROC, glBindBufferBase)
			GET_ADDRESS(PFNGLTRANSFORMFEEDBACKVARYINGSPROC, glTransformFeedbackVaryings)
			GET_ADDRESS(PFNGLGETTRANSFORMFEEDBACKVARYINGPROC, glGetTransformFeedbackVarying)
			GET_ADDRESS(PFNGLVERTEXATTRIBIPOINTERPROC, glVertexAttribIPointer)
			GET_ADDRESS(PFNGLGETVERTEXATTRIBIIVPROC, glGetVertexAttribIiv)
			GET_ADDRESS(PFNGLGETVERTEXATTRIBIUIVPROC, glGetVertexAttribIuiv)
			GET_ADDRESS(PFNGLVERTEXATTRIBI4IPROC, glVertexAttribI4i)
			GET_ADDRESS(PFNGLVERTEXATTRIBI4UIPROC, glVertexAttribI4ui)
			GET_ADDRESS(PFNGLVERTEXATTRIBI4IVPROC, glVertexAttribI4iv)
			GET_ADDRESS(PFNGLVERTEXATTRIBI4UIVPROC, glVertexAttribI4uiv)
			GET_ADDRESS(PFNGLGETUNIFORMUIVPROC, glGetUniformuiv)
			GET_ADDRESS(PFNGLGETFRAGDATALOCATIONPROC, glGetFragDataLocation)
			GET_ADDRESS(PFNGLUNIFORM1UIPROC, glUniform1ui)
			GET_ADDRESS(PFNGLUNIFORM2UIPROC, glUniform2ui)
			GET_ADDRESS(PFNGLUNIFORM3UIPROC, glUniform3ui)
			GET_ADDRESS(PFNGLUNIFORM4UIPROC, glUniform4ui)
			GET_ADDRESS(PFNGLUNIFORM1UIVPROC, glUniform1uiv)
			GET_ADDRESS(PFNGLUNIFORM2UIVPROC, glUniform2uiv)
			GET_ADDRESS(PFNGLUNIFORM3UIVPROC, glUniform3uiv)
			GET_ADDRESS(PFNGLUNIFORM4UIVPROC, glUniform4uiv)
			GET_ADDRESS(PFNGLCLEARBUFFERIVPROC, glClearBufferiv)
			GET_ADDRESS(PFNGLCLEARBUFFERUIVPROC, glClearBufferuiv)
			GET_ADDRESS(PFNGLCLEARBUFFERFVPROC, glClearBufferfv)
			GET_ADDRESS(PFNGLCLEARBUFFERFIPROC, glClearBufferfi)
			GET_ADDRESS(PFNGLGETSTRINGIPROC, glGetStringi)
			GET_ADDRESS(PFNGLCOPYBUFFERSUBDATAPROC, glCopyBufferSubData)
			GET_ADDRESS(PFNGLGETUNIFORMINDICESPROC, glGetUniformIndices)
			GET_ADDRESS(PFNGLGETACTIVEUNIFORMSIVPROC, glGetActiveUniformsiv)
			GET_ADDRESS(PFNGLGETUNIFORMBLOCKINDEXPROC, glGetUniformBlockIndex)
			GET_ADDRESS(PFNGLGETACTIVEUNIFORMBLOCKIVPROC, glGetActiveUniformBlockiv)
			GET_ADDRESS(PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC, glGetActiveUniformBlockName)
			GET_ADDRESS(PFNGLUNIFORMBLOCKBINDINGPROC, glUniformBlockBinding)
			GET_ADDRESS(PFNGLDRAWARRAYSINSTANCEDPROC, glDrawArraysInstanced)
			GET_ADDRESS(PFNGLDRAWELEMENTSINSTANCEDPROC, glDrawElementsInstanced)
			GET_ADDRESS(PFNGLFENCESYNCPROC, glFenceSync)
			GET_ADDRESS(PFNGLISSYNCPROC, glIsSync)
			GET_ADDRESS(PFNGLDELETESYNCPROC, glDeleteSync)
			GET_ADDRESS(PFNGLCLIENTWAITSYNCPROC, glClientWaitSync)
			GET_ADDRESS(PFNGLWAITSYNCPROC, glWaitSync)
			GET_ADDRESS(PFNGLGETINTEGER64VPROC, glGetInteger64v)
			GET_ADDRESS(PFNGLGETSYNCIVPROC, glGetSynciv)
			GET_ADDRESS(PFNGLGETINTEGER64I_VPROC, glGetInteger64i_v)
			GET_ADDRESS(PFNGLGETBUFFERPARAMETERI64VPROC, glGetBufferParameteri64v)
			GET_ADDRESS(PFNGLGENSAMPLERSPROC, glGenSamplers)
			GET_ADDRESS(PFNGLDELETESAMPLERSPROC, glDeleteSamplers)
			GET_ADDRESS(PFNGLISSAMPLERPROC, glIsSampler)
			GET_ADDRESS(PFNGLBINDSAMPLERPROC, glBindSampler)
			GET_ADDRESS(PFNGLSAMPLERPARAMETERIPROC, glSamplerParameteri)
			GET_ADDRESS(PFNGLSAMPLERPARAMETERIVPROC, glSamplerParameteriv)
			GET_ADDRESS(PFNGLSAMPLERPARAMETERFPROC, glSamplerParameterf)
			GET_ADDRESS(PFNGLSAMPLERPARAMETERFVPROC, glSamplerParameterfv)
			GET_ADDRESS(PFNGLGETSAMPLERPARAMETERIVPROC, glGetSamplerParameteriv)
			GET_ADDRESS(PFNGLGETSAMPLERPARAMETERFVPROC, glGetSamplerParameterfv)
			GET_ADDRESS(PFNGLVERTEXATTRIBDIVISORPROC, glVertexAttribDivisor)
			GET_ADDRESS(PFNGLBINDTRANSFORMFEEDBACKPROC, glBindTransformFeedback)
			GET_ADDRESS(PFNGLDELETETRANSFORMFEEDBACKSPROC, glDeleteTransformFeedbacks)
			GET_ADDRESS(PFNGLGENTRANSFORMFEEDBACKSPROC, glGenTransformFeedbacks)
			GET_ADDRESS(PFNGLISTRANSFORMFEEDBACKPROC, glIsTransformFeedback)
			GET_ADDRESS(PFNGLPAUSETRANSFORMFEEDBACKPROC, glPauseTransformFeedback)
			GET_ADDRESS(PFNGLRESUMETRANSFORMFEEDBACKPROC, glResumeTransformFeedback)
			GET_ADDRESS(PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary)
			GET_ADDRESS(PFNGLPROGRAMBINARYPROC, glProgramBinary)
			GET_ADDRESS(PFNGLPROGRAMPARAMETERIPROC, glProgramParameteri)
			GET_ADDRESS(PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer)
			GET_ADDRESS(PFNGLINVALIDATESUBFRAMEBUFFERPROC, glInvalidateSubFramebuffer)
			GET_ADDRESS(PFNGLTEXSTORAGE2DPROC, glTexStorage2D)
			GET_ADDRESS(PFNGLTEXSTORAGE3DPROC, glTexStorage3D)
			GET_ADDRESS(PFNGLGETINTERNALFORMATIVPROC, glGetInternalformativ)
			
			// OpenGLES extensions
			is_core = false;
			
			// OpenGLES 31 functions
			GET_ADDRESS(PFNGLDISPATCHCOMPUTEPROC, glDispatchCompute)
			GET_ADDRESS(PFNGLDISPATCHCOMPUTEINDIRECTPROC, glDispatchComputeIndirect)
			GET_ADDRESS(PFNGLDRAWARRAYSINDIRECTPROC, glDrawArraysIndirect)
			GET_ADDRESS(PFNGLDRAWELEMENTSINDIRECTPROC, glDrawElementsIndirect)
			GET_ADDRESS(PFNGLFRAMEBUFFERPARAMETERIPROC, glFramebufferParameteri)
			GET_ADDRESS(PFNGLGETFRAMEBUFFERPARAMETERIVPROC, glGetFramebufferParameteriv)
			GET_ADDRESS(PFNGLGETPROGRAMINTERFACEIVPROC, glGetProgramInterfaceiv)
			GET_ADDRESS(PFNGLGETPROGRAMRESOURCEINDEXPROC, glGetProgramResourceIndex)
			GET_ADDRESS(PFNGLGETPROGRAMRESOURCENAMEPROC, glGetProgramResourceName)
			GET_ADDRESS(PFNGLGETPROGRAMRESOURCEIVPROC, glGetProgramResourceiv)
			GET_ADDRESS(PFNGLGETPROGRAMRESOURCELOCATIONPROC, glGetProgramResourceLocation)
			GET_ADDRESS(PFNGLUSEPROGRAMSTAGESPROC, glUseProgramStages)
			GET_ADDRESS(PFNGLACTIVESHADERPROGRAMPROC, glActiveShaderProgram)
			GET_ADDRESS(PFNGLCREATESHADERPROGRAMVPROC, glCreateShaderProgramv)
			GET_ADDRESS(PFNGLBINDPROGRAMPIPELINEPROC, glBindProgramPipeline)
			GET_ADDRESS(PFNGLDELETEPROGRAMPIPELINESPROC, glDeleteProgramPipelines)
			GET_ADDRESS(PFNGLGENPROGRAMPIPELINESPROC, glGenProgramPipelines)
			GET_ADDRESS(PFNGLISPROGRAMPIPELINEPROC, glIsProgramPipeline)
			GET_ADDRESS(PFNGLGETPROGRAMPIPELINEIVPROC, glGetProgramPipelineiv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM1IPROC, glProgramUniform1i)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM2IPROC, glProgramUniform2i)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM3IPROC, glProgramUniform3i)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM4IPROC, glProgramUniform4i)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM1UIPROC, glProgramUniform1ui)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM2UIPROC, glProgramUniform2ui)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM3UIPROC, glProgramUniform3ui)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM4UIPROC, glProgramUniform4ui)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM1FPROC, glProgramUniform1f)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM2FPROC, glProgramUniform2f)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM3FPROC, glProgramUniform3f)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM4FPROC, glProgramUniform4f)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM1IVPROC, glProgramUniform1iv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM2IVPROC, glProgramUniform2iv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM3IVPROC, glProgramUniform3iv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM4IVPROC, glProgramUniform4iv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM1UIVPROC, glProgramUniform1uiv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM2UIVPROC, glProgramUniform2uiv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM3UIVPROC, glProgramUniform3uiv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM4UIVPROC, glProgramUniform4uiv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM1FVPROC, glProgramUniform1fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM2FVPROC, glProgramUniform2fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM3FVPROC, glProgramUniform3fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORM4FVPROC, glProgramUniform4fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX2FVPROC, glProgramUniformMatrix2fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX3FVPROC, glProgramUniformMatrix3fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX4FVPROC, glProgramUniformMatrix4fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC, glProgramUniformMatrix2x3fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC, glProgramUniformMatrix3x2fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC, glProgramUniformMatrix2x4fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC, glProgramUniformMatrix4x2fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC, glProgramUniformMatrix3x4fv)
			GET_ADDRESS(PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC, glProgramUniformMatrix4x3fv)
			GET_ADDRESS(PFNGLVALIDATEPROGRAMPIPELINEPROC, glValidateProgramPipeline)
			GET_ADDRESS(PFNGLGETPROGRAMPIPELINEINFOLOGPROC, glGetProgramPipelineInfoLog)
			GET_ADDRESS(PFNGLBINDIMAGETEXTUREPROC, glBindImageTexture)
			GET_ADDRESS(PFNGLGETBOOLEANI_VPROC, glGetBooleani_v)
			GET_ADDRESS(PFNGLMEMORYBARRIERPROC, glMemoryBarrier)
			GET_ADDRESS(PFNGLMEMORYBARRIERBYREGIONPROC, glMemoryBarrierByRegion)
			GET_ADDRESS(PFNGLTEXSTORAGE2DMULTISAMPLEPROC, glTexStorage2DMultisample)
			GET_ADDRESS(PFNGLGETMULTISAMPLEFVPROC, glGetMultisamplefv)
			GET_ADDRESS(PFNGLSAMPLEMASKIPROC, glSampleMaski)
			GET_ADDRESS(PFNGLGETTEXLEVELPARAMETERIVPROC, glGetTexLevelParameteriv)
			GET_ADDRESS(PFNGLGETTEXLEVELPARAMETERFVPROC, glGetTexLevelParameterfv)
			GET_ADDRESS(PFNGLBINDVERTEXBUFFERPROC, glBindVertexBuffer)
			GET_ADDRESS(PFNGLVERTEXATTRIBFORMATPROC, glVertexAttribFormat)
			GET_ADDRESS(PFNGLVERTEXATTRIBIFORMATPROC, glVertexAttribIFormat)
			GET_ADDRESS(PFNGLVERTEXATTRIBBINDINGPROC, glVertexAttribBinding)
			GET_ADDRESS(PFNGLVERTEXBINDINGDIVISORPROC, glVertexBindingDivisor)
			
			// OpenGLES 32 functions
			GET_ADDRESS(PFNGLBLENDBARRIERPROC, glBlendBarrier)
			GET_ADDRESS(PFNGLCOPYIMAGESUBDATAPROC, glCopyImageSubData)
			GET_ADDRESS(PFNGLDEBUGMESSAGECONTROLPROC, glDebugMessageControl)
			GET_ADDRESS(PFNGLDEBUGMESSAGEINSERTPROC, glDebugMessageInsert)
			GET_ADDRESS(PFNGLDEBUGMESSAGECALLBACKPROC, glDebugMessageCallback)
			GET_ADDRESS(PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMessageLog)
			GET_ADDRESS(PFNGLPUSHDEBUGGROUPPROC, glPushDebugGroup)
			GET_ADDRESS(PFNGLPOPDEBUGGROUPPROC, glPopDebugGroup)
			GET_ADDRESS(PFNGLOBJECTLABELPROC, glObjectLabel)
			GET_ADDRESS(PFNGLGETOBJECTLABELPROC, glGetObjectLabel)
			GET_ADDRESS(PFNGLOBJECTPTRLABELPROC, glObjectPtrLabel)
			GET_ADDRESS(PFNGLGETOBJECTPTRLABELPROC, glGetObjectPtrLabel)
			GET_ADDRESS(PFNGLGETPOINTERVPROC, glGetPointerv)
			GET_ADDRESS(PFNGLENABLEIPROC, glEnablei)
			GET_ADDRESS(PFNGLDISABLEIPROC, glDisablei)
			GET_ADDRESS(PFNGLBLENDEQUATIONIPROC, glBlendEquationi)
			GET_ADDRESS(PFNGLBLENDEQUATIONSEPARATEIPROC, glBlendEquationSeparatei)
			GET_ADDRESS(PFNGLBLENDFUNCIPROC, glBlendFunci)
			GET_ADDRESS(PFNGLBLENDFUNCSEPARATEIPROC, glBlendFuncSeparatei)
			GET_ADDRESS(PFNGLCOLORMASKIPROC, glColorMaski)
			GET_ADDRESS(PFNGLISENABLEDIPROC, glIsEnabledi)
			GET_ADDRESS(PFNGLDRAWELEMENTSBASEVERTEXPROC, glDrawElementsBaseVertex)
			GET_ADDRESS(PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC, glDrawRangeElementsBaseVertex)
			GET_ADDRESS(PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC, glDrawElementsInstancedBaseVertex)
			GET_ADDRESS(PFNGLFRAMEBUFFERTEXTUREPROC, glFramebufferTexture)
			GET_ADDRESS(PFNGLPRIMITIVEBOUNDINGBOXPROC, glPrimitiveBoundingBox)
			GET_ADDRESS(PFNGLGETGRAPHICSRESETSTATUSPROC, glGetGraphicsResetStatus)
			GET_ADDRESS(PFNGLREADNPIXELSPROC, glReadnPixels)
			GET_ADDRESS(PFNGLGETNUNIFORMFVPROC, glGetnUniformfv)
			GET_ADDRESS(PFNGLGETNUNIFORMIVPROC, glGetnUniformiv)
			GET_ADDRESS(PFNGLGETNUNIFORMUIVPROC, glGetnUniformuiv)
			GET_ADDRESS(PFNGLMINSAMPLESHADINGPROC, glMinSampleShading)
			GET_ADDRESS(PFNGLPATCHPARAMETERIPROC, glPatchParameteri)
			GET_ADDRESS(PFNGLTEXPARAMETERIIVPROC, glTexParameterIiv)
			GET_ADDRESS(PFNGLTEXPARAMETERIUIVPROC, glTexParameterIuiv)
			GET_ADDRESS(PFNGLGETTEXPARAMETERIIVPROC, glGetTexParameterIiv)
			GET_ADDRESS(PFNGLGETTEXPARAMETERIUIVPROC, glGetTexParameterIuiv)
			GET_ADDRESS(PFNGLSAMPLERPARAMETERIIVPROC, glSamplerParameterIiv)
			GET_ADDRESS(PFNGLSAMPLERPARAMETERIUIVPROC, glSamplerParameterIuiv)
			GET_ADDRESS(PFNGLGETSAMPLERPARAMETERIIVPROC, glGetSamplerParameterIiv)
			GET_ADDRESS(PFNGLGETSAMPLERPARAMETERIUIVPROC, glGetSamplerParameterIuiv)
			GET_ADDRESS(PFNGLTEXBUFFERPROC, glTexBuffer)
			GET_ADDRESS(PFNGLTEXBUFFERRANGEPROC, glTexBufferRange)
			GET_ADDRESS(PFNGLTEXSTORAGE3DMULTISAMPLEPROC, glTexStorage3DMultisample)
			
			// EXT buffer storage
			GET_ADDRESS(PFNGLBUFFERSTORAGEEXTPROC, glBufferStorageEXT)
			
			// EXT clear texture
			GET_ADDRESS(PFNGLCLEARTEXIMAGEEXTPROC, glClearTexImageEXT)
			GET_ADDRESS(PFNGLCLEARTEXSUBIMAGEEXTPROC, glClearTexSubImageEXT)
			
			// EXT texture view
			GET_ADDRESS(PFNGLTEXTUREVIEWEXTPROC, glTextureViewEXT)
			
			// EXT clip control
			GET_ADDRESS(PFNGLCLIPCONTROLEXTPROC, glClipControlEXT)
			
			// EXT disjoint timer query
			GET_ADDRESS(PFNGLGENQUERIESEXTPROC, glGenQueriesEXT)
			GET_ADDRESS(PFNGLDELETEQUERIESEXTPROC, glDeleteQueriesEXT)
			GET_ADDRESS(PFNGLISQUERYEXTPROC, glIsQueryEXT)
			GET_ADDRESS(PFNGLBEGINQUERYEXTPROC, glBeginQueryEXT)
			GET_ADDRESS(PFNGLENDQUERYEXTPROC, glEndQueryEXT)
			GET_ADDRESS(PFNGLQUERYCOUNTEREXTPROC, glQueryCounterEXT)
			GET_ADDRESS(PFNGLGETQUERYIVEXTPROC, glGetQueryivEXT)
			GET_ADDRESS(PFNGLGETQUERYOBJECTIVEXTPROC, glGetQueryObjectivEXT)
			GET_ADDRESS(PFNGLGETQUERYOBJECTUIVEXTPROC, glGetQueryObjectuivEXT)
			GET_ADDRESS(PFNGLGETQUERYOBJECTI64VEXTPROC, glGetQueryObjecti64vEXT)
			GET_ADDRESS(PFNGLGETQUERYOBJECTUI64VEXTPROC, glGetQueryObjectui64vEXT)
			
			// OES viewport array
			GET_ADDRESS(PFNGLVIEWPORTARRAYVOESPROC, glViewportArrayvOES)
			GET_ADDRESS(PFNGLVIEWPORTINDEXEDFOESPROC, glViewportIndexedfOES)
			GET_ADDRESS(PFNGLVIEWPORTINDEXEDFVOESPROC, glViewportIndexedfvOES)
			GET_ADDRESS(PFNGLSCISSORARRAYVOESPROC, glScissorArrayvOES)
			GET_ADDRESS(PFNGLSCISSORINDEXEDOESPROC, glScissorIndexedOES)
			GET_ADDRESS(PFNGLSCISSORINDEXEDVOESPROC, glScissorIndexedvOES)
			GET_ADDRESS(PFNGLDEPTHRANGEARRAYFVOESPROC, glDepthRangeArrayfvOES)
			GET_ADDRESS(PFNGLDEPTHRANGEINDEXEDFOESPROC, glDepthRangeIndexedfOES)
			GET_ADDRESS(PFNGLGETFLOATI_VOESPROC, glGetFloati_vOES)
			
			return true;
		}
	}
	
	/*****************************************************************************\
	 *
	 * OpenGLES functions
	 *
	\*****************************************************************************/
	
	// OpenGLES 20 functions
	PFNGLACTIVETEXTUREPROC glActiveTexture = nullptr;
	PFNGLATTACHSHADERPROC glAttachShader = nullptr;
	PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation = nullptr;
	PFNGLBINDBUFFERPROC glBindBuffer = nullptr;
	PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = nullptr;
	PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = nullptr;
	PFNGLBINDTEXTUREPROC glBindTexture = nullptr;
	PFNGLBLENDCOLORPROC glBlendColor = nullptr;
	PFNGLBLENDEQUATIONPROC glBlendEquation = nullptr;
	PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate = nullptr;
	PFNGLBLENDFUNCPROC glBlendFunc = nullptr;
	PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate = nullptr;
	PFNGLBUFFERDATAPROC glBufferData = nullptr;
	PFNGLBUFFERSUBDATAPROC glBufferSubData = nullptr;
	PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = nullptr;
	PFNGLCLEARPROC glClear = nullptr;
	PFNGLCLEARCOLORPROC glClearColor = nullptr;
	PFNGLCLEARDEPTHFPROC glClearDepthf = nullptr;
	PFNGLCLEARSTENCILPROC glClearStencil = nullptr;
	PFNGLCOLORMASKPROC glColorMask = nullptr;
	PFNGLCOMPILESHADERPROC glCompileShader = nullptr;
	PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D = nullptr;
	PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D = nullptr;
	PFNGLCOPYTEXIMAGE2DPROC glCopyTexImage2D = nullptr;
	PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D = nullptr;
	PFNGLCREATEPROGRAMPROC glCreateProgram = nullptr;
	PFNGLCREATESHADERPROC glCreateShader = nullptr;
	PFNGLCULLFACEPROC glCullFace = nullptr;
	PFNGLDELETEBUFFERSPROC glDeleteBuffers = nullptr;
	PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = nullptr;
	PFNGLDELETEPROGRAMPROC glDeleteProgram = nullptr;
	PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = nullptr;
	PFNGLDELETESHADERPROC glDeleteShader = nullptr;
	PFNGLDELETETEXTURESPROC glDeleteTextures = nullptr;
	PFNGLDEPTHFUNCPROC glDepthFunc = nullptr;
	PFNGLDEPTHMASKPROC glDepthMask = nullptr;
	PFNGLDEPTHRANGEFPROC glDepthRangef = nullptr;
	PFNGLDETACHSHADERPROC glDetachShader = nullptr;
	PFNGLDISABLEPROC glDisable = nullptr;
	PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray = nullptr;
	PFNGLDRAWARRAYSPROC glDrawArrays = nullptr;
	PFNGLDRAWELEMENTSPROC glDrawElements = nullptr;
	PFNGLENABLEPROC glEnable = nullptr;
	PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray = nullptr;
	PFNGLFINISHPROC glFinish = nullptr;
	PFNGLFLUSHPROC glFlush = nullptr;
	PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = nullptr;
	PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = nullptr;
	PFNGLFRONTFACEPROC glFrontFace = nullptr;
	PFNGLGENBUFFERSPROC glGenBuffers = nullptr;
	PFNGLGENERATEMIPMAPPROC glGenerateMipmap = nullptr;
	PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = nullptr;
	PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = nullptr;
	PFNGLGENTEXTURESPROC glGenTextures = nullptr;
	PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib = nullptr;
	PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform = nullptr;
	PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders = nullptr;
	PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation = nullptr;
	PFNGLGETBOOLEANVPROC glGetBooleanv = nullptr;
	PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv = nullptr;
	PFNGLGETERRORPROC glGetError = nullptr;
	PFNGLGETFLOATVPROC glGetFloatv = nullptr;
	PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv = nullptr;
	PFNGLGETINTEGERVPROC glGetIntegerv = nullptr;
	PFNGLGETPROGRAMIVPROC glGetProgramiv = nullptr;
	PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog = nullptr;
	PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv = nullptr;
	PFNGLGETSHADERIVPROC glGetShaderiv = nullptr;
	PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog = nullptr;
	PFNGLGETSHADERPRECISIONFORMATPROC glGetShaderPrecisionFormat = nullptr;
	PFNGLGETSHADERSOURCEPROC glGetShaderSource = nullptr;
	PFNGLGETSTRINGPROC glGetString = nullptr;
	PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv = nullptr;
	PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv = nullptr;
	PFNGLGETUNIFORMFVPROC glGetUniformfv = nullptr;
	PFNGLGETUNIFORMIVPROC glGetUniformiv = nullptr;
	PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation = nullptr;
	PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv = nullptr;
	PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv = nullptr;
	PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv = nullptr;
	PFNGLHINTPROC glHint = nullptr;
	PFNGLISBUFFERPROC glIsBuffer = nullptr;
	PFNGLISENABLEDPROC glIsEnabled = nullptr;
	PFNGLISFRAMEBUFFERPROC glIsFramebuffer = nullptr;
	PFNGLISPROGRAMPROC glIsProgram = nullptr;
	PFNGLISRENDERBUFFERPROC glIsRenderbuffer = nullptr;
	PFNGLISSHADERPROC glIsShader = nullptr;
	PFNGLISTEXTUREPROC glIsTexture = nullptr;
	PFNGLLINEWIDTHPROC glLineWidth = nullptr;
	PFNGLLINKPROGRAMPROC glLinkProgram = nullptr;
	PFNGLPIXELSTOREIPROC glPixelStorei = nullptr;
	PFNGLPOLYGONOFFSETPROC glPolygonOffset = nullptr;
	PFNGLREADPIXELSPROC glReadPixels = nullptr;
	PFNGLRELEASESHADERCOMPILERPROC glReleaseShaderCompiler = nullptr;
	PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = nullptr;
	PFNGLSAMPLECOVERAGEPROC glSampleCoverage = nullptr;
	PFNGLSCISSORPROC glScissor = nullptr;
	PFNGLSHADERBINARYPROC glShaderBinary = nullptr;
	PFNGLSHADERSOURCEPROC glShaderSource = nullptr;
	PFNGLSTENCILFUNCPROC glStencilFunc = nullptr;
	PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate = nullptr;
	PFNGLSTENCILMASKPROC glStencilMask = nullptr;
	PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate = nullptr;
	PFNGLSTENCILOPPROC glStencilOp = nullptr;
	PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate = nullptr;
	PFNGLTEXIMAGE2DPROC glTexImage2D = nullptr;
	PFNGLTEXPARAMETERFPROC glTexParameterf = nullptr;
	PFNGLTEXPARAMETERFVPROC glTexParameterfv = nullptr;
	PFNGLTEXPARAMETERIPROC glTexParameteri = nullptr;
	PFNGLTEXPARAMETERIVPROC glTexParameteriv = nullptr;
	PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D = nullptr;
	PFNGLUNIFORM1FPROC glUniform1f = nullptr;
	PFNGLUNIFORM1FVPROC glUniform1fv = nullptr;
	PFNGLUNIFORM1IPROC glUniform1i = nullptr;
	PFNGLUNIFORM1IVPROC glUniform1iv = nullptr;
	PFNGLUNIFORM2FPROC glUniform2f = nullptr;
	PFNGLUNIFORM2FVPROC glUniform2fv = nullptr;
	PFNGLUNIFORM2IPROC glUniform2i = nullptr;
	PFNGLUNIFORM2IVPROC glUniform2iv = nullptr;
	PFNGLUNIFORM3FPROC glUniform3f = nullptr;
	PFNGLUNIFORM3FVPROC glUniform3fv = nullptr;
	PFNGLUNIFORM3IPROC glUniform3i = nullptr;
	PFNGLUNIFORM3IVPROC glUniform3iv = nullptr;
	PFNGLUNIFORM4FPROC glUniform4f = nullptr;
	PFNGLUNIFORM4FVPROC glUniform4fv = nullptr;
	PFNGLUNIFORM4IPROC glUniform4i = nullptr;
	PFNGLUNIFORM4IVPROC glUniform4iv = nullptr;
	PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv = nullptr;
	PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv = nullptr;
	PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv = nullptr;
	PFNGLUSEPROGRAMPROC glUseProgram = nullptr;
	PFNGLVALIDATEPROGRAMPROC glValidateProgram = nullptr;
	PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f = nullptr;
	PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv = nullptr;
	PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f = nullptr;
	PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv = nullptr;
	PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f = nullptr;
	PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv = nullptr;
	PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f = nullptr;
	PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv = nullptr;
	PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer = nullptr;
	PFNGLVIEWPORTPROC glViewport = nullptr;
	
	// OpenGLES 30 functions
	PFNGLREADBUFFERPROC glReadBuffer = nullptr;
	PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = nullptr;
	PFNGLTEXIMAGE3DPROC glTexImage3D = nullptr;
	PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D = nullptr;
	PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D = nullptr;
	PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D = nullptr;
	PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D = nullptr;
	PFNGLGENQUERIESPROC glGenQueries = nullptr;
	PFNGLDELETEQUERIESPROC glDeleteQueries = nullptr;
	PFNGLISQUERYPROC glIsQuery = nullptr;
	PFNGLBEGINQUERYPROC glBeginQuery = nullptr;
	PFNGLENDQUERYPROC glEndQuery = nullptr;
	PFNGLGETQUERYIVPROC glGetQueryiv = nullptr;
	PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv = nullptr;
	PFNGLUNMAPBUFFERPROC glUnmapBuffer = nullptr;
	PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv = nullptr;
	PFNGLDRAWBUFFERSPROC glDrawBuffers = nullptr;
	PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv = nullptr;
	PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv = nullptr;
	PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv = nullptr;
	PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv = nullptr;
	PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv = nullptr;
	PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv = nullptr;
	PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer = nullptr;
	PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample = nullptr;
	PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer = nullptr;
	PFNGLMAPBUFFERRANGEPROC glMapBufferRange = nullptr;
	PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange = nullptr;
	PFNGLBINDVERTEXARRAYPROC glBindVertexArray = nullptr;
	PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays = nullptr;
	PFNGLGENVERTEXARRAYSPROC glGenVertexArrays = nullptr;
	PFNGLISVERTEXARRAYPROC glIsVertexArray = nullptr;
	PFNGLGETINTEGERI_VPROC glGetIntegeri_v = nullptr;
	PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback = nullptr;
	PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback = nullptr;
	PFNGLBINDBUFFERRANGEPROC glBindBufferRange = nullptr;
	PFNGLBINDBUFFERBASEPROC glBindBufferBase = nullptr;
	PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings = nullptr;
	PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying = nullptr;
	PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer = nullptr;
	PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv = nullptr;
	PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv = nullptr;
	PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i = nullptr;
	PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui = nullptr;
	PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv = nullptr;
	PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv = nullptr;
	PFNGLGETUNIFORMUIVPROC glGetUniformuiv = nullptr;
	PFNGLGETFRAGDATALOCATIONPROC glGetFragDataLocation = nullptr;
	PFNGLUNIFORM1UIPROC glUniform1ui = nullptr;
	PFNGLUNIFORM2UIPROC glUniform2ui = nullptr;
	PFNGLUNIFORM3UIPROC glUniform3ui = nullptr;
	PFNGLUNIFORM4UIPROC glUniform4ui = nullptr;
	PFNGLUNIFORM1UIVPROC glUniform1uiv = nullptr;
	PFNGLUNIFORM2UIVPROC glUniform2uiv = nullptr;
	PFNGLUNIFORM3UIVPROC glUniform3uiv = nullptr;
	PFNGLUNIFORM4UIVPROC glUniform4uiv = nullptr;
	PFNGLCLEARBUFFERIVPROC glClearBufferiv = nullptr;
	PFNGLCLEARBUFFERUIVPROC glClearBufferuiv = nullptr;
	PFNGLCLEARBUFFERFVPROC glClearBufferfv = nullptr;
	PFNGLCLEARBUFFERFIPROC glClearBufferfi = nullptr;
	PFNGLGETSTRINGIPROC glGetStringi = nullptr;
	PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData = nullptr;
	PFNGLGETUNIFORMINDICESPROC glGetUniformIndices = nullptr;
	PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv = nullptr;
	PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex = nullptr;
	PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv = nullptr;
	PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName = nullptr;
	PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding = nullptr;
	PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced = nullptr;
	PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced = nullptr;
	PFNGLFENCESYNCPROC glFenceSync = nullptr;
	PFNGLISSYNCPROC glIsSync = nullptr;
	PFNGLDELETESYNCPROC glDeleteSync = nullptr;
	PFNGLCLIENTWAITSYNCPROC glClientWaitSync = nullptr;
	PFNGLWAITSYNCPROC glWaitSync = nullptr;
	PFNGLGETINTEGER64VPROC glGetInteger64v = nullptr;
	PFNGLGETSYNCIVPROC glGetSynciv = nullptr;
	PFNGLGETINTEGER64I_VPROC glGetInteger64i_v = nullptr;
	PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v = nullptr;
	PFNGLGENSAMPLERSPROC glGenSamplers = nullptr;
	PFNGLDELETESAMPLERSPROC glDeleteSamplers = nullptr;
	PFNGLISSAMPLERPROC glIsSampler = nullptr;
	PFNGLBINDSAMPLERPROC glBindSampler = nullptr;
	PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri = nullptr;
	PFNGLSAMPLERPARAMETERIVPROC glSamplerParameteriv = nullptr;
	PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf = nullptr;
	PFNGLSAMPLERPARAMETERFVPROC glSamplerParameterfv = nullptr;
	PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv = nullptr;
	PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv = nullptr;
	PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor = nullptr;
	PFNGLBINDTRANSFORMFEEDBACKPROC glBindTransformFeedback = nullptr;
	PFNGLDELETETRANSFORMFEEDBACKSPROC glDeleteTransformFeedbacks = nullptr;
	PFNGLGENTRANSFORMFEEDBACKSPROC glGenTransformFeedbacks = nullptr;
	PFNGLISTRANSFORMFEEDBACKPROC glIsTransformFeedback = nullptr;
	PFNGLPAUSETRANSFORMFEEDBACKPROC glPauseTransformFeedback = nullptr;
	PFNGLRESUMETRANSFORMFEEDBACKPROC glResumeTransformFeedback = nullptr;
	PFNGLGETPROGRAMBINARYPROC glGetProgramBinary = nullptr;
	PFNGLPROGRAMBINARYPROC glProgramBinary = nullptr;
	PFNGLPROGRAMPARAMETERIPROC glProgramParameteri = nullptr;
	PFNGLINVALIDATEFRAMEBUFFERPROC glInvalidateFramebuffer = nullptr;
	PFNGLINVALIDATESUBFRAMEBUFFERPROC glInvalidateSubFramebuffer = nullptr;
	PFNGLTEXSTORAGE2DPROC glTexStorage2D = nullptr;
	PFNGLTEXSTORAGE3DPROC glTexStorage3D = nullptr;
	PFNGLGETINTERNALFORMATIVPROC glGetInternalformativ = nullptr;
	
	// OpenGLES 31 functions
	PFNGLDISPATCHCOMPUTEPROC glDispatchCompute = nullptr;
	PFNGLDISPATCHCOMPUTEINDIRECTPROC glDispatchComputeIndirect = nullptr;
	PFNGLDRAWARRAYSINDIRECTPROC glDrawArraysIndirect = nullptr;
	PFNGLDRAWELEMENTSINDIRECTPROC glDrawElementsIndirect = nullptr;
	PFNGLFRAMEBUFFERPARAMETERIPROC glFramebufferParameteri = nullptr;
	PFNGLGETFRAMEBUFFERPARAMETERIVPROC glGetFramebufferParameteriv = nullptr;
	PFNGLGETPROGRAMINTERFACEIVPROC glGetProgramInterfaceiv = nullptr;
	PFNGLGETPROGRAMRESOURCEINDEXPROC glGetProgramResourceIndex = nullptr;
	PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName = nullptr;
	PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv = nullptr;
	PFNGLGETPROGRAMRESOURCELOCATIONPROC glGetProgramResourceLocation = nullptr;
	PFNGLUSEPROGRAMSTAGESPROC glUseProgramStages = nullptr;
	PFNGLACTIVESHADERPROGRAMPROC glActiveShaderProgram = nullptr;
	PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv = nullptr;
	PFNGLBINDPROGRAMPIPELINEPROC glBindProgramPipeline = nullptr;
	PFNGLDELETEPROGRAMPIPELINESPROC glDeleteProgramPipelines = nullptr;
	PFNGLGENPROGRAMPIPELINESPROC glGenProgramPipelines = nullptr;
	PFNGLISPROGRAMPIPELINEPROC glIsProgramPipeline = nullptr;
	PFNGLGETPROGRAMPIPELINEIVPROC glGetProgramPipelineiv = nullptr;
	PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i = nullptr;
	PFNGLPROGRAMUNIFORM2IPROC glProgramUniform2i = nullptr;
	PFNGLPROGRAMUNIFORM3IPROC glProgramUniform3i = nullptr;
	PFNGLPROGRAMUNIFORM4IPROC glProgramUniform4i = nullptr;
	PFNGLPROGRAMUNIFORM1UIPROC glProgramUniform1ui = nullptr;
	PFNGLPROGRAMUNIFORM2UIPROC glProgramUniform2ui = nullptr;
	PFNGLPROGRAMUNIFORM3UIPROC glProgramUniform3ui = nullptr;
	PFNGLPROGRAMUNIFORM4UIPROC glProgramUniform4ui = nullptr;
	PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f = nullptr;
	PFNGLPROGRAMUNIFORM2FPROC glProgramUniform2f = nullptr;
	PFNGLPROGRAMUNIFORM3FPROC glProgramUniform3f = nullptr;
	PFNGLPROGRAMUNIFORM4FPROC glProgramUniform4f = nullptr;
	PFNGLPROGRAMUNIFORM1IVPROC glProgramUniform1iv = nullptr;
	PFNGLPROGRAMUNIFORM2IVPROC glProgramUniform2iv = nullptr;
	PFNGLPROGRAMUNIFORM3IVPROC glProgramUniform3iv = nullptr;
	PFNGLPROGRAMUNIFORM4IVPROC glProgramUniform4iv = nullptr;
	PFNGLPROGRAMUNIFORM1UIVPROC glProgramUniform1uiv = nullptr;
	PFNGLPROGRAMUNIFORM2UIVPROC glProgramUniform2uiv = nullptr;
	PFNGLPROGRAMUNIFORM3UIVPROC glProgramUniform3uiv = nullptr;
	PFNGLPROGRAMUNIFORM4UIVPROC glProgramUniform4uiv = nullptr;
	PFNGLPROGRAMUNIFORM1FVPROC glProgramUniform1fv = nullptr;
	PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv = nullptr;
	PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv = nullptr;
	PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX2FVPROC glProgramUniformMatrix2fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX3FVPROC glProgramUniformMatrix3fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glProgramUniformMatrix2x3fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glProgramUniformMatrix3x2fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glProgramUniformMatrix2x4fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glProgramUniformMatrix4x2fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glProgramUniformMatrix3x4fv = nullptr;
	PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glProgramUniformMatrix4x3fv = nullptr;
	PFNGLVALIDATEPROGRAMPIPELINEPROC glValidateProgramPipeline = nullptr;
	PFNGLGETPROGRAMPIPELINEINFOLOGPROC glGetProgramPipelineInfoLog = nullptr;
	PFNGLBINDIMAGETEXTUREPROC glBindImageTexture = nullptr;
	PFNGLGETBOOLEANI_VPROC glGetBooleani_v = nullptr;
	PFNGLMEMORYBARRIERPROC glMemoryBarrier = nullptr;
	PFNGLMEMORYBARRIERBYREGIONPROC glMemoryBarrierByRegion = nullptr;
	PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample = nullptr;
	PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv = nullptr;
	PFNGLSAMPLEMASKIPROC glSampleMaski = nullptr;
	PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv = nullptr;
	PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv = nullptr;
	PFNGLBINDVERTEXBUFFERPROC glBindVertexBuffer = nullptr;
	PFNGLVERTEXATTRIBFORMATPROC glVertexAttribFormat = nullptr;
	PFNGLVERTEXATTRIBIFORMATPROC glVertexAttribIFormat = nullptr;
	PFNGLVERTEXATTRIBBINDINGPROC glVertexAttribBinding = nullptr;
	PFNGLVERTEXBINDINGDIVISORPROC glVertexBindingDivisor = nullptr;
	
	// OpenGLES 32 functions
	PFNGLBLENDBARRIERPROC glBlendBarrier = nullptr;
	PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData = nullptr;
	PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl = nullptr;
	PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert = nullptr;
	PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback = nullptr;
	PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog = nullptr;
	PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup = nullptr;
	PFNGLPOPDEBUGGROUPPROC glPopDebugGroup = nullptr;
	PFNGLOBJECTLABELPROC glObjectLabel = nullptr;
	PFNGLGETOBJECTLABELPROC glGetObjectLabel = nullptr;
	PFNGLOBJECTPTRLABELPROC glObjectPtrLabel = nullptr;
	PFNGLGETOBJECTPTRLABELPROC glGetObjectPtrLabel = nullptr;
	PFNGLGETPOINTERVPROC glGetPointerv = nullptr;
	PFNGLENABLEIPROC glEnablei = nullptr;
	PFNGLDISABLEIPROC glDisablei = nullptr;
	PFNGLBLENDEQUATIONIPROC glBlendEquationi = nullptr;
	PFNGLBLENDEQUATIONSEPARATEIPROC glBlendEquationSeparatei = nullptr;
	PFNGLBLENDFUNCIPROC glBlendFunci = nullptr;
	PFNGLBLENDFUNCSEPARATEIPROC glBlendFuncSeparatei = nullptr;
	PFNGLCOLORMASKIPROC glColorMaski = nullptr;
	PFNGLISENABLEDIPROC glIsEnabledi = nullptr;
	PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex = nullptr;
	PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex = nullptr;
	PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex = nullptr;
	PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture = nullptr;
	PFNGLPRIMITIVEBOUNDINGBOXPROC glPrimitiveBoundingBox = nullptr;
	PFNGLGETGRAPHICSRESETSTATUSPROC glGetGraphicsResetStatus = nullptr;
	PFNGLREADNPIXELSPROC glReadnPixels = nullptr;
	PFNGLGETNUNIFORMFVPROC glGetnUniformfv = nullptr;
	PFNGLGETNUNIFORMIVPROC glGetnUniformiv = nullptr;
	PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv = nullptr;
	PFNGLMINSAMPLESHADINGPROC glMinSampleShading = nullptr;
	PFNGLPATCHPARAMETERIPROC glPatchParameteri = nullptr;
	PFNGLTEXPARAMETERIIVPROC glTexParameterIiv = nullptr;
	PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv = nullptr;
	PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv = nullptr;
	PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv = nullptr;
	PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv = nullptr;
	PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv = nullptr;
	PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv = nullptr;
	PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv = nullptr;
	PFNGLTEXBUFFERPROC glTexBuffer = nullptr;
	PFNGLTEXBUFFERRANGEPROC glTexBufferRange = nullptr;
	PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample = nullptr;
	
	// EXT buffer storage
	PFNGLBUFFERSTORAGEEXTPROC glBufferStorageEXT = nullptr;
	
	// EXT clear texture
	PFNGLCLEARTEXIMAGEEXTPROC glClearTexImageEXT = nullptr;
	PFNGLCLEARTEXSUBIMAGEEXTPROC glClearTexSubImageEXT = nullptr;
	
	// EXT texture view
	PFNGLTEXTUREVIEWEXTPROC glTextureViewEXT = nullptr;
	
	// EXT clip control
	PFNGLCLIPCONTROLEXTPROC glClipControlEXT = nullptr;
	
	// EXT disjoint timer query
	PFNGLGENQUERIESEXTPROC glGenQueriesEXT = nullptr;
	PFNGLDELETEQUERIESEXTPROC glDeleteQueriesEXT = nullptr;
	PFNGLISQUERYEXTPROC glIsQueryEXT = nullptr;
	PFNGLBEGINQUERYEXTPROC glBeginQueryEXT = nullptr;
	PFNGLENDQUERYEXTPROC glEndQueryEXT = nullptr;
	PFNGLQUERYCOUNTEREXTPROC glQueryCounterEXT = nullptr;
	PFNGLGETQUERYIVEXTPROC glGetQueryivEXT = nullptr;
	PFNGLGETQUERYOBJECTIVEXTPROC glGetQueryObjectivEXT = nullptr;
	PFNGLGETQUERYOBJECTUIVEXTPROC glGetQueryObjectuivEXT = nullptr;
	PFNGLGETQUERYOBJECTI64VEXTPROC glGetQueryObjecti64vEXT = nullptr;
	PFNGLGETQUERYOBJECTUI64VEXTPROC glGetQueryObjectui64vEXT = nullptr;
	
	// OES viewport array
	PFNGLVIEWPORTARRAYVOESPROC glViewportArrayvOES = nullptr;
	PFNGLVIEWPORTINDEXEDFOESPROC glViewportIndexedfOES = nullptr;
	PFNGLVIEWPORTINDEXEDFVOESPROC glViewportIndexedfvOES = nullptr;
	PFNGLSCISSORARRAYVOESPROC glScissorArrayvOES = nullptr;
	PFNGLSCISSORINDEXEDOESPROC glScissorIndexedOES = nullptr;
	PFNGLSCISSORINDEXEDVOESPROC glScissorIndexedvOES = nullptr;
	PFNGLDEPTHRANGEARRAYFVOESPROC glDepthRangeArrayfvOES = nullptr;
	PFNGLDEPTHRANGEINDEXEDFOESPROC glDepthRangeIndexedfOES = nullptr;
	PFNGLGETFLOATI_VOESPROC glGetFloati_vOES = nullptr;
}
