//AUTOGENERATED: Global extension handler for LavaVu
#include "Extensions.h"

//Define pointers to required gl 2.0+ functions

#if defined _WIN32
#define GetProcAddress(arg) wglGetProcAddress((LPCSTR)arg)
PFNGLACTIVETEXTUREPROC glActiveTexture;
PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
PFNGLTEXIMAGE3DPROC glTexImage3D;
PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
#else
getProcAddressFN GetProcAddress;
#endif

#ifdef EXTENSION_POINTERS
PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
PFNGLPOINTPARAMETERFVPROC glPointParameterfv;
PFNGLPOINTPARAMETERFPROC glPointParameterf;
PFNGLBINDBUFFERPROC glBindBuffer;
PFNGLGENBUFFERSPROC glGenBuffers;
PFNGLISBUFFERPROC glIsBuffer;
PFNGLBUFFERDATAPROC glBufferData;
PFNGLBUFFERSUBDATAPROC glBufferSubData;
PFNGLDELETEBUFFERSPROC glDeleteBuffers;
PFNGLCREATESHADERPROC glCreateShader;
PFNGLDELETESHADERPROC glDeleteShader;
PFNGLSHADERSOURCEPROC glShaderSource;
PFNGLCOMPILESHADERPROC glCompileShader;
PFNGLATTACHSHADERPROC glAttachShader;
PFNGLISSHADERPROC glIsShader;
PFNGLGETSHADERIVPROC glGetShaderiv;
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
PFNGLCREATEPROGRAMPROC glCreateProgram;
PFNGLDELETEPROGRAMPROC glDeleteProgram;
PFNGLLINKPROGRAMPROC glLinkProgram;
PFNGLGETPROGRAMIVPROC glGetProgramiv;
PFNGLUSEPROGRAMPROC glUseProgram;
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers;
PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer;
PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage;
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample;
PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer;
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers;
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
PFNGLUNIFORM1FPROC glUniform1f;
PFNGLUNIFORM1IPROC glUniform1i;
PFNGLUNIFORM2FPROC glUniform2f;
PFNGLUNIFORM1FVPROC glUniform1fv;
PFNGLUNIFORM2FVPROC glUniform2fv;
PFNGLUNIFORM3FVPROC glUniform3fv;
PFNGLUNIFORM4FVPROC glUniform4fv;
PFNGLUNIFORM1IVPROC glUniform1iv;
PFNGLUNIFORM2IVPROC glUniform2iv;
PFNGLUNIFORM3IVPROC glUniform3iv;
PFNGLUNIFORM4IVPROC glUniform4iv;
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform;
PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib;
PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex;
PFNGLISPROGRAMPROC glIsProgram;
PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f;
PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f;
#endif

void OpenGL_Extensions_Init()
{
#ifdef EXTENSION_POINTERS
#if defined _WIN32
  glActiveTexture = (PFNGLACTIVETEXTUREPROC) GetProcAddress("glActiveTexture");
  glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) GetProcAddress("glDrawRangeElements");
  glTexImage3D = (PFNGLTEXIMAGE3DPROC) GetProcAddress("glTexImage3D");
  glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) GetProcAddress("glTexSubImage3D");
