#ifdef __LIBRETRO__
#include <glsm/glsmsym.h>
#define NO_GL_WRAP 1
#endif
#include <glsm/glsmsym.h>

#include "GLFunctions.h"

#define ASSIGN_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) r##proc_name

#if defined(GL_USE_DLSYM)
// Use dlsym() to load GL symbols from the default shared object search order
#define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) dlsym(RTLD_DEFAULT, "gl"#proc_name)
#else
// Use libretro API to load GL/EGL symbols
extern "C" void* glsm_get_proc_address(const char*);
#define glGetProcAddress glsm_get_proc_address
#define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) glGetProcAddress(#proc_name)
#define GL_GET_PROC_ADR_EGL(proc_type, proc_name) g_##proc_name = (proc_type) glGetProcAddress(#proc_name)
#endif

//GL Fucntions

PFNGLBLENDFUNCPROC g_glBlendFunc;
PFNGLBLENDFUNCSEPARATEPROC g_glBlendFuncSeparate;
PFNGLPIXELSTOREIPROC g_glPixelStorei;
PFNGLCLEARCOLORPROC g_glClearColor;
PFNGLCULLFACEPROC g_glCullFace;
PFNGLDEPTHFUNCPROC g_glDepthFunc;
PFNGLDEPTHMASKPROC g_glDepthMask;
PFNGLDISABLEPROC g_glDisable;
PFNGLENABLEPROC g_glEnable;
PFNGLPOLYGONOFFSETPROC g_glPolygonOffset;
PFNGLSCISSORPROC g_glScissor;
PFNGLVIEWPORTPROC g_glViewport;
PFNGLBINDTEXTUREPROC g_glBindTexture;
PFNGLTEXIMAGE2DPROC g_glTexImage2D;
PFNGLTEXPARAMETERIPROC g_glTexParameteri;
PFNGLGETINTEGERVPROC g_glGetIntegerv;
PFNGLGETSTRINGPROC g_glGetString;
PFNGLREADPIXELSPROC g_glReadPixels;
PFNGLTEXSUBIMAGE2DPROC g_glTexSubImage2D;
PFNGLDRAWARRAYSPROC g_glDrawArrays;
PFNGLGETERRORPROC g_glGetError;
PFNGLDRAWELEMENTSPROC g_glDrawElements;
PFNGLLINEWIDTHPROC g_glLineWidth;
PFNGLCLEARPROC g_glClear;
PFNGLGETFLOATVPROC g_glGetFloatv;
PFNGLDELETETEXTURESPROC g_glDeleteTextures;
PFNGLGENTEXTURESPROC g_glGenTextures;
PFNGLTEXPARAMETERFPROC g_glTexParameterf;
PFNGLACTIVETEXTUREPROC g_glActiveTexture;
PFNGLBLENDCOLORPROC g_glBlendColor;
PFNGLREADBUFFERPROC g_glReadBuffer;
PFNGLFINISHPROC g_glFinish;
#if defined(OS_ANDROID)
PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC g_eglGetNativeClientBufferANDROID;
#endif

PFNGLCREATESHADERPROC g_glCreateShader;
PFNGLCOMPILESHADERPROC g_glCompileShader;
PFNGLSHADERSOURCEPROC g_glShaderSource;
PFNGLCREATEPROGRAMPROC g_glCreateProgram;
PFNGLATTACHSHADERPROC g_glAttachShader;
PFNGLLINKPROGRAMPROC g_glLinkProgram;
PFNGLUSEPROGRAMPROC g_glUseProgram;
PFNGLGETUNIFORMLOCATIONPROC g_glGetUniformLocation;
PFNGLUNIFORM1IPROC g_glUniform1i;
PFNGLUNIFORM1FPROC g_glUniform1f;
PFNGLUNIFORM2FPROC g_glUniform2f;
PFNGLUNIFORM2IPROC g_glUniform2i;
PFNGLUNIFORM4IPROC g_glUniform4i;
PFNGLUNIFORM4FPROC g_glUniform4f;
PFNGLUNIFORM3FVPROC g_glUniform3fv;
PFNGLUNIFORM4FVPROC g_glUniform4fv;
PFNGLDETACHSHADERPROC g_glDetachShader;
PFNGLDELETESHADERPROC g_glDeleteShader;
PFNGLDELETEPROGRAMPROC g_glDeleteProgram;
PFNGLGETPROGRAMINFOLOGPROC g_glGetProgramInfoLog;
PFNGLGETSHADERINFOLOGPROC g_glGetShaderInfoLog;
PFNGLGETSHADERIVPROC g_glGetShaderiv;
PFNGLGETPROGRAMIVPROC g_glGetProgramiv;