#endif
  glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) GetProcAddress("glBlendFuncSeparate");
  glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC) GetProcAddress("glPointParameterfv");
  glPointParameterf = (PFNGLPOINTPARAMETERFPROC) GetProcAddress("glPointParameterf");
  glBindBuffer = (PFNGLBINDBUFFERPROC) GetProcAddress("glBindBuffer");
  glGenBuffers = (PFNGLGENBUFFERSPROC) GetProcAddress("glGenBuffers");
  glIsBuffer = (PFNGLISBUFFERPROC) GetProcAddress("glIsBuffer");
  glBufferData = (PFNGLBUFFERDATAPROC) GetProcAddress("glBufferData");
  glBufferSubData = (PFNGLBUFFERSUBDATAPROC) GetProcAddress("glBufferSubData");
  glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) GetProcAddress("glDeleteBuffers");
  glCreateShader = (PFNGLCREATESHADERPROC) GetProcAddress("glCreateShader");
  glDeleteShader = (PFNGLDELETESHADERPROC) GetProcAddress("glDeleteShader");
  glShaderSource = (PFNGLSHADERSOURCEPROC) GetProcAddress("glShaderSource");
  glCompileShader = (PFNGLCOMPILESHADERPROC) GetProcAddress("glCompileShader");
  glAttachShader = (PFNGLATTACHSHADERPROC) GetProcAddress("glAttachShader");
  glIsShader = (PFNGLISSHADERPROC) GetProcAddress("glIsShader");
  glGetShaderiv = (PFNGLGETSHADERIVPROC) GetProcAddress("glGetShaderiv");
  glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) GetProcAddress("glGetShaderInfoLog");
  glCreateProgram = (PFNGLCREATEPROGRAMPROC) GetProcAddress("glCreateProgram");
  glDeleteProgram = (PFNGLDELETEPROGRAMPROC) GetProcAddress("glDeleteProgram");
  glLinkProgram = (PFNGLLINKPROGRAMPROC) GetProcAddress("glLinkProgram");
  glGetProgramiv = (PFNGLGETPROGRAMIVPROC) GetProcAddress("glGetProgramiv");
  glUseProgram = (PFNGLUSEPROGRAMPROC) GetProcAddress("glUseProgram");
  glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) GetProcAddress("glGetProgramInfoLog");
  glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) GetProcAddress("glGenRenderbuffers");
  glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) GetProcAddress("glBindRenderbuffer");
  glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) GetProcAddress("glRenderbufferStorage");
  glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) GetProcAddress("glRenderbufferStorageMultisample");
  glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) GetProcAddress("glTexImage2DMultisample");
  glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) GetProcAddress("glGenFramebuffers");
  glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) GetProcAddress("glFramebufferRenderbuffer");
  glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) GetProcAddress("glFramebufferTexture2D");
  glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) GetProcAddress("glCheckFramebufferStatus");
  glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) GetProcAddress("glBindFramebuffer");
  glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) GetProcAddress("glDeleteRenderbuffers");
  glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) GetProcAddress("glDeleteFramebuffers");
  glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) GetProcAddress("glBlitFramebuffer");
  glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) GetProcAddress("glGenerateMipmap");
  glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) GetProcAddress("glGetUniformLocation");
  glUniform1f = (PFNGLUNIFORM1FPROC) GetProcAddress("glUniform1f");
  glUniform1i = (PFNGLUNIFORM1IPROC) GetProcAddress("glUniform1i");
  glUniform2f = (PFNGLUNIFORM2FPROC) GetProcAddress("glUniform2f");
  glUniform1fv = (PFNGLUNIFORM1FVPROC) GetProcAddress("glUniform1fv");
  glUniform2fv = (PFNGLUNIFORM2FVPROC) GetProcAddress("glUniform2fv");
  glUniform3fv = (PFNGLUNIFORM3FVPROC) GetProcAddress("glUniform3fv");
  glUniform4fv = (PFNGLUNIFORM4FVPROC) GetProcAddress("glUniform4fv");
  glUniform1iv = (PFNGLUNIFORM1IVPROC) GetProcAddress("glUniform1iv");
  glUniform2iv = (PFNGLUNIFORM2IVPROC) GetProcAddress("glUniform2iv");
  glUniform3iv = (PFNGLUNIFORM3IVPROC) GetProcAddress("glUniform3iv");
  glUniform4iv = (PFNGLUNIFORM4IVPROC) GetProcAddress("glUniform4iv");
  glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) GetProcAddress("glUniformMatrix4fv");
  glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) GetProcAddress("glGetActiveUniform");
  glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) GetProcAddress("glGetActiveAttrib");
  glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) GetProcAddress("glGetAttribLocation");
  glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) GetProcAddress("glEnableVertexAttribArray");
  glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) GetProcAddress("glVertexAttribPointer");
  glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) GetProcAddress("glDisableVertexAttribArray");
  glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) GetProcAddress("glGenVertexArrays");
  glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) GetProcAddress("glDeleteVertexArrays");
  glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) GetProcAddress("glBindVertexArray");
  glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) GetProcAddress("glDrawElementsBaseVertex");
  glIsProgram = (PFNGLISPROGRAMPROC) GetProcAddress("glIsProgram");
  glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) GetProcAddress("glVertexAttrib1f");
  glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) GetProcAddress("glVertexAttrib2f");
#endif
}