PFNGLENABLEVERTEXATTRIBARRAYPROC g_glEnableVertexAttribArray;
PFNGLDISABLEVERTEXATTRIBARRAYPROC g_glDisableVertexAttribArray;
PFNGLVERTEXATTRIBPOINTERPROC g_glVertexAttribPointer;
PFNGLBINDATTRIBLOCATIONPROC g_glBindAttribLocation;
PFNGLVERTEXATTRIB1FPROC g_glVertexAttrib1f;
PFNGLVERTEXATTRIB4FPROC g_glVertexAttrib4f;
PFNGLVERTEXATTRIB4FVPROC g_glVertexAttrib4fv;

// multitexture functions
PFNGLDEPTHRANGEFPROC g_glDepthRangef;
PFNGLCLEARDEPTHFPROC g_glClearDepthf;

PFNGLDRAWBUFFERSPROC g_glDrawBuffers;
PFNGLBINDFRAMEBUFFERPROC g_glBindFramebuffer;
PFNGLDELETEFRAMEBUFFERSPROC g_glDeleteFramebuffers;
PFNGLGENFRAMEBUFFERSPROC g_glGenFramebuffers;
PFNGLFRAMEBUFFERTEXTURE2DPROC g_glFramebufferTexture2D;
PFNGLTEXIMAGE2DMULTISAMPLEPROC g_glTexImage2DMultisample;
PFNGLTEXSTORAGE2DMULTISAMPLEPROC g_glTexStorage2DMultisample;
PFNGLGENRENDERBUFFERSPROC g_glGenRenderbuffers;
PFNGLBINDRENDERBUFFERPROC g_glBindRenderbuffer;
PFNGLRENDERBUFFERSTORAGEPROC g_glRenderbufferStorage;
PFNGLFRAMEBUFFERRENDERBUFFERPROC g_glFramebufferRenderbuffer;
PFNGLDELETERENDERBUFFERSPROC g_glDeleteRenderbuffers;
PFNGLCHECKFRAMEBUFFERSTATUSPROC g_glCheckFramebufferStatus;
PFNGLBLITFRAMEBUFFERPROC g_glBlitFramebuffer;
PFNGLGENVERTEXARRAYSPROC g_glGenVertexArrays;
PFNGLBINDVERTEXARRAYPROC g_glBindVertexArray;
PFNGLDELETEVERTEXARRAYSPROC g_glDeleteVertexArrays;
PFNGLGENBUFFERSPROC g_glGenBuffers;
PFNGLBINDBUFFERPROC g_glBindBuffer;
PFNGLBUFFERDATAPROC g_glBufferData;
PFNGLMAPBUFFERPROC g_glMapBuffer;
PFNGLMAPBUFFERRANGEPROC g_glMapBufferRange;
PFNGLUNMAPBUFFERPROC g_glUnmapBuffer;
PFNGLDELETEBUFFERSPROC g_glDeleteBuffers;
PFNGLBINDIMAGETEXTUREPROC g_glBindImageTexture;
PFNGLMEMORYBARRIERPROC g_glMemoryBarrier;
PFNGLGETSTRINGIPROC g_glGetStringi;
PFNGLINVALIDATEFRAMEBUFFERPROC g_glInvalidateFramebuffer;
PFNGLBUFFERSTORAGEPROC g_glBufferStorage;
PFNGLFENCESYNCPROC g_glFenceSync;
PFNGLCLIENTWAITSYNCPROC g_glClientWaitSync;
PFNGLDELETESYNCPROC g_glDeleteSync;

PFNGLGETUNIFORMBLOCKINDEXPROC g_glGetUniformBlockIndex;
PFNGLUNIFORMBLOCKBINDINGPROC g_glUniformBlockBinding;
PFNGLGETACTIVEUNIFORMBLOCKIVPROC g_glGetActiveUniformBlockiv;
PFNGLGETUNIFORMINDICESPROC g_glGetUniformIndices;
PFNGLGETACTIVEUNIFORMSIVPROC g_glGetActiveUniformsiv;
PFNGLBINDBUFFERBASEPROC g_glBindBufferBase;
PFNGLBUFFERSUBDATAPROC g_glBufferSubData;

PFNGLGETPROGRAMBINARYPROC g_glGetProgramBinary;
PFNGLPROGRAMBINARYPROC g_glProgramBinary;
PFNGLPROGRAMPARAMETERIPROC g_glProgramParameteri;

PFNGLTEXSTORAGE2DPROC g_glTexStorage2D;
PFNGLTEXTURESTORAGE2DPROC g_glTextureStorage2D;
PFNGLTEXTURESUBIMAGE2DPROC g_glTextureSubImage2D;
PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC g_glTextureStorage2DMultisample;
PFNGLTEXTUREPARAMETERIPROC g_glTextureParameteri;
PFNGLTEXTUREPARAMETERFPROC g_glTextureParameterf;
PFNGLCREATETEXTURESPROC g_glCreateTextures;
PFNGLCREATEBUFFERSPROC g_glCreateBuffers;
PFNGLCREATEFRAMEBUFFERSPROC g_glCreateFramebuffers;
PFNGLNAMEDFRAMEBUFFERTEXTUREPROC g_glNamedFramebufferTexture;
PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC g_glDrawRangeElementsBaseVertex;
PFNGLFLUSHMAPPEDBUFFERRANGEPROC g_glFlushMappedBufferRange;
PFNGLTEXTUREBARRIERPROC g_glTextureBarrier;
PFNGLTEXTUREBARRIERNVPROC g_glTextureBarrierNV;
PFNGLCLEARBUFFERFVPROC g_glClearBufferfv;
PFNGLENABLEIPROC g_glEnablei;
PFNGLDISABLEIPROC g_glDisablei;
PFNGLEGLIMAGETARGETTEXTURE2DOESPROC g_glEGLImageTargetTexture2DOES;

void initGLFunctions()
{
#ifdef VC
	void *gles2so = dlopen("/opt/vc/lib/libbrcmGLESv2.so", RTLD_NOW);
#elif defined(ODROID)
	void *gles2so = dlopen("/usr/lib/arm-linux-gnueabihf/libGLESv2.so", RTLD_NOW);
#elif defined(VERO4K)
       void *gles2so = dlopen("/opt/vero3/lib/libGLESv2.so", RTLD_NOW);
#endif
	ASSIGN_PROC_ADR(PFNGLBLENDFUNCPROC, glBlendFunc);
	ASSIGN_PROC_ADR(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate);
	ASSIGN_PROC_ADR(PFNGLPIXELSTOREIPROC, glPixelStorei);
	ASSIGN_PROC_ADR(PFNGLCLEARCOLORPROC, glClearColor);
	ASSIGN_PROC_ADR(PFNGLCULLFACEPROC, glCullFace);
	ASSIGN_PROC_ADR(PFNGLDEPTHFUNCPROC, glDepthFunc);
	ASSIGN_PROC_ADR(PFNGLDEPTHMASKPROC, glDepthMask);
	ASSIGN_PROC_ADR(PFNGLDISABLEPROC, glDisable);
	ASSIGN_PROC_ADR(PFNGLENABLEPROC, glEnable);
	ASSIGN_PROC_ADR(PFNGLPOLYGONOFFSETPROC, glPolygonOffset);
	ASSIGN_PROC_ADR(PFNGLSCISSORPROC, glScissor);
	ASSIGN_PROC_ADR(PFNGLVIEWPORTPROC, glViewport);
	ASSIGN_PROC_ADR(PFNGLBINDTEXTUREPROC, glBindTexture);
	GL_GET_PROC_ADR(PFNGLTEXIMAGE2DPROC, glTexImage2D);
	GL_GET_PROC_ADR(PFNGLTEXPARAMETERIPROC, glTexParameteri);
	GL_GET_PROC_ADR(PFNGLGETINTEGERVPROC, glGetIntegerv);
	GL_GET_PROC_ADR(PFNGLGETSTRINGPROC, glGetString);
	ASSIGN_PROC_ADR(PFNGLREADPIXELSPROC, glReadPixels);
	ASSIGN_PROC_ADR(PFNGLTEXSUBIMAGE2DPROC, glTexSubImage2D);
	ASSIGN_PROC_ADR(PFNGLDRAWARRAYSPROC, glDrawArrays);
	ASSIGN_PROC_ADR(PFNGLGETERRORPROC, glGetError);
	ASSIGN_PROC_ADR(PFNGLDRAWELEMENTSPROC, glDrawElements);
	ASSIGN_PROC_ADR(PFNGLLINEWIDTHPROC, glLineWidth);
	ASSIGN_PROC_ADR(PFNGLCLEARPROC, glClear);
	GL_GET_PROC_ADR(PFNGLGETFLOATVPROC, glGetFloatv);
	ASSIGN_PROC_ADR(PFNGLDELETETEXTURESPROC, glDeleteTextures);
	ASSIGN_PROC_ADR(PFNGLGENTEXTURESPROC, glGenTextures);
	GL_GET_PROC_ADR(PFNGLTEXPARAMETERFPROC, glTexParameterf);
	ASSIGN_PROC_ADR(PFNGLACTIVETEXTUREPROC, glActiveTexture);
	ASSIGN_PROC_ADR(PFNGLBLENDCOLORPROC, glBlendColor);
	ASSIGN_PROC_ADR(PFNGLREADBUFFERPROC, glReadBuffer);
	GL_GET_PROC_ADR(PFNGLFINISHPROC, glFinish);
#ifdef OS_ANDROID
	GL_GET_PROC_ADR(PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC, eglGetNativeClientBufferANDROID);
#endif
	// GL_GET_PROC_ADR
	ASSIGN_PROC_ADR(PFNGLCREATESHADERPROC, glCreateShader);
	ASSIGN_PROC_ADR(PFNGLCOMPILESHADERPROC, glCompileShader);
	ASSIGN_PROC_ADR(PFNGLSHADERSOURCEPROC, glShaderSource);
	ASSIGN_PROC_ADR(PFNGLCREATEPROGRAMPROC, glCreateProgram);
	ASSIGN_PROC_ADR(PFNGLATTACHSHADERPROC, glAttachShader);
	ASSIGN_PROC_ADR(PFNGLLINKPROGRAMPROC, glLinkProgram);
	ASSIGN_PROC_ADR(PFNGLUSEPROGRAMPROC, glUseProgram);
	ASSIGN_PROC_ADR(PFNGLGETUNIFORMLOCATIONPROC, glGetUniformLocation);
	ASSIGN_PROC_ADR(PFNGLUNIFORM1IPROC, glUniform1i);
	ASSIGN_PROC_ADR(PFNGLUNIFORM1FPROC, glUniform1f);
	ASSIGN_PROC_ADR(PFNGLUNIFORM2FPROC, glUniform2f);
	ASSIGN_PROC_ADR(PFNGLUNIFORM2IPROC, glUniform2i);
	ASSIGN_PROC_ADR(PFNGLUNIFORM4IPROC, glUniform4i);
	ASSIGN_PROC_ADR(PFNGLUNIFORM4FPROC, glUniform4f);
	ASSIGN_PROC_ADR(PFNGLUNIFORM3FVPROC, glUniform3fv);
	ASSIGN_PROC_ADR(PFNGLUNIFORM4FVPROC, glUniform4fv);
	ASSIGN_PROC_ADR(PFNGLDETACHSHADERPROC, glDetachShader);
	ASSIGN_PROC_ADR(PFNGLDELETESHADERPROC, glDeleteShader);
	ASSIGN_PROC_ADR(PFNGLDELETEPROGRAMPROC, glDeleteProgram);
	ASSIGN_PROC_ADR(PFNGLGETPROGRAMINFOLOGPROC, glGetProgramInfoLog);
	ASSIGN_PROC_ADR(PFNGLGETSHADERINFOLOGPROC, glGetShaderInfoLog);
	ASSIGN_PROC_ADR(PFNGLGETSHADERIVPROC, glGetShaderiv);
	ASSIGN_PROC_ADR(PFNGLGETPROGRAMIVPROC, glGetProgramiv);

	ASSIGN_PROC_ADR(PFNGLENABLEVERTEXATTRIBARRAYPROC, glEnableVertexAttribArray);
	ASSIGN_PROC_ADR(PFNGLDISABLEVERTEXATTRIBARRAYPROC, glDisableVertexAttribArray);
	ASSIGN_PROC_ADR(PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer);
	ASSIGN_PROC_ADR(PFNGLBINDATTRIBLOCATIONPROC, glBindAttribLocation);
	GL_GET_PROC_ADR(PFNGLVERTEXATTRIB1FPROC, glVertexAttrib1f);
	ASSIGN_PROC_ADR(PFNGLVERTEXATTRIB4FPROC, glVertexAttrib4f);
	ASSIGN_PROC_ADR(PFNGLVERTEXATTRIB4FVPROC, glVertexAttrib4fv);

	GL_GET_PROC_ADR(PFNGLDEPTHRANGEFPROC, glDepthRangef);
	GL_GET_PROC_ADR(PFNGLCLEARDEPTHFPROC, glClearDepthf);

	ASSIGN_PROC_ADR(PFNGLDRAWBUFFERSPROC, glDrawBuffers);
	ASSIGN_PROC_ADR(PFNGLBINDFRAMEBUFFERPROC, glBindFramebuffer);
	ASSIGN_PROC_ADR(PFNGLDELETEFRAMEBUFFERSPROC, glDeleteFramebuffers);
	ASSIGN_PROC_ADR(PFNGLGENFRAMEBUFFERSPROC, glGenFramebuffers);
	ASSIGN_PROC_ADR(PFNGLFRAMEBUFFERTEXTURE2DPROC, glFramebufferTexture2D);
	ASSIGN_PROC_ADR(PFNGLTEXIMAGE2DMULTISAMPLEPROC, glTexImage2DMultisample);
	ASSIGN_PROC_ADR(PFNGLTEXSTORAGE2DMULTISAMPLEPROC, glTexStorage2DMultisample);
	ASSIGN_PROC_ADR(PFNGLGENRENDERBUFFERSPROC, glGenRenderbuffers);
	ASSIGN_PROC_ADR(PFNGLBINDRENDERBUFFERPROC, glBindRenderbuffer);
	ASSIGN_PROC_ADR(PFNGLRENDERBUFFERSTORAGEPROC, glRenderbufferStorage);
	ASSIGN_PROC_ADR(PFNGLFRAMEBUFFERRENDERBUFFERPROC, glFramebufferRenderbuffer);
	ASSIGN_PROC_ADR(PFNGLDELETERENDERBUFFERSPROC, glDeleteRenderbuffers);
	ASSIGN_PROC_ADR(PFNGLCHECKFRAMEBUFFERSTATUSPROC, glCheckFramebufferStatus);
	ASSIGN_PROC_ADR(PFNGLBLITFRAMEBUFFERPROC, glBlitFramebuffer);
	ASSIGN_PROC_ADR(PFNGLGENVERTEXARRAYSPROC, glGenVertexArrays);
	ASSIGN_PROC_ADR(PFNGLBINDVERTEXARRAYPROC, glBindVertexArray);
	ASSIGN_PROC_ADR(PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays);
	ASSIGN_PROC_ADR(PFNGLGENBUFFERSPROC, glGenBuffers);
	ASSIGN_PROC_ADR(PFNGLBINDBUFFERPROC, glBindBuffer);
	ASSIGN_PROC_ADR(PFNGLBUFFERDATAPROC, glBufferData);
	ASSIGN_PROC_ADR(PFNGLMAPBUFFERPROC, glMapBuffer);
	ASSIGN_PROC_ADR(PFNGLMAPBUFFERRANGEPROC, glMapBufferRange);
	ASSIGN_PROC_ADR(PFNGLUNMAPBUFFERPROC, glUnmapBuffer);
	ASSIGN_PROC_ADR(PFNGLDELETEBUFFERSPROC, glDeleteBuffers);
	ASSIGN_PROC_ADR(PFNGLBINDIMAGETEXTUREPROC, glBindImageTexture);
	ASSIGN_PROC_ADR(PFNGLMEMORYBARRIERPROC, glMemoryBarrier);
	ASSIGN_PROC_ADR(PFNGLGETSTRINGIPROC, glGetStringi);
	GL_GET_PROC_ADR(PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer);
	ASSIGN_PROC_ADR(PFNGLBUFFERSTORAGEPROC, glBufferStorage);
	ASSIGN_PROC_ADR(PFNGLFENCESYNCPROC, glFenceSync);
	ASSIGN_PROC_ADR(PFNGLCLIENTWAITSYNCPROC, glClientWaitSync);
	ASSIGN_PROC_ADR(PFNGLDELETESYNCPROC, glDeleteSync);

	ASSIGN_PROC_ADR(PFNGLGETUNIFORMBLOCKINDEXPROC, glGetUniformBlockIndex);
	ASSIGN_PROC_ADR(PFNGLUNIFORMBLOCKBINDINGPROC, glUniformBlockBinding);
	ASSIGN_PROC_ADR(PFNGLGETACTIVEUNIFORMBLOCKIVPROC, glGetActiveUniformBlockiv);
	ASSIGN_PROC_ADR(PFNGLGETUNIFORMINDICESPROC, glGetUniformIndices);
	ASSIGN_PROC_ADR(PFNGLGETACTIVEUNIFORMSIVPROC, glGetActiveUniformsiv);
	ASSIGN_PROC_ADR(PFNGLBINDBUFFERBASEPROC, glBindBufferBase);
	ASSIGN_PROC_ADR(PFNGLBUFFERSUBDATAPROC, glBufferSubData);

	ASSIGN_PROC_ADR(PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary);
	ASSIGN_PROC_ADR(PFNGLPROGRAMBINARYPROC, glProgramBinary);
	ASSIGN_PROC_ADR(PFNGLPROGRAMPARAMETERIPROC, glProgramParameteri);

	ASSIGN_PROC_ADR(PFNGLTEXSTORAGE2DPROC, glTexStorage2D);
	GL_GET_PROC_ADR(PFNGLTEXTURESTORAGE2DPROC, glTextureStorage2D);
	GL_GET_PROC_ADR(PFNGLTEXTURESUBIMAGE2DPROC, glTextureSubImage2D);
	GL_GET_PROC_ADR(PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC, glTextureStorage2DMultisample);

	GL_GET_PROC_ADR(PFNGLTEXTUREPARAMETERIPROC, glTextureParameteri);
	GL_GET_PROC_ADR(PFNGLTEXTUREPARAMETERFPROC, glTextureParameterf);
	GL_GET_PROC_ADR(PFNGLCREATETEXTURESPROC, glCreateTextures);
	GL_GET_PROC_ADR(PFNGLCREATEBUFFERSPROC, glCreateBuffers);
	GL_GET_PROC_ADR(PFNGLCREATEFRAMEBUFFERSPROC, glCreateFramebuffers);
	GL_GET_PROC_ADR(PFNGLNAMEDFRAMEBUFFERTEXTUREPROC, glNamedFramebufferTexture);
	ASSIGN_PROC_ADR(PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC, glDrawRangeElementsBaseVertex);
	ASSIGN_PROC_ADR(PFNGLFLUSHMAPPEDBUFFERRANGEPROC, glFlushMappedBufferRange);
	GL_GET_PROC_ADR(PFNGLTEXTUREBARRIERPROC, glTextureBarrier);
	GL_GET_PROC_ADR(PFNGLTEXTUREBARRIERNVPROC, glTextureBarrierNV);
	ASSIGN_PROC_ADR(PFNGLCLEARBUFFERFVPROC, glClearBufferfv);
	GL_GET_PROC_ADR(PFNGLENABLEIPROC, glEnablei);
	GL_GET_PROC_ADR(PFNGLDISABLEIPROC, glDisablei);
	GL_GET_PROC_ADR(PFNGLEGLIMAGETARGETTEXTURE2DOESPROC, glEGLImageTargetTexture2DOES);
}
