diff options
author | Howard Stearns <aech@lindenlab.com> | 2022-09-09 18:47:16 +0000 |
---|---|---|
committer | Howard Stearns <aech@lindenlab.com> | 2022-09-09 18:47:16 +0000 |
commit | 765a99d238da80bcf705f58f8e8d6082050c0260 (patch) | |
tree | 88de597a5cf75720f90a0d512fda89860c5a2e3e | |
parent | dfe19c257dbb9d5af6f1e2961015e95847525412 (diff) | |
parent | c9565d6493887b1518465e8a666a75bbe9878f1d (diff) |
Merged in SL-17967 (pull request #1113)
SL-17967 require 4.1 core profile
47 files changed, 3237 insertions, 1661 deletions
diff --git a/indra/llrender/llatmosphere.cpp b/indra/llrender/llatmosphere.cpp index ffc17c89f8..8e37ca9b90 100644 --- a/indra/llrender/llatmosphere.cpp +++ b/indra/llrender/llatmosphere.cpp @@ -241,7 +241,7 @@ LLGLTexture* LLAtmosphere::getTransmittance() m_transmittance->generateGLTexture(); m_transmittance->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); m_transmittance->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_transmittance->setExplicitFormat(GL_RGB32F_ARB, GL_RGB, GL_FLOAT); + m_transmittance->setExplicitFormat(GL_RGB32F, GL_RGB, GL_FLOAT); m_transmittance->setTarget(GL_TEXTURE_2D, LLTexUnit::TT_TEXTURE); } return m_transmittance; @@ -255,7 +255,7 @@ LLGLTexture* LLAtmosphere::getScattering() m_scattering->generateGLTexture(); m_scattering->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); m_scattering->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_scattering->setExplicitFormat(GL_RGB16F_ARB, GL_RGB, GL_FLOAT); + m_scattering->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT); m_scattering->setTarget(GL_TEXTURE_3D, LLTexUnit::TT_TEXTURE_3D); } return m_scattering; @@ -269,7 +269,7 @@ LLGLTexture* LLAtmosphere::getMieScattering() m_mie_scatter_texture->generateGLTexture(); m_mie_scatter_texture->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); m_mie_scatter_texture->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_mie_scatter_texture->setExplicitFormat(GL_RGB16F_ARB, GL_RGB, GL_FLOAT); + m_mie_scatter_texture->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT); m_mie_scatter_texture->setTarget(GL_TEXTURE_3D, LLTexUnit::TT_TEXTURE_3D); } return m_mie_scatter_texture; @@ -283,7 +283,7 @@ LLGLTexture* LLAtmosphere::getIlluminance() m_illuminance->generateGLTexture(); m_illuminance->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); m_illuminance->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_illuminance->setExplicitFormat(GL_RGB32F_ARB, GL_RGB, GL_FLOAT); + m_illuminance->setExplicitFormat(GL_RGB32F, GL_RGB, GL_FLOAT); m_illuminance->setTarget(GL_TEXTURE_2D, LLTexUnit::TT_TEXTURE); } return m_illuminance; diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 473447ad72..e41765622f 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -51,12 +51,12 @@ LLCubeMap::LLCubeMap(bool init_as_srgb) mMatrixStage(0), mIssRGB(init_as_srgb) { - mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; - mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; - mTargets[2] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB; - mTargets[3] = GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB; - mTargets[4] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB; - mTargets[5] = GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB; + mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X; + mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X; + mTargets[2] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y; + mTargets[3] = GL_TEXTURE_CUBE_MAP_POSITIVE_Y; + mTargets[4] = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z; + mTargets[5] = GL_TEXTURE_CUBE_MAP_POSITIVE_Z; } LLCubeMap::~LLCubeMap() diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp index 438d92cdba..08ff7c9414 100644 --- a/indra/llrender/llcubemaparray.cpp +++ b/indra/llrender/llcubemaparray.cpp @@ -45,12 +45,12 @@ // MUST match order of OpenGL face-layers GLenum LLCubeMapArray::sTargets[6] = { - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB + GL_TEXTURE_CUBE_MAP_POSITIVE_X, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z }; LLVector3 LLCubeMapArray::sLookVecs[6] = @@ -122,14 +122,14 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count) bind(0); - glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY_ARB, 0, GL_RGB, resolution, resolution, count*6, 0, + glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGB, resolution, resolution, count*6, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr); mImage->setAddressMode(LLTexUnit::TAM_CLAMP); mImage->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC); - glGenerateMipmap(GL_TEXTURE_CUBE_MAP_ARRAY_ARB); + glGenerateMipmap(GL_TEXTURE_CUBE_MAP_ARRAY); unbind(); } diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 8ebaf77eec..5253ed3d51 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -86,13 +86,13 @@ void APIENTRY gl_debug_callback(GLenum source, const GLchar* message, GLvoid* userParam) { - if (severity != GL_DEBUG_SEVERITY_HIGH_ARB // && - //severity != GL_DEBUG_SEVERITY_MEDIUM_ARB && - //severity != GL_DEBUG_SEVERITY_LOW_ARB + /*if (severity != GL_DEBUG_SEVERITY_HIGH_ARB // && + severity != GL_DEBUG_SEVERITY_MEDIUM_ARB && + severity != GL_DEBUG_SEVERITY_LOW_ARB ) { //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints) return; - } + }*/ if (severity == GL_DEBUG_SEVERITY_HIGH_ARB) { @@ -160,255 +160,770 @@ std::list<LLGLUpdate*> LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS #if LL_WINDOWS -PFNGLGETSTRINGIPROC glGetStringi = NULL; -#endif - -// vertex blending prototypes -PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB = NULL; -PFNGLVERTEXBLENDARBPROC glVertexBlendARB = NULL; -PFNGLWEIGHTFVARBPROC glWeightfvARB = NULL; - -// Vertex buffer object prototypes -PFNGLBINDBUFFERARBPROC glBindBufferARB = NULL; -PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB = NULL; -PFNGLGENBUFFERSARBPROC glGenBuffersARB = NULL; -PFNGLISBUFFERARBPROC glIsBufferARB = NULL; -PFNGLBUFFERDATAARBPROC glBufferDataARB = NULL; -PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB = NULL; -PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB = NULL; -PFNGLMAPBUFFERARBPROC glMapBufferARB = NULL; -PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB = NULL; -PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB = NULL; -PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB = NULL; - -//GL_ARB_vertex_array_object -PFNGLBINDVERTEXARRAYPROC glBindVertexArray = NULL; -PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays = NULL; -PFNGLGENVERTEXARRAYSPROC glGenVertexArrays = NULL; -PFNGLISVERTEXARRAYPROC glIsVertexArray = NULL; - -// GL_ARB_map_buffer_range -PFNGLMAPBUFFERRANGEPROC glMapBufferRange = NULL; -PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange = NULL; - -// GL_ARB_sync -PFNGLFENCESYNCPROC glFenceSync = NULL; -PFNGLISSYNCPROC glIsSync = NULL; -PFNGLDELETESYNCPROC glDeleteSync = NULL; -PFNGLCLIENTWAITSYNCPROC glClientWaitSync = NULL; -PFNGLWAITSYNCPROC glWaitSync = NULL; -PFNGLGETINTEGER64VPROC glGetInteger64v = NULL; -PFNGLGETSYNCIVPROC glGetSynciv = NULL; - -// GL_APPLE_flush_buffer_range -PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE = NULL; -PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE = NULL; - -// GL_ARB_occlusion_query -PFNGLGENQUERIESARBPROC glGenQueriesARB = NULL; -PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB = NULL; -PFNGLISQUERYARBPROC glIsQueryARB = NULL; -PFNGLBEGINQUERYARBPROC glBeginQueryARB = NULL; -PFNGLENDQUERYARBPROC glEndQueryARB = NULL; -PFNGLGETQUERYIVARBPROC glGetQueryivARB = NULL; -PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB = NULL; -PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB = NULL; - -// GL_ARB_timer_query -PFNGLQUERYCOUNTERPROC glQueryCounter = NULL; -PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v = NULL; -PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v = NULL; - -// GL_ARB_point_parameters -PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB = NULL; -PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB = NULL; - -// GL_ARB_framebuffer_object -PFNGLISRENDERBUFFERPROC glIsRenderbuffer = NULL; -PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = NULL; -PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = NULL; -PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = NULL; -PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = NULL; -PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv = NULL; -PFNGLISFRAMEBUFFERPROC glIsFramebuffer = NULL; -PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = NULL; -PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = NULL; -PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = NULL; -PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = NULL; -PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D = NULL; -PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = NULL; -PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D = NULL; -PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = NULL; -PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv = NULL; -PFNGLGENERATEMIPMAPPROC glGenerateMipmap = NULL; -PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer = NULL; -PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample = NULL; -PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer = NULL; - -//GL_ARB_texture_multisample -PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample = NULL; -PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample = NULL; -PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv = NULL; -PFNGLSAMPLEMASKIPROC glSampleMaski = NULL; - -//transform feedback (4.0 core) -PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback = NULL; -PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback = NULL; -PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings = NULL; -PFNGLBINDBUFFERRANGEPROC glBindBufferRange = NULL; -PFNGLBINDBUFFERBASEPROC glBindBufferBase = NULL; - -//GL_ARB_debug_output -PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB = NULL; -PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB = NULL; -PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB = NULL; -PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB = NULL; - -// GL_EXT_blend_func_separate -PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT = NULL; - -// GL_ARB_draw_buffers -PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB = NULL; - -//shader object prototypes -PFNGLDELETEOBJECTARBPROC glDeleteObjectARB = NULL; -PFNGLGETHANDLEARBPROC glGetHandleARB = NULL; -PFNGLDETACHOBJECTARBPROC glDetachObjectARB = NULL; -PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB = NULL; -PFNGLSHADERSOURCEARBPROC glShaderSourceARB = NULL; -PFNGLCOMPILESHADERARBPROC glCompileShaderARB = NULL; -PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL; -PFNGLATTACHOBJECTARBPROC glAttachObjectARB = NULL; -PFNGLLINKPROGRAMARBPROC glLinkProgramARB = NULL; -PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL; -PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB = NULL; -PFNGLUNIFORM1FARBPROC glUniform1fARB = NULL; -PFNGLUNIFORM2FARBPROC glUniform2fARB = NULL; -PFNGLUNIFORM3FARBPROC glUniform3fARB = NULL; -PFNGLUNIFORM4FARBPROC glUniform4fARB = NULL; -PFNGLUNIFORM1IARBPROC glUniform1iARB = NULL; -PFNGLUNIFORM2IARBPROC glUniform2iARB = NULL; -PFNGLUNIFORM3IARBPROC glUniform3iARB = NULL; -PFNGLUNIFORM4IARBPROC glUniform4iARB = NULL; -PFNGLUNIFORM1FVARBPROC glUniform1fvARB = NULL; -PFNGLUNIFORM2FVARBPROC glUniform2fvARB = NULL; -PFNGLUNIFORM3FVARBPROC glUniform3fvARB = NULL; -PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL; -PFNGLUNIFORM1IVARBPROC glUniform1ivARB = NULL; -PFNGLUNIFORM2IVARBPROC glUniform2ivARB = NULL; -PFNGLUNIFORM3IVARBPROC glUniform3ivARB = NULL; -PFNGLUNIFORM4IVARBPROC glUniform4ivARB = NULL; -PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB = NULL; -PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB = NULL; -PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv = NULL; -PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB = NULL; -PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB = NULL; -PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB = NULL; -PFNGLGETINFOLOGARBPROC glGetInfoLogARB = NULL; -PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB = NULL; -PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL; -PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB = NULL; -PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB = NULL; -PFNGLGETUNIFORMIVARBPROC glGetUniformivARB = NULL; -PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB = NULL; -PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer = NULL; - -// GL_ARB_uniform_buffer_object -PFNGLGETUNIFORMINDICESPROC glGetUniformIndices = NULL; -PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv = NULL; -PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName = NULL; -PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex = NULL; -PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv = NULL; -PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName = NULL; -PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding = NULL; +// WGL_ARB_create_context +PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = nullptr; + +// WGL_AMD_gpu_association +PFNWGLGETGPUIDSAMDPROC wglGetGPUIDsAMD = nullptr; +PFNWGLGETGPUINFOAMDPROC wglGetGPUInfoAMD = nullptr; +PFNWGLGETCONTEXTGPUIDAMDPROC wglGetContextGPUIDAMD = nullptr; +PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC wglCreateAssociatedContextAMD = nullptr; +PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC wglCreateAssociatedContextAttribsAMD = nullptr; +PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC wglDeleteAssociatedContextAMD = nullptr; +PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC wglMakeAssociatedContextCurrentAMD = nullptr; +PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC wglGetCurrentAssociatedContextAMD = nullptr; +PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC wglBlitContextFramebufferAMD = nullptr; + +// WGL_EXT_swap_control +PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr; +PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = nullptr; -#if LL_WINDOWS -PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL; #endif -// vertex shader prototypes -#if LL_LINUX -PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB = NULL; -PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB = NULL; -PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB = NULL; -PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB = NULL; -PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB = NULL; -PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB = NULL; -PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB = NULL; -PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB = NULL; -PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB = NULL; -PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB = NULL; -PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB = NULL; -PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB = NULL; -PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB = NULL; -PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB = NULL; -PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB = NULL; -PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB = NULL; -PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB = NULL; -PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB = NULL; -#endif // LL_LINUX -PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB = NULL; -PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB = NULL; -PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB = NULL; -PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB = NULL; -PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB = NULL; -PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB = NULL; -PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB = NULL; -#if LL_LINUX -PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB = NULL; -PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB = NULL; -PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB = NULL; -PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB = NULL; -PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB = NULL; -PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB = NULL; -PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB = NULL; -PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB = NULL; -PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB = NULL; -PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB = NULL; -PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB = NULL; -PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB = NULL; -PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB = NULL; -PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB = NULL; -PFNGLPROGRAMSTRINGARBPROC glProgramStringARB = NULL; -PFNGLBINDPROGRAMARBPROC glBindProgramARB = NULL; -PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB = NULL; -PFNGLGENPROGRAMSARBPROC glGenProgramsARB = NULL; -PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB = NULL; -PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB = NULL; -PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB = NULL; -PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB = NULL; -PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB = NULL; -PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB = NULL; -PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB = NULL; -PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB = NULL; -PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB = NULL; -PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB = NULL; -PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB = NULL; -PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB = NULL; -PFNGLGETPROGRAMIVARBPROC glGetProgramivARB = NULL; -PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB = NULL; -PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB = NULL; -PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB = NULL; -PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB = NULL; -PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB = NULL; -PFNGLISPROGRAMARBPROC glIsProgramARB = NULL; -#endif // LL_LINUX -PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB = NULL; -PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB = NULL; -PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB = NULL; +// GL_VERSION_1_2 +//PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = nullptr; +//PFNGLTEXIMAGE3DPROC glTexImage3D = nullptr; +//PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D = nullptr; +//PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D = nullptr; + +// GL_VERSION_1_3 +PFNGLACTIVETEXTUREPROC glActiveTexture = nullptr; +PFNGLSAMPLECOVERAGEPROC glSampleCoverage = nullptr; +PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D = nullptr; +PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D = nullptr; +PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D = nullptr; +PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D = nullptr; +PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D = nullptr; +PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D = nullptr; +PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage = nullptr; +PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture = nullptr; +PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d = nullptr; +PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv = nullptr; +PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f = nullptr; +PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv = nullptr; +PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i = nullptr; +PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv = nullptr; +PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s = nullptr; +PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv = nullptr; +PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d = nullptr; +PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv = nullptr; +PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f = nullptr; +PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv = nullptr; +PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i = nullptr; +PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv = nullptr; +PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s = nullptr; +PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv = nullptr; +PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d = nullptr; +PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv = nullptr; +PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f = nullptr; +PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv = nullptr; +PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i = nullptr; +PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv = nullptr; +PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s = nullptr; +PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv = nullptr; +PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d = nullptr; +PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv = nullptr; +PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f = nullptr; +PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv = nullptr; +PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i = nullptr; +PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv = nullptr; +PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s = nullptr; +PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv = nullptr; +PFNGLLOADTRANSPOSEMATRIXFPROC glLoadTransposeMatrixf = nullptr; +PFNGLLOADTRANSPOSEMATRIXDPROC glLoadTransposeMatrixd = nullptr; +PFNGLMULTTRANSPOSEMATRIXFPROC glMultTransposeMatrixf = nullptr; +PFNGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd = nullptr; + +// GL_VERSION_1_4 +PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate = nullptr; +PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays = nullptr; +PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements = nullptr; +PFNGLPOINTPARAMETERFPROC glPointParameterf = nullptr; +PFNGLPOINTPARAMETERFVPROC glPointParameterfv = nullptr; +PFNGLPOINTPARAMETERIPROC glPointParameteri = nullptr; +PFNGLPOINTPARAMETERIVPROC glPointParameteriv = nullptr; +PFNGLFOGCOORDFPROC glFogCoordf = nullptr; +PFNGLFOGCOORDFVPROC glFogCoordfv = nullptr; +PFNGLFOGCOORDDPROC glFogCoordd = nullptr; +PFNGLFOGCOORDDVPROC glFogCoorddv = nullptr; +PFNGLFOGCOORDPOINTERPROC glFogCoordPointer = nullptr; +PFNGLSECONDARYCOLOR3BPROC glSecondaryColor3b = nullptr; +PFNGLSECONDARYCOLOR3BVPROC glSecondaryColor3bv = nullptr; +PFNGLSECONDARYCOLOR3DPROC glSecondaryColor3d = nullptr; +PFNGLSECONDARYCOLOR3DVPROC glSecondaryColor3dv = nullptr; +PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f = nullptr; +PFNGLSECONDARYCOLOR3FVPROC glSecondaryColor3fv = nullptr; +PFNGLSECONDARYCOLOR3IPROC glSecondaryColor3i = nullptr; +PFNGLSECONDARYCOLOR3IVPROC glSecondaryColor3iv = nullptr; +PFNGLSECONDARYCOLOR3SPROC glSecondaryColor3s = nullptr; +PFNGLSECONDARYCOLOR3SVPROC glSecondaryColor3sv = nullptr; +PFNGLSECONDARYCOLOR3UBPROC glSecondaryColor3ub = nullptr; +PFNGLSECONDARYCOLOR3UBVPROC glSecondaryColor3ubv = nullptr; +PFNGLSECONDARYCOLOR3UIPROC glSecondaryColor3ui = nullptr; +PFNGLSECONDARYCOLOR3UIVPROC glSecondaryColor3uiv = nullptr; +PFNGLSECONDARYCOLOR3USPROC glSecondaryColor3us = nullptr; +PFNGLSECONDARYCOLOR3USVPROC glSecondaryColor3usv = nullptr; +PFNGLSECONDARYCOLORPOINTERPROC glSecondaryColorPointer = nullptr; +PFNGLWINDOWPOS2DPROC glWindowPos2d = nullptr; +PFNGLWINDOWPOS2DVPROC glWindowPos2dv = nullptr; +PFNGLWINDOWPOS2FPROC glWindowPos2f = nullptr; +PFNGLWINDOWPOS2FVPROC glWindowPos2fv = nullptr; +PFNGLWINDOWPOS2IPROC glWindowPos2i = nullptr; +PFNGLWINDOWPOS2IVPROC glWindowPos2iv = nullptr; +PFNGLWINDOWPOS2SPROC glWindowPos2s = nullptr; +PFNGLWINDOWPOS2SVPROC glWindowPos2sv = nullptr; +PFNGLWINDOWPOS3DPROC glWindowPos3d = nullptr; +PFNGLWINDOWPOS3DVPROC glWindowPos3dv = nullptr; +PFNGLWINDOWPOS3FPROC glWindowPos3f = nullptr; +PFNGLWINDOWPOS3FVPROC glWindowPos3fv = nullptr; +PFNGLWINDOWPOS3IPROC glWindowPos3i = nullptr; +PFNGLWINDOWPOS3IVPROC glWindowPos3iv = nullptr; +PFNGLWINDOWPOS3SPROC glWindowPos3s = nullptr; +PFNGLWINDOWPOS3SVPROC glWindowPos3sv = nullptr; + +// GL_VERSION_1_5 +PFNGLGENQUERIESPROC glGenQueries = nullptr; +PFNGLDELETEQUERIESPROC glDeleteQueries = nullptr; +PFNGLISQUERYPROC glIsQuery = nullptr; +PFNGLBEGINQUERYPROC glBeginQuery = nullptr; +PFNGLENDQUERYPROC glEndQuery = nullptr; +PFNGLGETQUERYIVPROC glGetQueryiv = nullptr; +PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv = nullptr; +PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv = nullptr; +PFNGLBINDBUFFERPROC glBindBuffer = nullptr; +PFNGLDELETEBUFFERSPROC glDeleteBuffers = nullptr; +PFNGLGENBUFFERSPROC glGenBuffers = nullptr; +PFNGLISBUFFERPROC glIsBuffer = nullptr; +PFNGLBUFFERDATAPROC glBufferData = nullptr; +PFNGLBUFFERSUBDATAPROC glBufferSubData = nullptr; +PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData = nullptr; +PFNGLMAPBUFFERPROC glMapBuffer = nullptr; +PFNGLUNMAPBUFFERPROC glUnmapBuffer = nullptr; +PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv = nullptr; +PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv = nullptr; + +// GL_VERSION_2_0 +PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate = nullptr; +PFNGLDRAWBUFFERSPROC glDrawBuffers = nullptr; +PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate = nullptr; +PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate = nullptr; +PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate = nullptr; +PFNGLATTACHSHADERPROC glAttachShader = nullptr; +PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation = nullptr; +PFNGLCOMPILESHADERPROC glCompileShader = nullptr; +PFNGLCREATEPROGRAMPROC glCreateProgram = nullptr; +PFNGLCREATESHADERPROC glCreateShader = nullptr; +PFNGLDELETEPROGRAMPROC glDeleteProgram = nullptr; +PFNGLDELETESHADERPROC glDeleteShader = nullptr; +PFNGLDETACHSHADERPROC glDetachShader = nullptr; +PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray = nullptr; +PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray = nullptr; +PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib = nullptr; +PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform = nullptr; +PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders = nullptr; +PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation = nullptr; +PFNGLGETPROGRAMIVPROC glGetProgramiv = nullptr; +PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog = nullptr; +PFNGLGETSHADERIVPROC glGetShaderiv = nullptr; +PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog = nullptr; +PFNGLGETSHADERSOURCEPROC glGetShaderSource = nullptr; +PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation = nullptr; +PFNGLGETUNIFORMFVPROC glGetUniformfv = nullptr; +PFNGLGETUNIFORMIVPROC glGetUniformiv = nullptr; +PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv = nullptr; +PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv = nullptr; +PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv = nullptr; +PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv = nullptr; +PFNGLISPROGRAMPROC glIsProgram = nullptr; +PFNGLISSHADERPROC glIsShader = nullptr; +PFNGLLINKPROGRAMPROC glLinkProgram = nullptr; +PFNGLSHADERSOURCEPROC glShaderSource = nullptr; +PFNGLUSEPROGRAMPROC glUseProgram = nullptr; +PFNGLUNIFORM1FPROC glUniform1f = nullptr; +PFNGLUNIFORM2FPROC glUniform2f = nullptr; +PFNGLUNIFORM3FPROC glUniform3f = nullptr; +PFNGLUNIFORM4FPROC glUniform4f = nullptr; +PFNGLUNIFORM1IPROC glUniform1i = nullptr; +PFNGLUNIFORM2IPROC glUniform2i = nullptr; +PFNGLUNIFORM3IPROC glUniform3i = nullptr; +PFNGLUNIFORM4IPROC glUniform4i = nullptr; +PFNGLUNIFORM1FVPROC glUniform1fv = nullptr; +PFNGLUNIFORM2FVPROC glUniform2fv = nullptr; +PFNGLUNIFORM3FVPROC glUniform3fv = nullptr; +PFNGLUNIFORM4FVPROC glUniform4fv = nullptr; +PFNGLUNIFORM1IVPROC glUniform1iv = nullptr; +PFNGLUNIFORM2IVPROC glUniform2iv = nullptr; +PFNGLUNIFORM3IVPROC glUniform3iv = nullptr; +PFNGLUNIFORM4IVPROC glUniform4iv = nullptr; +PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv = nullptr; +PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv = nullptr; +PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv = nullptr; +PFNGLVALIDATEPROGRAMPROC glValidateProgram = nullptr; +PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d = nullptr; +PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv = nullptr; +PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f = nullptr; +PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv = nullptr; +PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s = nullptr; +PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv = nullptr; +PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d = nullptr; +PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv = nullptr; +PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f = nullptr; +PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv = nullptr; +PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s = nullptr; +PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv = nullptr; +PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d = nullptr; +PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv = nullptr; +PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f = nullptr; +PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv = nullptr; +PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s = nullptr; +PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv = nullptr; +PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv = nullptr; +PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv = nullptr; +PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv = nullptr; +PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub = nullptr; +PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv = nullptr; +PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv = nullptr; +PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv = nullptr; +PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv = nullptr; +PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d = nullptr; +PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv = nullptr; +PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f = nullptr; +PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv = nullptr; +PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv = nullptr; +PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s = nullptr; +PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv = nullptr; +PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv = nullptr; +PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv = nullptr; +PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv = nullptr; +PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer = nullptr; + +// GL_VERSION_2_1 +PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv = nullptr; +PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv = nullptr; +PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv = nullptr; +PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv = nullptr; +PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv = nullptr; +PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv = nullptr; + +// GL_VERSION_3_0 +PFNGLCOLORMASKIPROC glColorMaski = nullptr; +PFNGLGETBOOLEANI_VPROC glGetBooleani_v = nullptr; +PFNGLGETINTEGERI_VPROC glGetIntegeri_v = nullptr; +PFNGLENABLEIPROC glEnablei = nullptr; +PFNGLDISABLEIPROC glDisablei = nullptr; +PFNGLISENABLEDIPROC glIsEnabledi = nullptr; +PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback = nullptr; +PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback = nullptr; +PFNGLBINDBUFFERRANGEPROC glBindBufferRange = nullptr; +PFNGLBINDBUFFERBASEPROC glBindBufferBase = nullptr; +PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings = nullptr; +PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying = nullptr; +PFNGLCLAMPCOLORPROC glClampColor = nullptr; +PFNGLBEGINCONDITIONALRENDERPROC glBeginConditionalRender = nullptr; +PFNGLENDCONDITIONALRENDERPROC glEndConditionalRender = nullptr; +PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer = nullptr; +PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv = nullptr; +PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv = nullptr; +PFNGLVERTEXATTRIBI1IPROC glVertexAttribI1i = nullptr; +PFNGLVERTEXATTRIBI2IPROC glVertexAttribI2i = nullptr; +PFNGLVERTEXATTRIBI3IPROC glVertexAttribI3i = nullptr; +PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i = nullptr; +PFNGLVERTEXATTRIBI1UIPROC glVertexAttribI1ui = nullptr; +PFNGLVERTEXATTRIBI2UIPROC glVertexAttribI2ui = nullptr; +PFNGLVERTEXATTRIBI3UIPROC glVertexAttribI3ui = nullptr; +PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui = nullptr; +PFNGLVERTEXATTRIBI1IVPROC glVertexAttribI1iv = nullptr; +PFNGLVERTEXATTRIBI2IVPROC glVertexAttribI2iv = nullptr; +PFNGLVERTEXATTRIBI3IVPROC glVertexAttribI3iv = nullptr; +PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv = nullptr; +PFNGLVERTEXATTRIBI1UIVPROC glVertexAttribI1uiv = nullptr; +PFNGLVERTEXATTRIBI2UIVPROC glVertexAttribI2uiv = nullptr; +PFNGLVERTEXATTRIBI3UIVPROC glVertexAttribI3uiv = nullptr; +PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv = nullptr; +PFNGLVERTEXATTRIBI4BVPROC glVertexAttribI4bv = nullptr; +PFNGLVERTEXATTRIBI4SVPROC glVertexAttribI4sv = nullptr; +PFNGLVERTEXATTRIBI4UBVPROC glVertexAttribI4ubv = nullptr; +PFNGLVERTEXATTRIBI4USVPROC glVertexAttribI4usv = nullptr; +PFNGLGETUNIFORMUIVPROC glGetUniformuiv = nullptr; +PFNGLBINDFRAGDATALOCATIONPROC glBindFragDataLocation = 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; +PFNGLTEXPARAMETERIIVPROC glTexParameterIiv = nullptr; +PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv = nullptr; +PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv = nullptr; +PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv = nullptr; +PFNGLCLEARBUFFERIVPROC glClearBufferiv = nullptr; +PFNGLCLEARBUFFERUIVPROC glClearBufferuiv = nullptr; +PFNGLCLEARBUFFERFVPROC glClearBufferfv = nullptr; +PFNGLCLEARBUFFERFIPROC glClearBufferfi = nullptr; +PFNGLGETSTRINGIPROC glGetStringi = nullptr; +PFNGLISRENDERBUFFERPROC glIsRenderbuffer = nullptr; +PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = nullptr; +PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = nullptr; +PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = nullptr; +PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = nullptr; +PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv = nullptr; +PFNGLISFRAMEBUFFERPROC glIsFramebuffer = nullptr; +PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = nullptr; +PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = nullptr; +PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = nullptr; +PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = nullptr; +PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D = nullptr; +PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = nullptr; +PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D = nullptr; +PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = nullptr; +PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv = nullptr; +PFNGLGENERATEMIPMAPPROC glGenerateMipmap = 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; + +// GL_VERSION_3_1 +PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced = nullptr; +PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced = nullptr; +PFNGLTEXBUFFERPROC glTexBuffer = nullptr; +PFNGLPRIMITIVERESTARTINDEXPROC glPrimitiveRestartIndex = nullptr; +PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData = nullptr; +PFNGLGETUNIFORMINDICESPROC glGetUniformIndices = nullptr; +PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv = nullptr; +PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName = nullptr; +PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex = nullptr; +PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv = nullptr; +PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName = nullptr; +PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding = nullptr; + +// GL_VERSION_3_2 +PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex = nullptr; +PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex = nullptr; +PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex = nullptr; +PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glMultiDrawElementsBaseVertex = nullptr; +PFNGLPROVOKINGVERTEXPROC glProvokingVertex = 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; +PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture = nullptr; +PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample = nullptr; +PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample = nullptr; +PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv = nullptr; +PFNGLSAMPLEMASKIPROC glSampleMaski = nullptr; + +// GL_VERSION_3_3 +PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed = nullptr; +PFNGLGETFRAGDATAINDEXPROC glGetFragDataIndex = 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; +PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv = nullptr; +PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv = nullptr; +PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv = nullptr; +PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv = nullptr; +PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv = nullptr; +PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv = nullptr; +PFNGLQUERYCOUNTERPROC glQueryCounter = nullptr; +PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v = nullptr; +PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v = nullptr; +PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor = nullptr; +PFNGLVERTEXATTRIBP1UIPROC glVertexAttribP1ui = nullptr; +PFNGLVERTEXATTRIBP1UIVPROC glVertexAttribP1uiv = nullptr; +PFNGLVERTEXATTRIBP2UIPROC glVertexAttribP2ui = nullptr; +PFNGLVERTEXATTRIBP2UIVPROC glVertexAttribP2uiv = nullptr; +PFNGLVERTEXATTRIBP3UIPROC glVertexAttribP3ui = nullptr; +PFNGLVERTEXATTRIBP3UIVPROC glVertexAttribP3uiv = nullptr; +PFNGLVERTEXATTRIBP4UIPROC glVertexAttribP4ui = nullptr; +PFNGLVERTEXATTRIBP4UIVPROC glVertexAttribP4uiv = nullptr; +PFNGLVERTEXP2UIPROC glVertexP2ui = nullptr; +PFNGLVERTEXP2UIVPROC glVertexP2uiv = nullptr; +PFNGLVERTEXP3UIPROC glVertexP3ui = nullptr; +PFNGLVERTEXP3UIVPROC glVertexP3uiv = nullptr; +PFNGLVERTEXP4UIPROC glVertexP4ui = nullptr; +PFNGLVERTEXP4UIVPROC glVertexP4uiv = nullptr; +PFNGLTEXCOORDP1UIPROC glTexCoordP1ui = nullptr; +PFNGLTEXCOORDP1UIVPROC glTexCoordP1uiv = nullptr; +PFNGLTEXCOORDP2UIPROC glTexCoordP2ui = nullptr; +PFNGLTEXCOORDP2UIVPROC glTexCoordP2uiv = nullptr; +PFNGLTEXCOORDP3UIPROC glTexCoordP3ui = nullptr; +PFNGLTEXCOORDP3UIVPROC glTexCoordP3uiv = nullptr; +PFNGLTEXCOORDP4UIPROC glTexCoordP4ui = nullptr; +PFNGLTEXCOORDP4UIVPROC glTexCoordP4uiv = nullptr; +PFNGLMULTITEXCOORDP1UIPROC glMultiTexCoordP1ui = nullptr; +PFNGLMULTITEXCOORDP1UIVPROC glMultiTexCoordP1uiv = nullptr; +PFNGLMULTITEXCOORDP2UIPROC glMultiTexCoordP2ui = nullptr; +PFNGLMULTITEXCOORDP2UIVPROC glMultiTexCoordP2uiv = nullptr; +PFNGLMULTITEXCOORDP3UIPROC glMultiTexCoordP3ui = nullptr; +PFNGLMULTITEXCOORDP3UIVPROC glMultiTexCoordP3uiv = nullptr; +PFNGLMULTITEXCOORDP4UIPROC glMultiTexCoordP4ui = nullptr; +PFNGLMULTITEXCOORDP4UIVPROC glMultiTexCoordP4uiv = nullptr; +PFNGLNORMALP3UIPROC glNormalP3ui = nullptr; +PFNGLNORMALP3UIVPROC glNormalP3uiv = nullptr; +PFNGLCOLORP3UIPROC glColorP3ui = nullptr; +PFNGLCOLORP3UIVPROC glColorP3uiv = nullptr; +PFNGLCOLORP4UIPROC glColorP4ui = nullptr; +PFNGLCOLORP4UIVPROC glColorP4uiv = nullptr; +PFNGLSECONDARYCOLORP3UIPROC glSecondaryColorP3ui = nullptr; +PFNGLSECONDARYCOLORP3UIVPROC glSecondaryColorP3uiv = nullptr; + +// GL_VERSION_4_0 +PFNGLMINSAMPLESHADINGPROC glMinSampleShading = nullptr; +PFNGLBLENDEQUATIONIPROC glBlendEquationi = nullptr; +PFNGLBLENDEQUATIONSEPARATEIPROC glBlendEquationSeparatei = nullptr; +PFNGLBLENDFUNCIPROC glBlendFunci = nullptr; +PFNGLBLENDFUNCSEPARATEIPROC glBlendFuncSeparatei = nullptr; +PFNGLDRAWARRAYSINDIRECTPROC glDrawArraysIndirect = nullptr; +PFNGLDRAWELEMENTSINDIRECTPROC glDrawElementsIndirect = nullptr; +PFNGLUNIFORM1DPROC glUniform1d = nullptr; +PFNGLUNIFORM2DPROC glUniform2d = nullptr; +PFNGLUNIFORM3DPROC glUniform3d = nullptr; +PFNGLUNIFORM4DPROC glUniform4d = nullptr; +PFNGLUNIFORM1DVPROC glUniform1dv = nullptr; +PFNGLUNIFORM2DVPROC glUniform2dv = nullptr; +PFNGLUNIFORM3DVPROC glUniform3dv = nullptr; +PFNGLUNIFORM4DVPROC glUniform4dv = nullptr; +PFNGLUNIFORMMATRIX2DVPROC glUniformMatrix2dv = nullptr; +PFNGLUNIFORMMATRIX3DVPROC glUniformMatrix3dv = nullptr; +PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv = nullptr; +PFNGLUNIFORMMATRIX2X3DVPROC glUniformMatrix2x3dv = nullptr; +PFNGLUNIFORMMATRIX2X4DVPROC glUniformMatrix2x4dv = nullptr; +PFNGLUNIFORMMATRIX3X2DVPROC glUniformMatrix3x2dv = nullptr; +PFNGLUNIFORMMATRIX3X4DVPROC glUniformMatrix3x4dv = nullptr; +PFNGLUNIFORMMATRIX4X2DVPROC glUniformMatrix4x2dv = nullptr; +PFNGLUNIFORMMATRIX4X3DVPROC glUniformMatrix4x3dv = nullptr; +PFNGLGETUNIFORMDVPROC glGetUniformdv = nullptr; +PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glGetSubroutineUniformLocation = nullptr; +PFNGLGETSUBROUTINEINDEXPROC glGetSubroutineIndex = nullptr; +PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glGetActiveSubroutineUniformiv = nullptr; +PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glGetActiveSubroutineUniformName = nullptr; +PFNGLGETACTIVESUBROUTINENAMEPROC glGetActiveSubroutineName = nullptr; +PFNGLUNIFORMSUBROUTINESUIVPROC glUniformSubroutinesuiv = nullptr; +PFNGLGETUNIFORMSUBROUTINEUIVPROC glGetUniformSubroutineuiv = nullptr; +PFNGLGETPROGRAMSTAGEIVPROC glGetProgramStageiv = nullptr; +PFNGLPATCHPARAMETERIPROC glPatchParameteri = nullptr; +PFNGLPATCHPARAMETERFVPROC glPatchParameterfv = nullptr; +PFNGLBINDTRANSFORMFEEDBACKPROC glBindTransformFeedback = nullptr; +PFNGLDELETETRANSFORMFEEDBACKSPROC glDeleteTransformFeedbacks = nullptr; +PFNGLGENTRANSFORMFEEDBACKSPROC glGenTransformFeedbacks = nullptr; +PFNGLISTRANSFORMFEEDBACKPROC glIsTransformFeedback = nullptr; +PFNGLPAUSETRANSFORMFEEDBACKPROC glPauseTransformFeedback = nullptr; +PFNGLRESUMETRANSFORMFEEDBACKPROC glResumeTransformFeedback = nullptr; +PFNGLDRAWTRANSFORMFEEDBACKPROC glDrawTransformFeedback = nullptr; +PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glDrawTransformFeedbackStream = nullptr; +PFNGLBEGINQUERYINDEXEDPROC glBeginQueryIndexed = nullptr; +PFNGLENDQUERYINDEXEDPROC glEndQueryIndexed = nullptr; +PFNGLGETQUERYINDEXEDIVPROC glGetQueryIndexediv = nullptr; + +// GL_VERSION_4_1 +PFNGLRELEASESHADERCOMPILERPROC glReleaseShaderCompiler = nullptr; +PFNGLSHADERBINARYPROC glShaderBinary = nullptr; +PFNGLGETSHADERPRECISIONFORMATPROC glGetShaderPrecisionFormat = nullptr; +PFNGLDEPTHRANGEFPROC glDepthRangef = nullptr; +PFNGLCLEARDEPTHFPROC glClearDepthf = nullptr; +PFNGLGETPROGRAMBINARYPROC glGetProgramBinary = nullptr; +PFNGLPROGRAMBINARYPROC glProgramBinary = nullptr; +PFNGLPROGRAMPARAMETERIPROC glProgramParameteri = 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; +PFNGLPROGRAMUNIFORM1IVPROC glProgramUniform1iv = nullptr; +PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f = nullptr; +PFNGLPROGRAMUNIFORM1FVPROC glProgramUniform1fv = nullptr; +PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d = nullptr; +PFNGLPROGRAMUNIFORM1DVPROC glProgramUniform1dv = nullptr; +PFNGLPROGRAMUNIFORM1UIPROC glProgramUniform1ui = nullptr; +PFNGLPROGRAMUNIFORM1UIVPROC glProgramUniform1uiv = nullptr; +PFNGLPROGRAMUNIFORM2IPROC glProgramUniform2i = nullptr; +PFNGLPROGRAMUNIFORM2IVPROC glProgramUniform2iv = nullptr; +PFNGLPROGRAMUNIFORM2FPROC glProgramUniform2f = nullptr; +PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv = nullptr; +PFNGLPROGRAMUNIFORM2DPROC glProgramUniform2d = nullptr; +PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv = nullptr; +PFNGLPROGRAMUNIFORM2UIPROC glProgramUniform2ui = nullptr; +PFNGLPROGRAMUNIFORM2UIVPROC glProgramUniform2uiv = nullptr; +PFNGLPROGRAMUNIFORM3IPROC glProgramUniform3i = nullptr; +PFNGLPROGRAMUNIFORM3IVPROC glProgramUniform3iv = nullptr; +PFNGLPROGRAMUNIFORM3FPROC glProgramUniform3f = nullptr; +PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv = nullptr; +PFNGLPROGRAMUNIFORM3DPROC glProgramUniform3d = nullptr; +PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv = nullptr; +PFNGLPROGRAMUNIFORM3UIPROC glProgramUniform3ui = nullptr; +PFNGLPROGRAMUNIFORM3UIVPROC glProgramUniform3uiv = nullptr; +PFNGLPROGRAMUNIFORM4IPROC glProgramUniform4i = nullptr; +PFNGLPROGRAMUNIFORM4IVPROC glProgramUniform4iv = nullptr; +PFNGLPROGRAMUNIFORM4FPROC glProgramUniform4f = nullptr; +PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv = nullptr; +PFNGLPROGRAMUNIFORM4DPROC glProgramUniform4d = nullptr; +PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv = nullptr; +PFNGLPROGRAMUNIFORM4UIPROC glProgramUniform4ui = nullptr; +PFNGLPROGRAMUNIFORM4UIVPROC glProgramUniform4uiv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX2FVPROC glProgramUniformMatrix2fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX3FVPROC glProgramUniformMatrix3fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX2DVPROC glProgramUniformMatrix2dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX3DVPROC glProgramUniformMatrix3dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glProgramUniformMatrix2x3fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glProgramUniformMatrix3x2fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glProgramUniformMatrix2x4fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glProgramUniformMatrix4x2fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glProgramUniformMatrix3x4fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glProgramUniformMatrix4x3fv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glProgramUniformMatrix2x3dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glProgramUniformMatrix3x2dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glProgramUniformMatrix2x4dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glProgramUniformMatrix4x2dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glProgramUniformMatrix3x4dv = nullptr; +PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glProgramUniformMatrix4x3dv = nullptr; +PFNGLVALIDATEPROGRAMPIPELINEPROC glValidateProgramPipeline = nullptr; +PFNGLGETPROGRAMPIPELINEINFOLOGPROC glGetProgramPipelineInfoLog = nullptr; +PFNGLVERTEXATTRIBL1DPROC glVertexAttribL1d = nullptr; +PFNGLVERTEXATTRIBL2DPROC glVertexAttribL2d = nullptr; +PFNGLVERTEXATTRIBL3DPROC glVertexAttribL3d = nullptr; +PFNGLVERTEXATTRIBL4DPROC glVertexAttribL4d = nullptr; +PFNGLVERTEXATTRIBL1DVPROC glVertexAttribL1dv = nullptr; +PFNGLVERTEXATTRIBL2DVPROC glVertexAttribL2dv = nullptr; +PFNGLVERTEXATTRIBL3DVPROC glVertexAttribL3dv = nullptr; +PFNGLVERTEXATTRIBL4DVPROC glVertexAttribL4dv = nullptr; +PFNGLVERTEXATTRIBLPOINTERPROC glVertexAttribLPointer = nullptr; +PFNGLGETVERTEXATTRIBLDVPROC glGetVertexAttribLdv = nullptr; +PFNGLVIEWPORTARRAYVPROC glViewportArrayv = nullptr; +PFNGLVIEWPORTINDEXEDFPROC glViewportIndexedf = nullptr; +PFNGLVIEWPORTINDEXEDFVPROC glViewportIndexedfv = nullptr; +PFNGLSCISSORARRAYVPROC glScissorArrayv = nullptr; +PFNGLSCISSORINDEXEDPROC glScissorIndexed = nullptr; +PFNGLSCISSORINDEXEDVPROC glScissorIndexedv = nullptr; +PFNGLDEPTHRANGEARRAYVPROC glDepthRangeArrayv = nullptr; +PFNGLDEPTHRANGEINDEXEDPROC glDepthRangeIndexed = nullptr; +PFNGLGETFLOATI_VPROC glGetFloati_v = nullptr; +PFNGLGETDOUBLEI_VPROC glGetDoublei_v = nullptr; + +// GL_VERSION_4_2 +PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glDrawArraysInstancedBaseInstance = nullptr; +PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glDrawElementsInstancedBaseInstance = nullptr; +PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glDrawElementsInstancedBaseVertexBaseInstance = nullptr; +PFNGLGETINTERNALFORMATIVPROC glGetInternalformativ = nullptr; +PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glGetActiveAtomicCounterBufferiv = nullptr; +PFNGLBINDIMAGETEXTUREPROC glBindImageTexture = nullptr; +PFNGLMEMORYBARRIERPROC glMemoryBarrier = nullptr; +PFNGLTEXSTORAGE1DPROC glTexStorage1D = nullptr; +PFNGLTEXSTORAGE2DPROC glTexStorage2D = nullptr; +PFNGLTEXSTORAGE3DPROC glTexStorage3D = nullptr; +PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glDrawTransformFeedbackInstanced = nullptr; +PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glDrawTransformFeedbackStreamInstanced = nullptr; + +// GL_VERSION_4_3 +PFNGLCLEARBUFFERDATAPROC glClearBufferData = nullptr; +PFNGLCLEARBUFFERSUBDATAPROC glClearBufferSubData = nullptr; +PFNGLDISPATCHCOMPUTEPROC glDispatchCompute = nullptr; +PFNGLDISPATCHCOMPUTEINDIRECTPROC glDispatchComputeIndirect = nullptr; +PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData = nullptr; +PFNGLFRAMEBUFFERPARAMETERIPROC glFramebufferParameteri = nullptr; +PFNGLGETFRAMEBUFFERPARAMETERIVPROC glGetFramebufferParameteriv = nullptr; +PFNGLGETINTERNALFORMATI64VPROC glGetInternalformati64v = nullptr; +PFNGLINVALIDATETEXSUBIMAGEPROC glInvalidateTexSubImage = nullptr; +PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage = nullptr; +PFNGLINVALIDATEBUFFERSUBDATAPROC glInvalidateBufferSubData = nullptr; +PFNGLINVALIDATEBUFFERDATAPROC glInvalidateBufferData = nullptr; +PFNGLINVALIDATEFRAMEBUFFERPROC glInvalidateFramebuffer = nullptr; +PFNGLINVALIDATESUBFRAMEBUFFERPROC glInvalidateSubFramebuffer = nullptr; +PFNGLMULTIDRAWARRAYSINDIRECTPROC glMultiDrawArraysIndirect = nullptr; +PFNGLMULTIDRAWELEMENTSINDIRECTPROC glMultiDrawElementsIndirect = nullptr; +PFNGLGETPROGRAMINTERFACEIVPROC glGetProgramInterfaceiv = nullptr; +PFNGLGETPROGRAMRESOURCEINDEXPROC glGetProgramResourceIndex = nullptr; +PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName = nullptr; +PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv = nullptr; +PFNGLGETPROGRAMRESOURCELOCATIONPROC glGetProgramResourceLocation = nullptr; +PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glGetProgramResourceLocationIndex = nullptr; +PFNGLSHADERSTORAGEBLOCKBINDINGPROC glShaderStorageBlockBinding = nullptr; +PFNGLTEXBUFFERRANGEPROC glTexBufferRange = nullptr; +PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample = nullptr; +PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample = nullptr; +PFNGLTEXTUREVIEWPROC glTextureView = nullptr; +PFNGLBINDVERTEXBUFFERPROC glBindVertexBuffer = nullptr; +PFNGLVERTEXATTRIBFORMATPROC glVertexAttribFormat = nullptr; +PFNGLVERTEXATTRIBIFORMATPROC glVertexAttribIFormat = nullptr; +PFNGLVERTEXATTRIBLFORMATPROC glVertexAttribLFormat = nullptr; +PFNGLVERTEXATTRIBBINDINGPROC glVertexAttribBinding = nullptr; +PFNGLVERTEXBINDINGDIVISORPROC glVertexBindingDivisor = 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; + +// GL_VERSION_4_4 +PFNGLBUFFERSTORAGEPROC glBufferStorage = nullptr; +PFNGLCLEARTEXIMAGEPROC glClearTexImage = nullptr; +PFNGLCLEARTEXSUBIMAGEPROC glClearTexSubImage = nullptr; +PFNGLBINDBUFFERSBASEPROC glBindBuffersBase = nullptr; +PFNGLBINDBUFFERSRANGEPROC glBindBuffersRange = nullptr; +PFNGLBINDTEXTURESPROC glBindTextures = nullptr; +PFNGLBINDSAMPLERSPROC glBindSamplers = nullptr; +PFNGLBINDIMAGETEXTURESPROC glBindImageTextures = nullptr; +PFNGLBINDVERTEXBUFFERSPROC glBindVertexBuffers = nullptr; + +// GL_VERSION_4_5 +PFNGLCLIPCONTROLPROC glClipControl = nullptr; +PFNGLCREATETRANSFORMFEEDBACKSPROC glCreateTransformFeedbacks = nullptr; +PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glTransformFeedbackBufferBase = nullptr; +PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glTransformFeedbackBufferRange = nullptr; +PFNGLGETTRANSFORMFEEDBACKIVPROC glGetTransformFeedbackiv = nullptr; +PFNGLGETTRANSFORMFEEDBACKI_VPROC glGetTransformFeedbacki_v = nullptr; +PFNGLGETTRANSFORMFEEDBACKI64_VPROC glGetTransformFeedbacki64_v = nullptr; +PFNGLCREATEBUFFERSPROC glCreateBuffers = nullptr; +PFNGLNAMEDBUFFERSTORAGEPROC glNamedBufferStorage = nullptr; +PFNGLNAMEDBUFFERDATAPROC glNamedBufferData = nullptr; +PFNGLNAMEDBUFFERSUBDATAPROC glNamedBufferSubData = nullptr; +PFNGLCOPYNAMEDBUFFERSUBDATAPROC glCopyNamedBufferSubData = nullptr; +PFNGLCLEARNAMEDBUFFERDATAPROC glClearNamedBufferData = nullptr; +PFNGLCLEARNAMEDBUFFERSUBDATAPROC glClearNamedBufferSubData = nullptr; +PFNGLMAPNAMEDBUFFERPROC glMapNamedBuffer = nullptr; +PFNGLMAPNAMEDBUFFERRANGEPROC glMapNamedBufferRange = nullptr; +PFNGLUNMAPNAMEDBUFFERPROC glUnmapNamedBuffer = nullptr; +PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glFlushMappedNamedBufferRange = nullptr; +PFNGLGETNAMEDBUFFERPARAMETERIVPROC glGetNamedBufferParameteriv = nullptr; +PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glGetNamedBufferParameteri64v = nullptr; +PFNGLGETNAMEDBUFFERPOINTERVPROC glGetNamedBufferPointerv = nullptr; +PFNGLGETNAMEDBUFFERSUBDATAPROC glGetNamedBufferSubData = nullptr; +PFNGLCREATEFRAMEBUFFERSPROC glCreateFramebuffers = nullptr; +PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glNamedFramebufferRenderbuffer = nullptr; +PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glNamedFramebufferParameteri = nullptr; +PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glNamedFramebufferTexture = nullptr; +PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glNamedFramebufferTextureLayer = nullptr; +PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glNamedFramebufferDrawBuffer = nullptr; +PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glNamedFramebufferDrawBuffers = nullptr; +PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glNamedFramebufferReadBuffer = nullptr; +PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glInvalidateNamedFramebufferData = nullptr; +PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glInvalidateNamedFramebufferSubData = nullptr; +PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glClearNamedFramebufferiv = nullptr; +PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glClearNamedFramebufferuiv = nullptr; +PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glClearNamedFramebufferfv = nullptr; +PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glClearNamedFramebufferfi = nullptr; +PFNGLBLITNAMEDFRAMEBUFFERPROC glBlitNamedFramebuffer = nullptr; +PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glCheckNamedFramebufferStatus = nullptr; +PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glGetNamedFramebufferParameteriv = nullptr; +PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetNamedFramebufferAttachmentParameteriv = nullptr; +PFNGLCREATERENDERBUFFERSPROC glCreateRenderbuffers = nullptr; +PFNGLNAMEDRENDERBUFFERSTORAGEPROC glNamedRenderbufferStorage = nullptr; +PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glNamedRenderbufferStorageMultisample = nullptr; +PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glGetNamedRenderbufferParameteriv = nullptr; +PFNGLCREATETEXTURESPROC glCreateTextures = nullptr; +PFNGLTEXTUREBUFFERPROC glTextureBuffer = nullptr; +PFNGLTEXTUREBUFFERRANGEPROC glTextureBufferRange = nullptr; +PFNGLTEXTURESTORAGE1DPROC glTextureStorage1D = nullptr; +PFNGLTEXTURESTORAGE2DPROC glTextureStorage2D = nullptr; +PFNGLTEXTURESTORAGE3DPROC glTextureStorage3D = nullptr; +PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glTextureStorage2DMultisample = nullptr; +PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glTextureStorage3DMultisample = nullptr; +PFNGLTEXTURESUBIMAGE1DPROC glTextureSubImage1D = nullptr; +PFNGLTEXTURESUBIMAGE2DPROC glTextureSubImage2D = nullptr; +PFNGLTEXTURESUBIMAGE3DPROC glTextureSubImage3D = nullptr; +PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glCompressedTextureSubImage1D = nullptr; +PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glCompressedTextureSubImage2D = nullptr; +PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glCompressedTextureSubImage3D = nullptr; +PFNGLCOPYTEXTURESUBIMAGE1DPROC glCopyTextureSubImage1D = nullptr; +PFNGLCOPYTEXTURESUBIMAGE2DPROC glCopyTextureSubImage2D = nullptr; +PFNGLCOPYTEXTURESUBIMAGE3DPROC glCopyTextureSubImage3D = nullptr; +PFNGLTEXTUREPARAMETERFPROC glTextureParameterf = nullptr; +PFNGLTEXTUREPARAMETERFVPROC glTextureParameterfv = nullptr; +PFNGLTEXTUREPARAMETERIPROC glTextureParameteri = nullptr; +PFNGLTEXTUREPARAMETERIIVPROC glTextureParameterIiv = nullptr; +PFNGLTEXTUREPARAMETERIUIVPROC glTextureParameterIuiv = nullptr; +PFNGLTEXTUREPARAMETERIVPROC glTextureParameteriv = nullptr; +PFNGLGENERATETEXTUREMIPMAPPROC glGenerateTextureMipmap = nullptr; +PFNGLBINDTEXTUREUNITPROC glBindTextureUnit = nullptr; +PFNGLGETTEXTUREIMAGEPROC glGetTextureImage = nullptr; +PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glGetCompressedTextureImage = nullptr; +PFNGLGETTEXTURELEVELPARAMETERFVPROC glGetTextureLevelParameterfv = nullptr; +PFNGLGETTEXTURELEVELPARAMETERIVPROC glGetTextureLevelParameteriv = nullptr; +PFNGLGETTEXTUREPARAMETERFVPROC glGetTextureParameterfv = nullptr; +PFNGLGETTEXTUREPARAMETERIIVPROC glGetTextureParameterIiv = nullptr; +PFNGLGETTEXTUREPARAMETERIUIVPROC glGetTextureParameterIuiv = nullptr; +PFNGLGETTEXTUREPARAMETERIVPROC glGetTextureParameteriv = nullptr; +PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays = nullptr; +PFNGLDISABLEVERTEXARRAYATTRIBPROC glDisableVertexArrayAttrib = nullptr; +PFNGLENABLEVERTEXARRAYATTRIBPROC glEnableVertexArrayAttrib = nullptr; +PFNGLVERTEXARRAYELEMENTBUFFERPROC glVertexArrayElementBuffer = nullptr; +PFNGLVERTEXARRAYVERTEXBUFFERPROC glVertexArrayVertexBuffer = nullptr; +PFNGLVERTEXARRAYVERTEXBUFFERSPROC glVertexArrayVertexBuffers = nullptr; +PFNGLVERTEXARRAYATTRIBBINDINGPROC glVertexArrayAttribBinding = nullptr; +PFNGLVERTEXARRAYATTRIBFORMATPROC glVertexArrayAttribFormat = nullptr; +PFNGLVERTEXARRAYATTRIBIFORMATPROC glVertexArrayAttribIFormat = nullptr; +PFNGLVERTEXARRAYATTRIBLFORMATPROC glVertexArrayAttribLFormat = nullptr; +PFNGLVERTEXARRAYBINDINGDIVISORPROC glVertexArrayBindingDivisor = nullptr; +PFNGLGETVERTEXARRAYIVPROC glGetVertexArrayiv = nullptr; +PFNGLGETVERTEXARRAYINDEXEDIVPROC glGetVertexArrayIndexediv = nullptr; +PFNGLGETVERTEXARRAYINDEXED64IVPROC glGetVertexArrayIndexed64iv = nullptr; +PFNGLCREATESAMPLERSPROC glCreateSamplers = nullptr; +PFNGLCREATEPROGRAMPIPELINESPROC glCreateProgramPipelines = nullptr; +PFNGLCREATEQUERIESPROC glCreateQueries = nullptr; +PFNGLGETQUERYBUFFEROBJECTI64VPROC glGetQueryBufferObjecti64v = nullptr; +PFNGLGETQUERYBUFFEROBJECTIVPROC glGetQueryBufferObjectiv = nullptr; +PFNGLGETQUERYBUFFEROBJECTUI64VPROC glGetQueryBufferObjectui64v = nullptr; +PFNGLGETQUERYBUFFEROBJECTUIVPROC glGetQueryBufferObjectuiv = nullptr; +PFNGLMEMORYBARRIERBYREGIONPROC glMemoryBarrierByRegion = nullptr; +PFNGLGETTEXTURESUBIMAGEPROC glGetTextureSubImage = nullptr; +PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glGetCompressedTextureSubImage = nullptr; +PFNGLGETGRAPHICSRESETSTATUSPROC glGetGraphicsResetStatus = nullptr; +PFNGLGETNCOMPRESSEDTEXIMAGEPROC glGetnCompressedTexImage = nullptr; +PFNGLGETNTEXIMAGEPROC glGetnTexImage = nullptr; +PFNGLGETNUNIFORMDVPROC glGetnUniformdv = nullptr; +PFNGLGETNUNIFORMFVPROC glGetnUniformfv = nullptr; +PFNGLGETNUNIFORMIVPROC glGetnUniformiv = nullptr; +PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv = nullptr; +PFNGLREADNPIXELSPROC glReadnPixels = nullptr; +PFNGLGETNMAPDVPROC glGetnMapdv = nullptr; +PFNGLGETNMAPFVPROC glGetnMapfv = nullptr; +PFNGLGETNMAPIVPROC glGetnMapiv = nullptr; +PFNGLGETNPIXELMAPFVPROC glGetnPixelMapfv = nullptr; +PFNGLGETNPIXELMAPUIVPROC glGetnPixelMapuiv = nullptr; +PFNGLGETNPIXELMAPUSVPROC glGetnPixelMapusv = nullptr; +PFNGLGETNPOLYGONSTIPPLEPROC glGetnPolygonStipple = nullptr; +PFNGLGETNCOLORTABLEPROC glGetnColorTable = nullptr; +PFNGLGETNCONVOLUTIONFILTERPROC glGetnConvolutionFilter = nullptr; +PFNGLGETNSEPARABLEFILTERPROC glGetnSeparableFilter = nullptr; +PFNGLGETNHISTOGRAMPROC glGetnHistogram = nullptr; +PFNGLGETNMINMAXPROC glGetnMinmax = nullptr; +PFNGLTEXTUREBARRIERPROC glTextureBarrier = nullptr; + +// GL_VERSION_4_6 +PFNGLSPECIALIZESHADERPROC glSpecializeShader = nullptr; +PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC glMultiDrawArraysIndirectCount = nullptr; +PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC glMultiDrawElementsIndirectCount = nullptr; +PFNGLPOLYGONOFFSETCLAMPPROC glPolygonOffsetClamp = nullptr; -#if LL_WINDOWS -PFNWGLGETGPUIDSAMDPROC wglGetGPUIDsAMD = NULL; -PFNWGLGETGPUINFOAMDPROC wglGetGPUInfoAMD = NULL; -PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL; -#endif - -#if LL_LINUX_NV_GL_HEADERS -// linux nvidia headers. these define these differently to mesa's. ugh. -PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL; -PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL; -PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = NULL; -#endif // LL_LINUX_NV_GL_HEADERS #endif LLGLManager gGLManager; @@ -594,12 +1109,14 @@ bool LLGLManager::initGL() { parse_glsl_version(mGLSLVersionMajor, mGLSLVersionMinor); -#if LL_DARWIN +#if 0 && LL_DARWIN + // TODO maybe switch to using a core profile for GL 3.2? + // https://stackoverflow.com/a/19868861 //never use GLSL greater than 1.20 on OSX - if (mGLSLVersionMajor > 1 || mGLSLVersionMinor >= 30) + if (mGLSLVersionMajor > 1 || mGLSLVersionMinor > 30) { mGLSLVersionMajor = 1; - mGLSLVersionMinor = 20; + mGLSLVersionMinor = 30; } #endif } @@ -898,7 +1415,7 @@ void LLGLManager::asLLSD(LLSD& info) info["has_compressed_textures"] = mHasCompressedTextures; info["has_framebuffer_object"] = mHasFramebufferObject; info["max_samples"] = mMaxSamples; - info["has_blend_func_separate"] = mHasBlendFuncSeparate; + info["has_blend_func_separate"] = mHasBlendFuncSeparate || LLRender::sGLCoreProfile; // ARB Extensions info["has_vertex_buffer_object"] = mHasVertexBufferObject; @@ -1012,64 +1529,72 @@ void LLGLManager::initExtensions() mHasPointParameters = FALSE; mHasTextureRectangle = FALSE; #else // LL_MESA_HEADLESS //important, gGLHExts.mSysExts is uninitialized until after glh_init_extensions is called - mHasMultitexture = glh_init_extensions("GL_ARB_multitexture"); - mHasATIMemInfo = ExtensionExists("GL_ATI_meminfo", gGLHExts.mSysExts); //Basic AMD method, also see mHasAMDAssociations - mHasNVXMemInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts); - mHasSeparateSpecularColor = glh_init_extensions("GL_EXT_separate_specular_color"); - mHasAnisotropic = glh_init_extensions("GL_EXT_texture_filter_anisotropic"); - glh_init_extensions("GL_ARB_texture_cube_map"); - mHasCubeMap = ExtensionExists("GL_ARB_texture_cube_map", gGLHExts.mSysExts); - mHasARBEnvCombine = ExtensionExists("GL_ARB_texture_env_combine", gGLHExts.mSysExts); - mHasCompressedTextures = glh_init_extensions("GL_ARB_texture_compression"); - mHasOcclusionQuery = ExtensionExists("GL_ARB_occlusion_query", gGLHExts.mSysExts); - mHasTimerQuery = ExtensionExists("GL_ARB_timer_query", gGLHExts.mSysExts); - mHasOcclusionQuery2 = ExtensionExists("GL_ARB_occlusion_query2", gGLHExts.mSysExts); - mHasVertexBufferObject = ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts); - mHasVertexArrayObject = ExtensionExists("GL_ARB_vertex_array_object", gGLHExts.mSysExts); - mHasSync = ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts); - mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts); - mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts); + + mHasMultitexture = TRUE; + mHasCubeMap = TRUE; + mHasCompressedTextures = TRUE; + +#if LL_DARWIN + GLint num_extensions = 0; + std::string all_extensions{""}; + glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); + for(GLint i = 0; i < num_extensions; ++i) { + char const * extension = (char const *)glGetStringi(GL_EXTENSIONS, i); + all_extensions += extension; + all_extensions += ' '; + } + if (num_extensions) + { + all_extensions += "GL_ARB_multitexture GL_ARB_texture_cube_map GL_ARB_texture_compression "; // These are in 3.2 core, but not listed by OSX + gGLHExts.mSysExts = strdup(all_extensions.data()); + } +#endif + + mHasSeparateSpecularColor = ExtensionExists("GL_EXT_separate_specular_color", gGLHExts.mSysExts); + mHasAnisotropic = ExtensionExists("GL_EXT_texture_filter_anisotropic", gGLHExts.mSysExts); + + // In core profile + mHasARBEnvCombine = TRUE; //ExtensionExists("GL_ARB_texture_env_combine", gGLHExts.mSysExts); + mHasTimerQuery = FALSE; //FIXME //ExtensionExists("GL_ARB_timer_query", gGLHExts.mSysExts); + mHasOcclusionQuery = TRUE; //ExtensionExists("GL_ARB_occlusion_query", gGLHExts.mSysExts); + mHasOcclusionQuery2 = TRUE; // ExtensionExists("GL_ARB_occlusion_query2", gGLHExts.mSysExts); + mHasVertexBufferObject = TRUE; //ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts); + mHasVertexArrayObject = TRUE; //ExtensionExists("GL_ARB_vertex_array_object", gGLHExts.mSysExts); + mHasMapBufferRange = TRUE; ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts); + mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts); // Apple has mHasMapBufferRange now + mHasSync = TRUE; //ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts); + mHasFramebufferObject = TRUE; //ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts); + mHassRGBFramebuffer = TRUE; //ExtensionExists("GL_ARB_framebuffer_sRGB", gGLHExts.mSysExts); + mHasDrawBuffers = TRUE; //ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); + mHasTextureRectangle = TRUE; //ExtensionExists("GL_ARB_texture_rectangle", gGLHExts.mSysExts); + mHasTextureMultisample = TRUE; //ExtensionExists("GL_ARB_texture_multisample", gGLHExts.mSysExts); + mHasUniformBufferObject = TRUE; //ExtensionExists("GL_ARB_uniform_buffer_object", gGLHExts.mSysExts); + mHasCubeMapArray = TRUE; //ExtensionExists("GL_ARB_texture_cube_map_array", gGLHExts.mSysExts); + mHasPointParameters = TRUE; //ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); + + mHasATIMemInfo = ExtensionExists("GL_ATI_meminfo", gGLHExts.mSysExts); //Basic AMD method, also see mHasAMDAssociations + mHasNVXMemInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts); // NOTE: Using extensions breaks reflections when Shadows are set to projector. See: SL-16727 //mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); mHasDepthClamp = FALSE; - // mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad -#ifdef GL_ARB_framebuffer_object - mHasFramebufferObject = ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts); -#else - mHasFramebufferObject = ExtensionExists("GL_EXT_framebuffer_object", gGLHExts.mSysExts) && - ExtensionExists("GL_EXT_framebuffer_blit", gGLHExts.mSysExts) && - ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts) && - ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts); -#endif + // mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad + #ifdef GL_EXT_texture_sRGB - mHassRGBTexture = ExtensionExists("GL_EXT_texture_sRGB", gGLHExts.mSysExts); -#endif - -#ifdef GL_ARB_framebuffer_sRGB - mHassRGBFramebuffer = ExtensionExists("GL_ARB_framebuffer_sRGB", gGLHExts.mSysExts); -#else - mHassRGBFramebuffer = ExtensionExists("GL_EXT_framebuffer_sRGB", gGLHExts.mSysExts); + mHassRGBTexture = ExtensionExists("GL_EXT_texture_sRGB", gGLHExts.mSysExts); #endif - + + #ifdef GL_EXT_texture_sRGB_decode mHasTexturesRGBDecode = ExtensionExists("GL_EXT_texture_sRGB_decode", gGLHExts.mSysExts); #else mHasTexturesRGBDecode = ExtensionExists("GL_ARB_texture_sRGB_decode", gGLHExts.mSysExts); #endif - mHasMipMapGeneration = mHasFramebufferObject || mGLVersion >= 1.4f; - - mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); - mHasBlendFuncSeparate = ExtensionExists("GL_EXT_blend_func_separate", gGLHExts.mSysExts); - mHasTextureRectangle = ExtensionExists("GL_ARB_texture_rectangle", gGLHExts.mSysExts); - mHasTextureMultisample = ExtensionExists("GL_ARB_texture_multisample", gGLHExts.mSysExts); - mHasDebugOutput = ExtensionExists("GL_ARB_debug_output", gGLHExts.mSysExts); - mHasTransformFeedback = mGLVersion >= 4.f ? TRUE : FALSE; - mHasUniformBufferObject = ExtensionExists("GL_ARB_uniform_buffer_object", gGLHExts.mSysExts); - mHasCubeMapArray = ExtensionExists("GL_ARB_texture_cube_map_array", gGLHExts.mSysExts); -#if !LL_DARWIN - mHasPointParameters = ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); -#endif + mHasMipMapGeneration = mHasFramebufferObject || mGLVersion >= 1.4f; + + mHasBlendFuncSeparate = ExtensionExists("GL_EXT_blend_func_separate", gGLHExts.mSysExts); + mHasDebugOutput = mGLVersion >= 4.3f ? TRUE : FALSE; + mHasTransformFeedback = mGLVersion >= 4.f ? TRUE : FALSE; #endif #if LL_LINUX @@ -1171,7 +1696,7 @@ void LLGLManager::initExtensions() { LL_INFOS("RenderInit") << "Couldn't initialize GL_ARB_point_parameters" << LL_ENDL; } - if (!mHasBlendFuncSeparate) + if (!mHasBlendFuncSeparate && !LLRender::sGLCoreProfile) { LL_INFOS("RenderInit") << "Couldn't initialize GL_EXT_blend_func_separate" << LL_ENDL; } @@ -1198,280 +1723,772 @@ void LLGLManager::initExtensions() #if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL; - if (mHasVertexBufferObject) - { - glBindBufferARB = (PFNGLBINDBUFFERARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBindBufferARB"); - if (glBindBufferARB) - { - glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteBuffersARB"); - glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGenBuffersARB"); - glIsBufferARB = (PFNGLISBUFFERARBPROC)GLH_EXT_GET_PROC_ADDRESS("glIsBufferARB"); - glBufferDataARB = (PFNGLBUFFERDATAARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBufferDataARB"); - glBufferSubDataARB = (PFNGLBUFFERSUBDATAARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBufferSubDataARB"); - glGetBufferSubDataARB = (PFNGLGETBUFFERSUBDATAARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferSubDataARB"); - glMapBufferARB = (PFNGLMAPBUFFERARBPROC)GLH_EXT_GET_PROC_ADDRESS("glMapBufferARB"); - glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC)GLH_EXT_GET_PROC_ADDRESS("glUnmapBufferARB"); - glGetBufferParameterivARB = (PFNGLGETBUFFERPARAMETERIVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferParameterivARB"); - glGetBufferPointervARB = (PFNGLGETBUFFERPOINTERVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferPointervARB"); - } - else - { - mHasVertexBufferObject = FALSE; - } - } - if (mHasVertexArrayObject) - { - glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) GLH_EXT_GET_PROC_ADDRESS("glBindVertexArray"); - glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteVertexArrays"); - glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenVertexArrays"); - glIsVertexArray = (PFNGLISVERTEXARRAYPROC) GLH_EXT_GET_PROC_ADDRESS("glIsVertexArray"); - } - if (mHasSync) - { - glFenceSync = (PFNGLFENCESYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glFenceSync"); - glIsSync = (PFNGLISSYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glIsSync"); - glDeleteSync = (PFNGLDELETESYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteSync"); - glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glClientWaitSync"); - glWaitSync = (PFNGLWAITSYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glWaitSync"); - glGetInteger64v = (PFNGLGETINTEGER64VPROC) GLH_EXT_GET_PROC_ADDRESS("glGetInteger64v"); - glGetSynciv = (PFNGLGETSYNCIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetSynciv"); - } - if (mHasMapBufferRange) - { - glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glMapBufferRange"); - glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glFlushMappedBufferRange"); - } - if (mHasFramebufferObject) - { - LL_INFOS() << "initExtensions() FramebufferObject-related procs..." << LL_ENDL; - glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsRenderbuffer"); - glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindRenderbuffer"); - glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteRenderbuffers"); - glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenRenderbuffers"); - glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorage"); - glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetRenderbufferParameteriv"); - glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsFramebuffer"); - glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindFramebuffer"); - glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteFramebuffers"); - glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenFramebuffers"); - glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) GLH_EXT_GET_PROC_ADDRESS("glCheckFramebufferStatus"); - glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture1D"); - glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture2D"); - glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture3D"); - glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferRenderbuffer"); - glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetFramebufferAttachmentParameteriv"); - glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) GLH_EXT_GET_PROC_ADDRESS("glGenerateMipmap"); - glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBlitFramebuffer"); - glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorageMultisample"); - glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTextureLayer"); - } - if (mHasDrawBuffers) - { - glDrawBuffersARB = (PFNGLDRAWBUFFERSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDrawBuffersARB"); - } - if (mHasBlendFuncSeparate) - { - glBlendFuncSeparateEXT = (PFNGLBLENDFUNCSEPARATEEXTPROC) GLH_EXT_GET_PROC_ADDRESS("glBlendFuncSeparateEXT"); - } - if (mHasTextureMultisample) - { - glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glTexImage2DMultisample"); - glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glTexImage3DMultisample"); - glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetMultisamplefv"); - glSampleMaski = (PFNGLSAMPLEMASKIPROC) GLH_EXT_GET_PROC_ADDRESS("glSampleMaski"); - } - if (mHasTransformFeedback) - { - glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) GLH_EXT_GET_PROC_ADDRESS("glBeginTransformFeedback"); - glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) GLH_EXT_GET_PROC_ADDRESS("glEndTransformFeedback"); - glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) GLH_EXT_GET_PROC_ADDRESS("glTransformFeedbackVaryings"); - glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glBindBufferRange"); - glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) GLH_EXT_GET_PROC_ADDRESS("glBindBufferBase"); - } - if (mHasDebugOutput) - { - glDebugMessageControlARB = (PFNGLDEBUGMESSAGECONTROLARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageControlARB"); - glDebugMessageInsertARB = (PFNGLDEBUGMESSAGEINSERTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageInsertARB"); - glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageCallbackARB"); - glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetDebugMessageLogARB"); - } -#if (!LL_LINUX) || LL_LINUX_NV_GL_HEADERS - // This is expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah - glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements"); - if (!glDrawRangeElements) - { - mGLMaxVertexRange = 0; - mGLMaxIndexRange = 0; - } + +#if LL_WINDOWS + // WGL_AMD_gpu_association + wglGetGPUIDsAMD = (PFNWGLGETGPUIDSAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetGPUIDsAMD"); + wglGetGPUInfoAMD = (PFNWGLGETGPUINFOAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetGPUInfoAMD"); + wglGetContextGPUIDAMD = (PFNWGLGETCONTEXTGPUIDAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetContextGPUIDAMD"); + wglCreateAssociatedContextAMD = (PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglCreateAssociatedContextAMD"); + wglCreateAssociatedContextAttribsAMD = (PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglCreateAssociatedContextAttribsAMD"); + wglDeleteAssociatedContextAMD = (PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglDeleteAssociatedContextAMD"); + wglMakeAssociatedContextCurrentAMD = (PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglMakeAssociatedContextCurrentAMD"); + wglGetCurrentAssociatedContextAMD = (PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetCurrentAssociatedContextAMD"); + wglBlitContextFramebufferAMD = (PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglBlitContextFramebufferAMD"); + + // WGL_EXT_swap_control + wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLH_EXT_GET_PROC_ADDRESS("wglSwapIntervalEXT"); + wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetSwapIntervalEXT"); + + // WGL_ARB_create_context + wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)GLH_EXT_GET_PROC_ADDRESS("wglCreateContextAttribsARB"); +#endif - // same with glTexImage3D et al + // GL_VERSION_1_2 + glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements"); glTexImage3D = (PFNGLTEXIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glTexImage3D"); + glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glTexSubImage3D"); glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyTexSubImage3D"); -#endif // !LL_LINUX || LL_LINUX_NV_GL_HEADERS -#if LL_LINUX_NV_GL_HEADERS - // nvidia headers are critically different from mesa-esque - glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)GLH_EXT_GET_PROC_ADDRESS("glActiveTextureARB"); - glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)GLH_EXT_GET_PROC_ADDRESS("glClientActiveTextureARB"); -#endif // LL_LINUX_NV_GL_HEADERS - if (mHasOcclusionQuery) - { - LL_INFOS() << "initExtensions() OcclusionQuery-related procs..." << LL_ENDL; - glGenQueriesARB = (PFNGLGENQUERIESARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGenQueriesARB"); - glDeleteQueriesARB = (PFNGLDELETEQUERIESARBPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteQueriesARB"); - glIsQueryARB = (PFNGLISQUERYARBPROC)GLH_EXT_GET_PROC_ADDRESS("glIsQueryARB"); - glBeginQueryARB = (PFNGLBEGINQUERYARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBeginQueryARB"); - glEndQueryARB = (PFNGLENDQUERYARBPROC)GLH_EXT_GET_PROC_ADDRESS("glEndQueryARB"); - glGetQueryivARB = (PFNGLGETQUERYIVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryivARB"); - glGetQueryObjectivARB = (PFNGLGETQUERYOBJECTIVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectivARB"); - glGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectuivARB"); - } - if (mHasTimerQuery) - { - LL_INFOS() << "initExtensions() TimerQuery-related procs..." << LL_ENDL; - glQueryCounter = (PFNGLQUERYCOUNTERPROC) GLH_EXT_GET_PROC_ADDRESS("glQueryCounter"); - glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjecti64v"); - glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectui64v"); - } - if (mHasPointParameters) - { - LL_INFOS() << "initExtensions() PointParameters-related procs..." << LL_ENDL; - glPointParameterfARB = (PFNGLPOINTPARAMETERFARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfARB"); - glPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfvARB"); - } - - if (mHasUniformBufferObject) - { - glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformIndices"); - glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformIndices"); - glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformName"); - glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformBlockIndex"); - glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformBlockiv"); - glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformBlockName"); - glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformBlockBinding"); - } - - // Assume shader capabilities - glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteObjectARB"); - glGetHandleARB = (PFNGLGETHANDLEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetHandleARB"); - glDetachObjectARB = (PFNGLDETACHOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDetachObjectARB"); - glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCreateShaderObjectARB"); - glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glShaderSourceARB"); - glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCompileShaderARB"); - glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glCreateProgramObjectARB"); - glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glAttachObjectARB"); - glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glLinkProgramARB"); - glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUseProgramObjectARB"); - glValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glValidateProgramARB"); - glUniform1fARB = (PFNGLUNIFORM1FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1fARB"); - glUniform2fARB = (PFNGLUNIFORM2FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2fARB"); - glUniform3fARB = (PFNGLUNIFORM3FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3fARB"); - glUniform4fARB = (PFNGLUNIFORM4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4fARB"); - glUniform1iARB = (PFNGLUNIFORM1IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1iARB"); - glUniform2iARB = (PFNGLUNIFORM2IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2iARB"); - glUniform3iARB = (PFNGLUNIFORM3IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3iARB"); - glUniform4iARB = (PFNGLUNIFORM4IARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4iARB"); - glUniform1fvARB = (PFNGLUNIFORM1FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1fvARB"); - glUniform2fvARB = (PFNGLUNIFORM2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2fvARB"); - glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3fvARB"); - glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4fvARB"); - glUniform1ivARB = (PFNGLUNIFORM1IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform1ivARB"); - glUniform2ivARB = (PFNGLUNIFORM2IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform2ivARB"); - glUniform3ivARB = (PFNGLUNIFORM3IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform3ivARB"); - glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniform4ivARB"); - glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2fvARB"); - glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3fvARB"); - glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x4fv"); - glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4fvARB"); - glGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterfvARB"); - glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetObjectParameterivARB"); - glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetInfoLogARB"); - glGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttachedObjectsARB"); - glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformLocationARB"); - glGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformARB"); - glGetUniformfvARB = (PFNGLGETUNIFORMFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformfvARB"); - glGetUniformivARB = (PFNGLGETUNIFORMIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetUniformivARB"); - glGetShaderSourceARB = (PFNGLGETSHADERSOURCEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetShaderSourceARB"); - - LL_INFOS() << "initExtensions() VertexShader-related procs..." << LL_ENDL; - - // nSight doesn't support use of ARB funcs that have been normalized in the API - if (!LLRender::sNsightDebugSupport) - { - glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocationARB"); - glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocationARB"); - } - else - { - glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocation"); - glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocation"); - } - - glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttribARB"); - glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dARB"); - glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dvARB"); - glVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fARB"); - glVertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fvARB"); - glVertexAttrib1sARB = (PFNGLVERTEXATTRIB1SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1sARB"); - glVertexAttrib1svARB = (PFNGLVERTEXATTRIB1SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1svARB"); - glVertexAttrib2dARB = (PFNGLVERTEXATTRIB2DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dARB"); - glVertexAttrib2dvARB = (PFNGLVERTEXATTRIB2DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dvARB"); - glVertexAttrib2fARB = (PFNGLVERTEXATTRIB2FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fARB"); - glVertexAttrib2fvARB = (PFNGLVERTEXATTRIB2FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fvARB"); - glVertexAttrib2sARB = (PFNGLVERTEXATTRIB2SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2sARB"); - glVertexAttrib2svARB = (PFNGLVERTEXATTRIB2SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2svARB"); - glVertexAttrib3dARB = (PFNGLVERTEXATTRIB3DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dARB"); - glVertexAttrib3dvARB = (PFNGLVERTEXATTRIB3DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dvARB"); - glVertexAttrib3fARB = (PFNGLVERTEXATTRIB3FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fARB"); - glVertexAttrib3fvARB = (PFNGLVERTEXATTRIB3FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fvARB"); - glVertexAttrib3sARB = (PFNGLVERTEXATTRIB3SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3sARB"); - glVertexAttrib3svARB = (PFNGLVERTEXATTRIB3SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3svARB"); - glVertexAttrib4nbvARB = (PFNGLVERTEXATTRIB4NBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nbvARB"); - glVertexAttrib4nivARB = (PFNGLVERTEXATTRIB4NIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nivARB"); - glVertexAttrib4nsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nsvARB"); - glVertexAttrib4nubARB = (PFNGLVERTEXATTRIB4NUBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nubARB"); - glVertexAttrib4nubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nubvARB"); - glVertexAttrib4nuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nuivARB"); - glVertexAttrib4nusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4nusvARB"); - glVertexAttrib4bvARB = (PFNGLVERTEXATTRIB4BVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4bvARB"); - glVertexAttrib4dARB = (PFNGLVERTEXATTRIB4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dARB"); - glVertexAttrib4dvARB = (PFNGLVERTEXATTRIB4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dvARB"); - glVertexAttrib4fARB = (PFNGLVERTEXATTRIB4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fARB"); - glVertexAttrib4fvARB = (PFNGLVERTEXATTRIB4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fvARB"); - glVertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ivARB"); - glVertexAttrib4sARB = (PFNGLVERTEXATTRIB4SARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4sARB"); - glVertexAttrib4svARB = (PFNGLVERTEXATTRIB4SVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4svARB"); - glVertexAttrib4ubvARB = (PFNGLVERTEXATTRIB4UBVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ubvARB"); - glVertexAttrib4uivARB = (PFNGLVERTEXATTRIB4UIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4uivARB"); - glVertexAttrib4usvARB = (PFNGLVERTEXATTRIB4USVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4usvARB"); - glVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttribPointerARB"); - glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttribIPointer"); - glEnableVertexAttribArrayARB = (PFNGLENABLEVERTEXATTRIBARRAYARBPROC) GLH_EXT_GET_PROC_ADDRESS("glEnableVertexAttribArrayARB"); - glDisableVertexAttribArrayARB = (PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDisableVertexAttribArrayARB"); - glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramStringARB"); - glBindProgramARB = (PFNGLBINDPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindProgramARB"); - glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteProgramsARB"); - glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGenProgramsARB"); - glProgramEnvParameter4dARB = (PFNGLPROGRAMENVPARAMETER4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4dARB"); - glProgramEnvParameter4dvARB = (PFNGLPROGRAMENVPARAMETER4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4dvARB"); - glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4fARB"); - glProgramEnvParameter4fvARB = (PFNGLPROGRAMENVPARAMETER4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramEnvParameter4fvARB"); - glProgramLocalParameter4dARB = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4dARB"); - glProgramLocalParameter4dvARB = (PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4dvARB"); - glProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4fARB"); - glProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glProgramLocalParameter4fvARB"); - glGetProgramEnvParameterdvARB = (PFNGLGETPROGRAMENVPARAMETERDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramEnvParameterdvARB"); - glGetProgramEnvParameterfvARB = (PFNGLGETPROGRAMENVPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramEnvParameterfvARB"); - glGetProgramLocalParameterdvARB = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramLocalParameterdvARB"); - glGetProgramLocalParameterfvARB = (PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramLocalParameterfvARB"); - glGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramivARB"); - glGetProgramStringARB = (PFNGLGETPROGRAMSTRINGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetProgramStringARB"); - glGetVertexAttribdvARB = (PFNGLGETVERTEXATTRIBDVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribdvARB"); - glGetVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribfvARB"); - glGetVertexAttribivARB = (PFNGLGETVERTEXATTRIBIVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribivARB"); - glGetVertexAttribPointervARB = (PFNGLGETVERTEXATTRIBPOINTERVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glgetVertexAttribPointervARB"); - glIsProgramARB = (PFNGLISPROGRAMARBPROC) GLH_EXT_GET_PROC_ADDRESS("glIsProgramARB"); + // GL_VERSION_1_3 + glActiveTexture = (PFNGLACTIVETEXTUREPROC)GLH_EXT_GET_PROC_ADDRESS("glActiveTexture"); + glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glSampleCoverage"); + glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexImage3D"); + glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexImage2D"); + glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexImage1D"); + glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexSubImage3D"); + glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexSubImage2D"); + glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTexSubImage1D"); + glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetCompressedTexImage"); + glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)GLH_EXT_GET_PROC_ADDRESS("glClientActiveTexture"); + glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1d"); + glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1dv"); + glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1f"); + glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1fv"); + glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1i"); + glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1iv"); + glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1s"); + glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord1sv"); + glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2d"); + glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2dv"); + glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2f"); + glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2fv"); + glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2i"); + glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2iv"); + glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2s"); + glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord2sv"); + glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3d"); + glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3dv"); + glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3f"); + glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3fv"); + glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3i"); + glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3iv"); + glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3s"); + glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord3sv"); + glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4d"); + glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4dv"); + glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4f"); + glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4fv"); + glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4i"); + glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4iv"); + glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4s"); + glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoord4sv"); + glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC)GLH_EXT_GET_PROC_ADDRESS("glLoadTransposeMatrixf"); + glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC)GLH_EXT_GET_PROC_ADDRESS("glLoadTransposeMatrixd"); + glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC)GLH_EXT_GET_PROC_ADDRESS("glMultTransposeMatrixf"); + glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC)GLH_EXT_GET_PROC_ADDRESS("glMultTransposeMatrixd"); + + // GL_VERSION_1_4 + glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)GLH_EXT_GET_PROC_ADDRESS("glBlendFuncSeparate"); + glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawArrays"); + glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawElements"); + glPointParameterf = (PFNGLPOINTPARAMETERFPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterf"); + glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfv"); + glPointParameteri = (PFNGLPOINTPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameteri"); + glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameteriv"); + glFogCoordf = (PFNGLFOGCOORDFPROC)GLH_EXT_GET_PROC_ADDRESS("glFogCoordf"); + glFogCoordfv = (PFNGLFOGCOORDFVPROC)GLH_EXT_GET_PROC_ADDRESS("glFogCoordfv"); + glFogCoordd = (PFNGLFOGCOORDDPROC)GLH_EXT_GET_PROC_ADDRESS("glFogCoordd"); + glFogCoorddv = (PFNGLFOGCOORDDVPROC)GLH_EXT_GET_PROC_ADDRESS("glFogCoorddv"); + glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC)GLH_EXT_GET_PROC_ADDRESS("glFogCoordPointer"); + glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3b"); + glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3bv"); + glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3d"); + glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3dv"); + glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3f"); + glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3fv"); + glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3i"); + glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3iv"); + glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3s"); + glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3sv"); + glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3ub"); + glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3ubv"); + glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3ui"); + glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3uiv"); + glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3us"); + glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColor3usv"); + glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColorPointer"); + glWindowPos2d = (PFNGLWINDOWPOS2DPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2d"); + glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2dv"); + glWindowPos2f = (PFNGLWINDOWPOS2FPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2f"); + glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2fv"); + glWindowPos2i = (PFNGLWINDOWPOS2IPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2i"); + glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2iv"); + glWindowPos2s = (PFNGLWINDOWPOS2SPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2s"); + glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos2sv"); + glWindowPos3d = (PFNGLWINDOWPOS3DPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3d"); + glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3dv"); + glWindowPos3f = (PFNGLWINDOWPOS3FPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3f"); + glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3fv"); + glWindowPos3i = (PFNGLWINDOWPOS3IPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3i"); + glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3iv"); + glWindowPos3s = (PFNGLWINDOWPOS3SPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3s"); + glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC)GLH_EXT_GET_PROC_ADDRESS("glWindowPos3sv"); + + // GL_VERSION_1_5 + glGenQueries = (PFNGLGENQUERIESPROC)GLH_EXT_GET_PROC_ADDRESS("glGenQueries"); + glDeleteQueries = (PFNGLDELETEQUERIESPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteQueries"); + glIsQuery = (PFNGLISQUERYPROC)GLH_EXT_GET_PROC_ADDRESS("glIsQuery"); + glBeginQuery = (PFNGLBEGINQUERYPROC)GLH_EXT_GET_PROC_ADDRESS("glBeginQuery"); + glEndQuery = (PFNGLENDQUERYPROC)GLH_EXT_GET_PROC_ADDRESS("glEndQuery"); + glGetQueryiv = (PFNGLGETQUERYIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryiv"); + glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectiv"); + glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectuiv"); + glBindBuffer = (PFNGLBINDBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glBindBuffer"); + glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteBuffers"); + glGenBuffers = (PFNGLGENBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glGenBuffers"); + glIsBuffer = (PFNGLISBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glIsBuffer"); + glBufferData = (PFNGLBUFFERDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glBufferData"); + glBufferSubData = (PFNGLBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glBufferSubData"); + glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferSubData"); + glMapBuffer = (PFNGLMAPBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glMapBuffer"); + glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glUnmapBuffer"); + glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferParameteriv"); + glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferPointerv"); + + // GL_VERSION_2_0 + glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)GLH_EXT_GET_PROC_ADDRESS("glBlendEquationSeparate"); + glDrawBuffers = (PFNGLDRAWBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawBuffers"); + glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)GLH_EXT_GET_PROC_ADDRESS("glStencilOpSeparate"); + glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)GLH_EXT_GET_PROC_ADDRESS("glStencilFuncSeparate"); + glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)GLH_EXT_GET_PROC_ADDRESS("glStencilMaskSeparate"); + glAttachShader = (PFNGLATTACHSHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glAttachShader"); + glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocation"); + glCompileShader = (PFNGLCOMPILESHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glCompileShader"); + glCreateProgram = (PFNGLCREATEPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateProgram"); + glCreateShader = (PFNGLCREATESHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateShader"); + glDeleteProgram = (PFNGLDELETEPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteProgram"); + glDeleteShader = (PFNGLDELETESHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteShader"); + glDetachShader = (PFNGLDETACHSHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glDetachShader"); + glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)GLH_EXT_GET_PROC_ADDRESS("glDisableVertexAttribArray"); + glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)GLH_EXT_GET_PROC_ADDRESS("glEnableVertexAttribArray"); + glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttrib"); + glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniform"); + glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)GLH_EXT_GET_PROC_ADDRESS("glGetAttachedShaders"); + glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocation"); + glGetProgramiv = (PFNGLGETPROGRAMIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramiv"); + glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramInfoLog"); + glGetShaderiv = (PFNGLGETSHADERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetShaderiv"); + glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)GLH_EXT_GET_PROC_ADDRESS("glGetShaderInfoLog"); + glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetShaderSource"); + glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformLocation"); + glGetUniformfv = (PFNGLGETUNIFORMFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformfv"); + glGetUniformiv = (PFNGLGETUNIFORMIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformiv"); + glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribdv"); + glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribfv"); + glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribiv"); + glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribPointerv"); + glIsProgram = (PFNGLISPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glIsProgram"); + glIsShader = (PFNGLISSHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glIsShader"); + glLinkProgram = (PFNGLLINKPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glLinkProgram"); + glShaderSource = (PFNGLSHADERSOURCEPROC)GLH_EXT_GET_PROC_ADDRESS("glShaderSource"); + glUseProgram = (PFNGLUSEPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glUseProgram"); + glUniform1f = (PFNGLUNIFORM1FPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1f"); + glUniform2f = (PFNGLUNIFORM2FPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2f"); + glUniform3f = (PFNGLUNIFORM3FPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3f"); + glUniform4f = (PFNGLUNIFORM4FPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4f"); + glUniform1i = (PFNGLUNIFORM1IPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1i"); + glUniform2i = (PFNGLUNIFORM2IPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2i"); + glUniform3i = (PFNGLUNIFORM3IPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3i"); + glUniform4i = (PFNGLUNIFORM4IPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4i"); + glUniform1fv = (PFNGLUNIFORM1FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1fv"); + glUniform2fv = (PFNGLUNIFORM2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2fv"); + glUniform3fv = (PFNGLUNIFORM3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3fv"); + glUniform4fv = (PFNGLUNIFORM4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4fv"); + glUniform1iv = (PFNGLUNIFORM1IVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1iv"); + glUniform2iv = (PFNGLUNIFORM2IVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2iv"); + glUniform3iv = (PFNGLUNIFORM3IVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3iv"); + glUniform4iv = (PFNGLUNIFORM4IVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4iv"); + glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2fv"); + glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3fv"); + glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4fv"); + glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glValidateProgram"); + glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1d"); + glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dv"); + glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1f"); + glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1fv"); + glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1s"); + glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1sv"); + glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2d"); + glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2dv"); + glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2f"); + glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2fv"); + glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2s"); + glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib2sv"); + glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3d"); + glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3dv"); + glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3f"); + glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3fv"); + glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3s"); + glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib3sv"); + glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Nbv"); + glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Niv"); + glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Nsv"); + glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Nub"); + glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Nubv"); + glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Nuiv"); + glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4Nusv"); + glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4bv"); + glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4d"); + glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4dv"); + glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4f"); + glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4fv"); + glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4iv"); + glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4s"); + glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4sv"); + glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4ubv"); + glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4uiv"); + glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib4usv"); + glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribPointer"); + + // GL_VERSION_2_1 + glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2x3fv"); + glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x2fv"); + glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2x4fv"); + glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4x2fv"); + glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x4fv"); + glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4x3fv"); + + // GL_VERSION_3_0 + glColorMaski = (PFNGLCOLORMASKIPROC)GLH_EXT_GET_PROC_ADDRESS("glColorMaski"); + glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBooleani_v"); + glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetIntegeri_v"); + glEnablei = (PFNGLENABLEIPROC)GLH_EXT_GET_PROC_ADDRESS("glEnablei"); + glDisablei = (PFNGLDISABLEIPROC)GLH_EXT_GET_PROC_ADDRESS("glDisablei"); + glIsEnabledi = (PFNGLISENABLEDIPROC)GLH_EXT_GET_PROC_ADDRESS("glIsEnabledi"); + glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glBeginTransformFeedback"); + glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glEndTransformFeedback"); + glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glBindBufferRange"); + glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)GLH_EXT_GET_PROC_ADDRESS("glBindBufferBase"); + glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)GLH_EXT_GET_PROC_ADDRESS("glTransformFeedbackVaryings"); + glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTransformFeedbackVarying"); + glClampColor = (PFNGLCLAMPCOLORPROC)GLH_EXT_GET_PROC_ADDRESS("glClampColor"); + glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)GLH_EXT_GET_PROC_ADDRESS("glBeginConditionalRender"); + glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)GLH_EXT_GET_PROC_ADDRESS("glEndConditionalRender"); + glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribIPointer"); + glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribIiv"); + glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribIuiv"); + glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI1i"); + glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI2i"); + glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI3i"); + glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4i"); + glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI1ui"); + glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI2ui"); + glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI3ui"); + glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4ui"); + glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI1iv"); + glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI2iv"); + glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI3iv"); + glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4iv"); + glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI1uiv"); + glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI2uiv"); + glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI3uiv"); + glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4uiv"); + glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4bv"); + glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4sv"); + glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4ubv"); + glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribI4usv"); + glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformuiv"); + glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glBindFragDataLocation"); + glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glGetFragDataLocation"); + glUniform1ui = (PFNGLUNIFORM1UIPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1ui"); + glUniform2ui = (PFNGLUNIFORM2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2ui"); + glUniform3ui = (PFNGLUNIFORM3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3ui"); + glUniform4ui = (PFNGLUNIFORM4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4ui"); + glUniform1uiv = (PFNGLUNIFORM1UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1uiv"); + glUniform2uiv = (PFNGLUNIFORM2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2uiv"); + glUniform3uiv = (PFNGLUNIFORM3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3uiv"); + glUniform4uiv = (PFNGLUNIFORM4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4uiv"); + glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTexParameterIiv"); + glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTexParameterIuiv"); + glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTexParameterIiv"); + glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTexParameterIuiv"); + glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glClearBufferiv"); + glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glClearBufferuiv"); + glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glClearBufferfv"); + glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)GLH_EXT_GET_PROC_ADDRESS("glClearBufferfi"); + glGetStringi = (PFNGLGETSTRINGIPROC)GLH_EXT_GET_PROC_ADDRESS("glGetStringi"); + glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glIsRenderbuffer"); + glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glBindRenderbuffer"); + glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteRenderbuffers"); + glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glGenRenderbuffers"); + glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorage"); + glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetRenderbufferParameteriv"); + glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glIsFramebuffer"); + glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glBindFramebuffer"); + glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteFramebuffers"); + glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glGenFramebuffers"); + glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)GLH_EXT_GET_PROC_ADDRESS("glCheckFramebufferStatus"); + glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture1D"); + glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture2D"); + glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture3D"); + glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferRenderbuffer"); + glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetFramebufferAttachmentParameteriv"); + glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)GLH_EXT_GET_PROC_ADDRESS("glGenerateMipmap"); + glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glBlitFramebuffer"); + glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorageMultisample"); + glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferTextureLayer"); + glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glMapBufferRange"); + glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glFlushMappedBufferRange"); + glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)GLH_EXT_GET_PROC_ADDRESS("glBindVertexArray"); + glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteVertexArrays"); + glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)GLH_EXT_GET_PROC_ADDRESS("glGenVertexArrays"); + glIsVertexArray = (PFNGLISVERTEXARRAYPROC)GLH_EXT_GET_PROC_ADDRESS("glIsVertexArray"); + + // GL_VERSION_3_1 + glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawArraysInstanced"); + glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawElementsInstanced"); + glTexBuffer = (PFNGLTEXBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glTexBuffer"); + glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glPrimitiveRestartIndex"); + glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyBufferSubData"); + glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformIndices"); + glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformsiv"); + glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformName"); + glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformBlockIndex"); + glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformBlockiv"); + glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveUniformBlockName"); + glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformBlockBinding"); + + // GL_VERSION_3_2 + glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawElementsBaseVertex"); + glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElementsBaseVertex"); + glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawElementsInstancedBaseVertex"); + glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawElementsBaseVertex"); + glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)GLH_EXT_GET_PROC_ADDRESS("glProvokingVertex"); + glFenceSync = (PFNGLFENCESYNCPROC)GLH_EXT_GET_PROC_ADDRESS("glFenceSync"); + glIsSync = (PFNGLISSYNCPROC)GLH_EXT_GET_PROC_ADDRESS("glIsSync"); + glDeleteSync = (PFNGLDELETESYNCPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteSync"); + glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)GLH_EXT_GET_PROC_ADDRESS("glClientWaitSync"); + glWaitSync = (PFNGLWAITSYNCPROC)GLH_EXT_GET_PROC_ADDRESS("glWaitSync"); + glGetInteger64v = (PFNGLGETINTEGER64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetInteger64v"); + glGetSynciv = (PFNGLGETSYNCIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSynciv"); + glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetInteger64i_v"); + glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetBufferParameteri64v"); + glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture"); + glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glTexImage2DMultisample"); + glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glTexImage3DMultisample"); + glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetMultisamplefv"); + glSampleMaski = (PFNGLSAMPLEMASKIPROC)GLH_EXT_GET_PROC_ADDRESS("glSampleMaski"); + + // GL_VERSION_3_3 + glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)GLH_EXT_GET_PROC_ADDRESS("glBindFragDataLocationIndexed"); + glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetFragDataIndex"); + glGenSamplers = (PFNGLGENSAMPLERSPROC)GLH_EXT_GET_PROC_ADDRESS("glGenSamplers"); + glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteSamplers"); + glIsSampler = (PFNGLISSAMPLERPROC)GLH_EXT_GET_PROC_ADDRESS("glIsSampler"); + glBindSampler = (PFNGLBINDSAMPLERPROC)GLH_EXT_GET_PROC_ADDRESS("glBindSampler"); + glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glSamplerParameteri"); + glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glSamplerParameteriv"); + glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)GLH_EXT_GET_PROC_ADDRESS("glSamplerParameterf"); + glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glSamplerParameterfv"); + glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glSamplerParameterIiv"); + glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glSamplerParameterIuiv"); + glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSamplerParameteriv"); + glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSamplerParameterIiv"); + glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSamplerParameterfv"); + glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSamplerParameterIuiv"); + glQueryCounter = (PFNGLQUERYCOUNTERPROC)GLH_EXT_GET_PROC_ADDRESS("glQueryCounter"); + glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjecti64v"); + glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectui64v"); + glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribDivisor"); + glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP1ui"); + glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP1uiv"); + glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP2ui"); + glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP2uiv"); + glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP3ui"); + glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP3uiv"); + glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP4ui"); + glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribP4uiv"); + glVertexP2ui = (PFNGLVERTEXP2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexP2ui"); + glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexP2uiv"); + glVertexP3ui = (PFNGLVERTEXP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexP3ui"); + glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexP3uiv"); + glVertexP4ui = (PFNGLVERTEXP4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexP4ui"); + glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexP4uiv"); + glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP1ui"); + glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP1uiv"); + glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP2ui"); + glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP2uiv"); + glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP3ui"); + glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP3uiv"); + glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP4ui"); + glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTexCoordP4uiv"); + glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP1ui"); + glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP1uiv"); + glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP2ui"); + glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP2uiv"); + glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP3ui"); + glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP3uiv"); + glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP4ui"); + glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiTexCoordP4uiv"); + glNormalP3ui = (PFNGLNORMALP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glNormalP3ui"); + glNormalP3uiv = (PFNGLNORMALP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glNormalP3uiv"); + glColorP3ui = (PFNGLCOLORP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glColorP3ui"); + glColorP3uiv = (PFNGLCOLORP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glColorP3uiv"); + glColorP4ui = (PFNGLCOLORP4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glColorP4ui"); + glColorP4uiv = (PFNGLCOLORP4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glColorP4uiv"); + glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColorP3ui"); + glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glSecondaryColorP3uiv"); + + // GL_VERSION_4_0 + glMinSampleShading = (PFNGLMINSAMPLESHADINGPROC)GLH_EXT_GET_PROC_ADDRESS("glMinSampleShading"); + glBlendEquationi = (PFNGLBLENDEQUATIONIPROC)GLH_EXT_GET_PROC_ADDRESS("glBlendEquationi"); + glBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC)GLH_EXT_GET_PROC_ADDRESS("glBlendEquationSeparatei"); + glBlendFunci = (PFNGLBLENDFUNCIPROC)GLH_EXT_GET_PROC_ADDRESS("glBlendFunci"); + glBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC)GLH_EXT_GET_PROC_ADDRESS("glBlendFuncSeparatei"); + glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawArraysIndirect"); + glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawElementsIndirect"); + glUniform1d = (PFNGLUNIFORM1DPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1d"); + glUniform2d = (PFNGLUNIFORM2DPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2d"); + glUniform3d = (PFNGLUNIFORM3DPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3d"); + glUniform4d = (PFNGLUNIFORM4DPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4d"); + glUniform1dv = (PFNGLUNIFORM1DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform1dv"); + glUniform2dv = (PFNGLUNIFORM2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform2dv"); + glUniform3dv = (PFNGLUNIFORM3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform3dv"); + glUniform4dv = (PFNGLUNIFORM4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniform4dv"); + glUniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2dv"); + glUniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3dv"); + glUniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4dv"); + glUniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2x3dv"); + glUniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix2x4dv"); + glUniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x2dv"); + glUniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix3x4dv"); + glUniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4x2dv"); + glUniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformMatrix4x3dv"); + glGetUniformdv = (PFNGLGETUNIFORMDVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformdv"); + glGetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSubroutineUniformLocation"); + glGetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetSubroutineIndex"); + glGetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveSubroutineUniformiv"); + glGetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveSubroutineUniformName"); + glGetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveSubroutineName"); + glUniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glUniformSubroutinesuiv"); + glGetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetUniformSubroutineuiv"); + glGetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramStageiv"); + glPatchParameteri = (PFNGLPATCHPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glPatchParameteri"); + glPatchParameterfv = (PFNGLPATCHPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glPatchParameterfv"); + glBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glBindTransformFeedback"); + glDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteTransformFeedbacks"); + glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC)GLH_EXT_GET_PROC_ADDRESS("glGenTransformFeedbacks"); + glIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glIsTransformFeedback"); + glPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glPauseTransformFeedback"); + glResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glResumeTransformFeedback"); + glDrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawTransformFeedback"); + glDrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawTransformFeedbackStream"); + glBeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC)GLH_EXT_GET_PROC_ADDRESS("glBeginQueryIndexed"); + glEndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC)GLH_EXT_GET_PROC_ADDRESS("glEndQueryIndexed"); + glGetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryIndexediv"); + + // GL_VERSION_4_1 + glReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC)GLH_EXT_GET_PROC_ADDRESS("glReleaseShaderCompiler"); + glShaderBinary = (PFNGLSHADERBINARYPROC)GLH_EXT_GET_PROC_ADDRESS("glShaderBinary"); + glGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glGetShaderPrecisionFormat"); + glDepthRangef = (PFNGLDEPTHRANGEFPROC)GLH_EXT_GET_PROC_ADDRESS("glDepthRangef"); + glClearDepthf = (PFNGLCLEARDEPTHFPROC)GLH_EXT_GET_PROC_ADDRESS("glClearDepthf"); + glGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramBinary"); + glProgramBinary = (PFNGLPROGRAMBINARYPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramBinary"); + glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramParameteri"); + glUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC)GLH_EXT_GET_PROC_ADDRESS("glUseProgramStages"); + glActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glActiveShaderProgram"); + glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateShaderProgramv"); + glBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC)GLH_EXT_GET_PROC_ADDRESS("glBindProgramPipeline"); + glDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteProgramPipelines"); + glGenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC)GLH_EXT_GET_PROC_ADDRESS("glGenProgramPipelines"); + glIsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC)GLH_EXT_GET_PROC_ADDRESS("glIsProgramPipeline"); + glGetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramPipelineiv"); + glProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1i"); + glProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1iv"); + glProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1f"); + glProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1fv"); + glProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1d"); + glProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1dv"); + glProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1ui"); + glProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform1uiv"); + glProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2i"); + glProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2iv"); + glProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2f"); + glProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2fv"); + glProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2d"); + glProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2dv"); + glProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2ui"); + glProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform2uiv"); + glProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3i"); + glProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3iv"); + glProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3f"); + glProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3fv"); + glProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3d"); + glProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3dv"); + glProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3ui"); + glProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform3uiv"); + glProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4i"); + glProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4iv"); + glProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4f"); + glProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4fv"); + glProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4d"); + glProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4dv"); + glProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4ui"); + glProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniform4uiv"); + glProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix2fv"); + glProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix3fv"); + glProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix4fv"); + glProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix2dv"); + glProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix3dv"); + glProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix4dv"); + glProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix2x3fv"); + glProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix3x2fv"); + glProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix2x4fv"); + glProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix4x2fv"); + glProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix3x4fv"); + glProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix4x3fv"); + glProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix2x3dv"); + glProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix3x2dv"); + glProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix2x4dv"); + glProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix4x2dv"); + glProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix3x4dv"); + glProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glProgramUniformMatrix4x3dv"); + glValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC)GLH_EXT_GET_PROC_ADDRESS("glValidateProgramPipeline"); + glGetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramPipelineInfoLog"); + glVertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL1d"); + glVertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL2d"); + glVertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL3d"); + glVertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL4d"); + glVertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL1dv"); + glVertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL2dv"); + glVertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL3dv"); + glVertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribL4dv"); + glVertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribLPointer"); + glGetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexAttribLdv"); + glViewportArrayv = (PFNGLVIEWPORTARRAYVPROC)GLH_EXT_GET_PROC_ADDRESS("glViewportArrayv"); + glViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC)GLH_EXT_GET_PROC_ADDRESS("glViewportIndexedf"); + glViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC)GLH_EXT_GET_PROC_ADDRESS("glViewportIndexedfv"); + glScissorArrayv = (PFNGLSCISSORARRAYVPROC)GLH_EXT_GET_PROC_ADDRESS("glScissorArrayv"); + glScissorIndexed = (PFNGLSCISSORINDEXEDPROC)GLH_EXT_GET_PROC_ADDRESS("glScissorIndexed"); + glScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC)GLH_EXT_GET_PROC_ADDRESS("glScissorIndexedv"); + glDepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC)GLH_EXT_GET_PROC_ADDRESS("glDepthRangeArrayv"); + glDepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC)GLH_EXT_GET_PROC_ADDRESS("glDepthRangeIndexed"); + glGetFloati_v = (PFNGLGETFLOATI_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetFloati_v"); + glGetDoublei_v = (PFNGLGETDOUBLEI_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetDoublei_v"); + + // GL_VERSION_4_2 + glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawArraysInstancedBaseInstance"); + glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawElementsInstancedBaseInstance"); + glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawElementsInstancedBaseVertexBaseInstance"); + glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetInternalformativ"); + glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetActiveAtomicCounterBufferiv"); + glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)GLH_EXT_GET_PROC_ADDRESS("glBindImageTexture"); + glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)GLH_EXT_GET_PROC_ADDRESS("glMemoryBarrier"); + glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glTexStorage1D"); + glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glTexStorage2D"); + glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glTexStorage3D"); + glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawTransformFeedbackInstanced"); + glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawTransformFeedbackStreamInstanced"); + + // GL_VERSION_4_3 + glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glClearBufferData"); + glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glClearBufferSubData"); + glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)GLH_EXT_GET_PROC_ADDRESS("glDispatchCompute"); + glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)GLH_EXT_GET_PROC_ADDRESS("glDispatchComputeIndirect"); + glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyImageSubData"); + glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glFramebufferParameteri"); + glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetFramebufferParameteriv"); + glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetInternalformati64v"); + glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateTexSubImage"); + glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateTexImage"); + glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateBufferSubData"); + glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateBufferData"); + glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateFramebuffer"); + glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateSubFramebuffer"); + glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawArraysIndirect"); + glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawElementsIndirect"); + glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramInterfaceiv"); + glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramResourceIndex"); + glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramResourceName"); + glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramResourceiv"); + glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramResourceLocation"); + glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetProgramResourceLocationIndex"); + glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)GLH_EXT_GET_PROC_ADDRESS("glShaderStorageBlockBinding"); + glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glTexBufferRange"); + glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glTexStorage2DMultisample"); + glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glTexStorage3DMultisample"); + glTextureView = (PFNGLTEXTUREVIEWPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureView"); + glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glBindVertexBuffer"); + glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribFormat"); + glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribIFormat"); + glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribLFormat"); + glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexAttribBinding"); + glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexBindingDivisor"); + glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)GLH_EXT_GET_PROC_ADDRESS("glDebugMessageControl"); + glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)GLH_EXT_GET_PROC_ADDRESS("glDebugMessageInsert"); + glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)GLH_EXT_GET_PROC_ADDRESS("glDebugMessageCallback"); + glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)GLH_EXT_GET_PROC_ADDRESS("glGetDebugMessageLog"); + glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)GLH_EXT_GET_PROC_ADDRESS("glPushDebugGroup"); + glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)GLH_EXT_GET_PROC_ADDRESS("glPopDebugGroup"); + glObjectLabel = (PFNGLOBJECTLABELPROC)GLH_EXT_GET_PROC_ADDRESS("glObjectLabel"); + glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)GLH_EXT_GET_PROC_ADDRESS("glGetObjectLabel"); + glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)GLH_EXT_GET_PROC_ADDRESS("glObjectPtrLabel"); + glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)GLH_EXT_GET_PROC_ADDRESS("glGetObjectPtrLabel"); + + // GL_VERSION_4_4 + glBufferStorage = (PFNGLBUFFERSTORAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glBufferStorage"); + glClearTexImage = (PFNGLCLEARTEXIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glClearTexImage"); + glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glClearTexSubImage"); + glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)GLH_EXT_GET_PROC_ADDRESS("glBindBuffersBase"); + glBindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glBindBuffersRange"); + glBindTextures = (PFNGLBINDTEXTURESPROC)GLH_EXT_GET_PROC_ADDRESS("glBindTextures"); + glBindSamplers = (PFNGLBINDSAMPLERSPROC)GLH_EXT_GET_PROC_ADDRESS("glBindSamplers"); + glBindImageTextures = (PFNGLBINDIMAGETEXTURESPROC)GLH_EXT_GET_PROC_ADDRESS("glBindImageTextures"); + glBindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glBindVertexBuffers"); + + // GL_VERSION_4_5 + glClipControl = (PFNGLCLIPCONTROLPROC)GLH_EXT_GET_PROC_ADDRESS("glClipControl"); + glCreateTransformFeedbacks = (PFNGLCREATETRANSFORMFEEDBACKSPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateTransformFeedbacks"); + glTransformFeedbackBufferBase = (PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)GLH_EXT_GET_PROC_ADDRESS("glTransformFeedbackBufferBase"); + glTransformFeedbackBufferRange = (PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glTransformFeedbackBufferRange"); + glGetTransformFeedbackiv = (PFNGLGETTRANSFORMFEEDBACKIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTransformFeedbackiv"); + glGetTransformFeedbacki_v = (PFNGLGETTRANSFORMFEEDBACKI_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTransformFeedbacki_v"); + glGetTransformFeedbacki64_v = (PFNGLGETTRANSFORMFEEDBACKI64_VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTransformFeedbacki64_v"); + glCreateBuffers = (PFNGLCREATEBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateBuffers"); + glNamedBufferStorage = (PFNGLNAMEDBUFFERSTORAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedBufferStorage"); + glNamedBufferData = (PFNGLNAMEDBUFFERDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedBufferData"); + glNamedBufferSubData = (PFNGLNAMEDBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedBufferSubData"); + glCopyNamedBufferSubData = (PFNGLCOPYNAMEDBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyNamedBufferSubData"); + glClearNamedBufferData = (PFNGLCLEARNAMEDBUFFERDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glClearNamedBufferData"); + glClearNamedBufferSubData = (PFNGLCLEARNAMEDBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glClearNamedBufferSubData"); + glMapNamedBuffer = (PFNGLMAPNAMEDBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glMapNamedBuffer"); + glMapNamedBufferRange = (PFNGLMAPNAMEDBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glMapNamedBufferRange"); + glUnmapNamedBuffer = (PFNGLUNMAPNAMEDBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glUnmapNamedBuffer"); + glFlushMappedNamedBufferRange = (PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glFlushMappedNamedBufferRange"); + glGetNamedBufferParameteriv = (PFNGLGETNAMEDBUFFERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedBufferParameteriv"); + glGetNamedBufferParameteri64v = (PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedBufferParameteri64v"); + glGetNamedBufferPointerv = (PFNGLGETNAMEDBUFFERPOINTERVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedBufferPointerv"); + glGetNamedBufferSubData = (PFNGLGETNAMEDBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedBufferSubData"); + glCreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateFramebuffers"); + glNamedFramebufferRenderbuffer = (PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferRenderbuffer"); + glNamedFramebufferParameteri = (PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferParameteri"); + glNamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferTexture"); + glNamedFramebufferTextureLayer = (PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferTextureLayer"); + glNamedFramebufferDrawBuffer = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferDrawBuffer"); + glNamedFramebufferDrawBuffers = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferDrawBuffers"); + glNamedFramebufferReadBuffer = (PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedFramebufferReadBuffer"); + glInvalidateNamedFramebufferData = (PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateNamedFramebufferData"); + glInvalidateNamedFramebufferSubData = (PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)GLH_EXT_GET_PROC_ADDRESS("glInvalidateNamedFramebufferSubData"); + glClearNamedFramebufferiv = (PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glClearNamedFramebufferiv"); + glClearNamedFramebufferuiv = (PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glClearNamedFramebufferuiv"); + glClearNamedFramebufferfv = (PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glClearNamedFramebufferfv"); + glClearNamedFramebufferfi = (PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)GLH_EXT_GET_PROC_ADDRESS("glClearNamedFramebufferfi"); + glBlitNamedFramebuffer = (PFNGLBLITNAMEDFRAMEBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glBlitNamedFramebuffer"); + glCheckNamedFramebufferStatus = (PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)GLH_EXT_GET_PROC_ADDRESS("glCheckNamedFramebufferStatus"); + glGetNamedFramebufferParameteriv = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedFramebufferParameteriv"); + glGetNamedFramebufferAttachmentParameteriv = (PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedFramebufferAttachmentParameteriv"); + glCreateRenderbuffers = (PFNGLCREATERENDERBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateRenderbuffers"); + glNamedRenderbufferStorage = (PFNGLNAMEDRENDERBUFFERSTORAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedRenderbufferStorage"); + glNamedRenderbufferStorageMultisample = (PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glNamedRenderbufferStorageMultisample"); + glGetNamedRenderbufferParameteriv = (PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetNamedRenderbufferParameteriv"); + glCreateTextures = (PFNGLCREATETEXTURESPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateTextures"); + glTextureBuffer = (PFNGLTEXTUREBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureBuffer"); + glTextureBufferRange = (PFNGLTEXTUREBUFFERRANGEPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureBufferRange"); + glTextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureStorage1D"); + glTextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureStorage2D"); + glTextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureStorage3D"); + glTextureStorage2DMultisample = (PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureStorage2DMultisample"); + glTextureStorage3DMultisample = (PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureStorage3DMultisample"); + glTextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureSubImage1D"); + glTextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureSubImage2D"); + glTextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureSubImage3D"); + glCompressedTextureSubImage1D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTextureSubImage1D"); + glCompressedTextureSubImage2D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTextureSubImage2D"); + glCompressedTextureSubImage3D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glCompressedTextureSubImage3D"); + glCopyTextureSubImage1D = (PFNGLCOPYTEXTURESUBIMAGE1DPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyTextureSubImage1D"); + glCopyTextureSubImage2D = (PFNGLCOPYTEXTURESUBIMAGE2DPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyTextureSubImage2D"); + glCopyTextureSubImage3D = (PFNGLCOPYTEXTURESUBIMAGE3DPROC)GLH_EXT_GET_PROC_ADDRESS("glCopyTextureSubImage3D"); + glTextureParameterf = (PFNGLTEXTUREPARAMETERFPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureParameterf"); + glTextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureParameterfv"); + glTextureParameteri = (PFNGLTEXTUREPARAMETERIPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureParameteri"); + glTextureParameterIiv = (PFNGLTEXTUREPARAMETERIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureParameterIiv"); + glTextureParameterIuiv = (PFNGLTEXTUREPARAMETERIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureParameterIuiv"); + glTextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureParameteriv"); + glGenerateTextureMipmap = (PFNGLGENERATETEXTUREMIPMAPPROC)GLH_EXT_GET_PROC_ADDRESS("glGenerateTextureMipmap"); + glBindTextureUnit = (PFNGLBINDTEXTUREUNITPROC)GLH_EXT_GET_PROC_ADDRESS("glBindTextureUnit"); + glGetTextureImage = (PFNGLGETTEXTUREIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureImage"); + glGetCompressedTextureImage = (PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetCompressedTextureImage"); + glGetTextureLevelParameterfv = (PFNGLGETTEXTURELEVELPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureLevelParameterfv"); + glGetTextureLevelParameteriv = (PFNGLGETTEXTURELEVELPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureLevelParameteriv"); + glGetTextureParameterfv = (PFNGLGETTEXTUREPARAMETERFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureParameterfv"); + glGetTextureParameterIiv = (PFNGLGETTEXTUREPARAMETERIIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureParameterIiv"); + glGetTextureParameterIuiv = (PFNGLGETTEXTUREPARAMETERIUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureParameterIuiv"); + glGetTextureParameteriv = (PFNGLGETTEXTUREPARAMETERIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureParameteriv"); + glCreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateVertexArrays"); + glDisableVertexArrayAttrib = (PFNGLDISABLEVERTEXARRAYATTRIBPROC)GLH_EXT_GET_PROC_ADDRESS("glDisableVertexArrayAttrib"); + glEnableVertexArrayAttrib = (PFNGLENABLEVERTEXARRAYATTRIBPROC)GLH_EXT_GET_PROC_ADDRESS("glEnableVertexArrayAttrib"); + glVertexArrayElementBuffer = (PFNGLVERTEXARRAYELEMENTBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayElementBuffer"); + glVertexArrayVertexBuffer = (PFNGLVERTEXARRAYVERTEXBUFFERPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayVertexBuffer"); + glVertexArrayVertexBuffers = (PFNGLVERTEXARRAYVERTEXBUFFERSPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayVertexBuffers"); + glVertexArrayAttribBinding = (PFNGLVERTEXARRAYATTRIBBINDINGPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayAttribBinding"); + glVertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayAttribFormat"); + glVertexArrayAttribIFormat = (PFNGLVERTEXARRAYATTRIBIFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayAttribIFormat"); + glVertexArrayAttribLFormat = (PFNGLVERTEXARRAYATTRIBLFORMATPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayAttribLFormat"); + glVertexArrayBindingDivisor = (PFNGLVERTEXARRAYBINDINGDIVISORPROC)GLH_EXT_GET_PROC_ADDRESS("glVertexArrayBindingDivisor"); + glGetVertexArrayiv = (PFNGLGETVERTEXARRAYIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexArrayiv"); + glGetVertexArrayIndexediv = (PFNGLGETVERTEXARRAYINDEXEDIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexArrayIndexediv"); + glGetVertexArrayIndexed64iv = (PFNGLGETVERTEXARRAYINDEXED64IVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetVertexArrayIndexed64iv"); + glCreateSamplers = (PFNGLCREATESAMPLERSPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateSamplers"); + glCreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateProgramPipelines"); + glCreateQueries = (PFNGLCREATEQUERIESPROC)GLH_EXT_GET_PROC_ADDRESS("glCreateQueries"); + glGetQueryBufferObjecti64v = (PFNGLGETQUERYBUFFEROBJECTI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryBufferObjecti64v"); + glGetQueryBufferObjectiv = (PFNGLGETQUERYBUFFEROBJECTIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryBufferObjectiv"); + glGetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryBufferObjectui64v"); + glGetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetQueryBufferObjectuiv"); + glMemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC)GLH_EXT_GET_PROC_ADDRESS("glMemoryBarrierByRegion"); + glGetTextureSubImage = (PFNGLGETTEXTURESUBIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetTextureSubImage"); + glGetCompressedTextureSubImage = (PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetCompressedTextureSubImage"); + glGetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC)GLH_EXT_GET_PROC_ADDRESS("glGetGraphicsResetStatus"); + glGetnCompressedTexImage = (PFNGLGETNCOMPRESSEDTEXIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnCompressedTexImage"); + glGetnTexImage = (PFNGLGETNTEXIMAGEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnTexImage"); + glGetnUniformdv = (PFNGLGETNUNIFORMDVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnUniformdv"); + glGetnUniformfv = (PFNGLGETNUNIFORMFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnUniformfv"); + glGetnUniformiv = (PFNGLGETNUNIFORMIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnUniformiv"); + glGetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnUniformuiv"); + glReadnPixels = (PFNGLREADNPIXELSPROC)GLH_EXT_GET_PROC_ADDRESS("glReadnPixels"); + glGetnMapdv = (PFNGLGETNMAPDVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnMapdv"); + glGetnMapfv = (PFNGLGETNMAPFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnMapfv"); + glGetnMapiv = (PFNGLGETNMAPIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnMapiv"); + glGetnPixelMapfv = (PFNGLGETNPIXELMAPFVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnPixelMapfv"); + glGetnPixelMapuiv = (PFNGLGETNPIXELMAPUIVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnPixelMapuiv"); + glGetnPixelMapusv = (PFNGLGETNPIXELMAPUSVPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnPixelMapusv"); + glGetnPolygonStipple = (PFNGLGETNPOLYGONSTIPPLEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnPolygonStipple"); + glGetnColorTable = (PFNGLGETNCOLORTABLEPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnColorTable"); + glGetnConvolutionFilter = (PFNGLGETNCONVOLUTIONFILTERPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnConvolutionFilter"); + glGetnSeparableFilter = (PFNGLGETNSEPARABLEFILTERPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnSeparableFilter"); + glGetnHistogram = (PFNGLGETNHISTOGRAMPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnHistogram"); + glGetnMinmax = (PFNGLGETNMINMAXPROC)GLH_EXT_GET_PROC_ADDRESS("glGetnMinmax"); + glTextureBarrier = (PFNGLTEXTUREBARRIERPROC)GLH_EXT_GET_PROC_ADDRESS("glTextureBarrier"); + + // GL_VERSION_4_6 + glSpecializeShader = (PFNGLSPECIALIZESHADERPROC)GLH_EXT_GET_PROC_ADDRESS("glSpecializeShader"); + glMultiDrawArraysIndirectCount = (PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawArraysIndirectCount"); + glMultiDrawElementsIndirectCount = (PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)GLH_EXT_GET_PROC_ADDRESS("glMultiDrawElementsIndirectCount"); + glPolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC)GLH_EXT_GET_PROC_ADDRESS("glPolygonOffsetClamp"); + LL_DEBUGS("RenderInit") << "GL Probe: Got symbols" << LL_ENDL; #endif @@ -1613,8 +2630,8 @@ void LLGLState::initClass() // sStateMap[GL_TEXTURE_2D] = GL_TRUE; //make sure multisample defaults to disabled - sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE; - glDisable(GL_MULTISAMPLE_ARB); + sStateMap[GL_MULTISAMPLE] = GL_FALSE; + glDisable(GL_MULTISAMPLE); } //static @@ -1635,7 +2652,7 @@ void LLGLState::resetTextureStates() for (S32 j = maxTextureUnits-1; j >=0; j--) { gGL.getTexUnit(j)->activate(); - glClientActiveTextureARB(GL_TEXTURE0_ARB+j); + glClientActiveTexture(GL_TEXTURE0+j); j == 0 ? gGL.getTexUnit(j)->enable(LLTexUnit::TT_TEXTURE) : gGL.getTexUnit(j)->disable(); } } @@ -1721,12 +2738,12 @@ void LLGLState::checkTextureChannels(const std::string& msg) stop_glerror(); GLint activeTexture; - glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &activeTexture); + glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture); stop_glerror(); BOOL error = FALSE; - if (activeTexture == GL_TEXTURE0_ARB) + if (activeTexture == GL_TEXTURE0) { GLint tex_env_mode = 0; @@ -1749,12 +2766,12 @@ void LLGLState::checkTextureChannels(const std::string& msg) "GL_TEXTURE_2D", "GL_TEXTURE_COORD_ARRAY", "GL_TEXTURE_1D", - "GL_TEXTURE_CUBE_MAP_ARB", + "GL_TEXTURE_CUBE_MAP", "GL_TEXTURE_GEN_S", "GL_TEXTURE_GEN_T", "GL_TEXTURE_GEN_Q", "GL_TEXTURE_GEN_R", - "GL_TEXTURE_RECTANGLE_ARB", + "GL_TEXTURE_RECTANGLE", "GL_TEXTURE_2D_MULTISAMPLE" }; @@ -1763,12 +2780,12 @@ void LLGLState::checkTextureChannels(const std::string& msg) GL_TEXTURE_2D, GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_1D, - GL_TEXTURE_CUBE_MAP_ARB, + GL_TEXTURE_CUBE_MAP, GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_Q, GL_TEXTURE_GEN_R, - GL_TEXTURE_RECTANGLE_ARB, + GL_TEXTURE_RECTANGLE, GL_TEXTURE_2D_MULTISAMPLE }; @@ -1784,7 +2801,7 @@ void LLGLState::checkTextureChannels(const std::string& msg) if (i < gGLManager.mNumTextureUnits) { - glClientActiveTextureARB(GL_TEXTURE0_ARB+i); + glClientActiveTexture(GL_TEXTURE0+i); stop_glerror(); glGetIntegerv(GL_TEXTURE_STACK_DEPTH, &stackDepth); stop_glerror(); @@ -1869,7 +2886,7 @@ void LLGLState::checkTextureChannels(const std::string& msg) stop_glerror(); gGL.getTexUnit(0)->activate(); - glClientActiveTextureARB(GL_TEXTURE0_ARB); + glClientActiveTexture(GL_TEXTURE0); stop_glerror(); if (error) diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index 154f1aa2bd..f2b51fbafb 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -69,7 +69,7 @@ # include "GL/glxext.h" // Use glXGetProcAddressARB instead of glXGetProcAddress - the ARB symbol // is considered 'legacy' but works on more machines. -# define GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddressARB((const GLubyte*)(p)) +# define GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddress((const GLubyte*)(p)) #endif // LL_LINUX && !LL_MESA_HEADLESS #if LL_LINUX && defined(WINGDIAPI) @@ -83,8 +83,8 @@ #if LL_LINUX_NV_GL_HEADERS // Missing functions when using nvidia headers: -extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB; -extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB; +extern PFNGLACTIVETEXTUREPROC glActiveTexture; +extern PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture; extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; #endif // LL_LINUX_NV_GL_HEADERS @@ -95,17 +95,17 @@ extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays; extern PFNGLISVERTEXARRAYPROC glIsVertexArray; // GL_ARB_vertex_buffer_object -extern PFNGLBINDBUFFERARBPROC glBindBufferARB; -extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB; -extern PFNGLGENBUFFERSARBPROC glGenBuffersARB; -extern PFNGLISBUFFERARBPROC glIsBufferARB; -extern PFNGLBUFFERDATAARBPROC glBufferDataARB; -extern PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB; -extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB; -extern PFNGLMAPBUFFERARBPROC glMapBufferARB; -extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB; -extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB; -extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB; +extern PFNGLBINDBUFFERPROC glBindBuffer; +extern PFNGLDELETEBUFFERSPROC glDeleteBuffers; +extern PFNGLGENBUFFERSPROC glGenBuffers; +extern PFNGLISBUFFERPROC glIsBuffer; +extern PFNGLBUFFERDATAPROC glBufferData; +extern PFNGLBUFFERSUBDATAPROC glBufferSubData; +extern PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData; +extern PFNGLMAPBUFFERPROC glMapBuffer; +extern PFNGLUNMAPBUFFERPROC glUnmapBuffer; +extern PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv; +extern PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv; // GL_ARB_sync extern PFNGLFENCESYNCPROC glFenceSync; @@ -140,14 +140,14 @@ extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC glGetVariantArrayObjectfvATI; extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC glGetVariantArrayObjectivATI; // GL_ARB_occlusion_query -extern PFNGLGENQUERIESARBPROC glGenQueriesARB; -extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB; -extern PFNGLISQUERYARBPROC glIsQueryARB; -extern PFNGLBEGINQUERYARBPROC glBeginQueryARB; -extern PFNGLENDQUERYARBPROC glEndQueryARB; -extern PFNGLGETQUERYIVARBPROC glGetQueryivARB; -extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB; -extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB; +extern PFNGLGENQUERIESPROC glGenQueries; +extern PFNGLDELETEQUERIESPROC glDeleteQueries; +extern PFNGLISQUERYPROC glIsQuery; +extern PFNGLBEGINQUERYPROC glBeginQuery; +extern PFNGLENDQUERYPROC glEndQuery; +extern PFNGLGETQUERYIVPROC glGetQueryiv; +extern PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv; +extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv; // GL_ARB_timer_query extern PFNGLQUERYCOUNTERPROC glQueryCounter; @@ -155,121 +155,121 @@ extern PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v; extern PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v; // GL_ARB_point_parameters -extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB; -extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB; +extern PFNGLPOINTPARAMETERFPROC glPointParameterf; +extern PFNGLPOINTPARAMETERFVPROC glPointParameterfv; // GL_ARB_shader_objects -extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB; -extern PFNGLGETHANDLEARBPROC glGetHandleARB; -extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB; -extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB; -extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB; -extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB; -extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB; -extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB; -extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB; -extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB; -extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB; -extern PFNGLUNIFORM1FARBPROC glUniform1fARB; -extern PFNGLUNIFORM2FARBPROC glUniform2fARB; -extern PFNGLUNIFORM3FARBPROC glUniform3fARB; -extern PFNGLUNIFORM4FARBPROC glUniform4fARB; -extern PFNGLUNIFORM1IARBPROC glUniform1iARB; -extern PFNGLUNIFORM2IARBPROC glUniform2iARB; -extern PFNGLUNIFORM3IARBPROC glUniform3iARB; -extern PFNGLUNIFORM4IARBPROC glUniform4iARB; -extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB; -extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB; -extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB; -extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB; -extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB; -extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB; -extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB; -extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB; -extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB; -extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB; +extern PFNGLDELETEOBJECTPROC glDeleteObject; +extern PFNGLGETHANDLEPROC glGetHandle; +extern PFNGLDETACHOBJECTPROC glDetachObject; +extern PFNGLCREATESHADEROBJECTPROC glCreateShaderObject; +extern PFNGLSHADERSOURCEPROC glShaderSource; +extern PFNGLCOMPILESHADERPROC glCompileShader; +extern PFNGLCREATEPROGRAMOBJECTPROC glCreateProgramObject; +extern PFNGLATTACHOBJECTPROC glAttachObject; +extern PFNGLLINKPROGRAMPROC glLinkProgram; +extern PFNGLUSEPROGRAMOBJECTPROC glUseProgramObject; +extern PFNGLVALIDATEPROGRAMPROC glValidateProgram; +extern PFNGLUNIFORM1FPROC glUniform1f; +extern PFNGLUNIFORM2FPROC glUniform2f; +extern PFNGLUNIFORM3FPROC glUniform3f; +extern PFNGLUNIFORM4FPROC glUniform4f; +extern PFNGLUNIFORM1IPROC glUniform1i; +extern PFNGLUNIFORM2IPROC glUniform2i; +extern PFNGLUNIFORM3IPROC glUniform3i; +extern PFNGLUNIFORM4IPROC glUniform4i; +extern PFNGLUNIFORM1FVPROC glUniform1fv; +extern PFNGLUNIFORM2FVPROC glUniform2fv; +extern PFNGLUNIFORM3FVPROC glUniform3fv; +extern PFNGLUNIFORM4FVPROC glUniform4fv; +extern PFNGLUNIFORM1IVPROC glUniform1iv; +extern PFNGLUNIFORM2IVPROC glUniform2iv; +extern PFNGLUNIFORM3IVPROC glUniform3iv; +extern PFNGLUNIFORM4IVPROC glUniform4iv; +extern PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv; +extern PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv; extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv; -extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB; -extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB; -extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB; -extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB; -extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB; -extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB; -extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB; -extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB; -extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB; -extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB; +extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv; +extern PFNGLGETOBJECTPARAMETERFVPROC glGetObjectParameterfv; +extern PFNGLGETOBJECTPARAMETERIVPROC glGetObjectParameteriv; +extern PFNGLGETINFOLOGPROC glGetInfoLog; +extern PFNGLGETATTACHEDOBJECTSPROC glGetAttachedObjects; +extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation; +extern PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform; +extern PFNGLGETUNIFORMFVPROC glGetUniformfv; +extern PFNGLGETUNIFORMIVPROC glGetUniformiv; +extern PFNGLGETSHADERSOURCEPROC glGetShaderSource; // GL_ARB_vertex_shader -extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB; -extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB; -extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB; -extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB; -extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB; -extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB; -extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB; -extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB; -extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB; -extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB; -extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB; -extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB; -extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB; -extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB; -extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB; -extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB; -extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB; -extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB; -extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB; -extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB; -extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB; -extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB; -extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB; -extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB; -extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB; -extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB; -extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB; -extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB; -extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB; -extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB; -extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB; -extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB; -extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB; -extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB; -extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB; -extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB; -extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB; +extern PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d; +extern PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv; +extern PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f; +extern PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv; +extern PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s; +extern PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv; +extern PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d; +extern PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv; +extern PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f; +extern PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv; +extern PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s; +extern PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv; +extern PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d; +extern PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv; +extern PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f; +extern PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv; +extern PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s; +extern PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv; +extern PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4nbv; +extern PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4niv; +extern PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4nsv; +extern PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4nub; +extern PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4nubv; +extern PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4nuiv; +extern PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4nusv; +extern PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv; +extern PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d; +extern PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv; +extern PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f; +extern PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv; +extern PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv; +extern PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s; +extern PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv; +extern PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv; +extern PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv; +extern PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv; +extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer; extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer; -extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB; -extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB; -extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB; -extern PFNGLBINDPROGRAMARBPROC glBindProgramARB; -extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB; -extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB; -extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB; -extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB; -extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB; -extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB; -extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB; -extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB; -extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB; -extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB; -extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB; -extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB; -extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB; -extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB; -extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB; -extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB; -extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB; -extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB; -extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB; -extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB; -extern PFNGLISPROGRAMARBPROC glIsProgramARB; -extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB; -extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB; -extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB; - -extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB; -extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB; +extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; +extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray; +extern PFNGLPROGRAMSTRINGPROC glProgramString; +extern PFNGLBINDPROGRAMPROC glBindProgram; +extern PFNGLDELETEPROGRAMSPROC glDeletePrograms; +extern PFNGLGENPROGRAMSPROC glGenPrograms; +extern PFNGLPROGRAMENVPARAMETER4DPROC glProgramEnvParameter4d; +extern PFNGLPROGRAMENVPARAMETER4DVPROC glProgramEnvParameter4dv; +extern PFNGLPROGRAMENVPARAMETER4FPROC glProgramEnvParameter4f; +extern PFNGLPROGRAMENVPARAMETER4FVPROC glProgramEnvParameter4fv; +extern PFNGLPROGRAMLOCALPARAMETER4DPROC glProgramLocalParameter4d; +extern PFNGLPROGRAMLOCALPARAMETER4DVPROC glProgramLocalParameter4dv; +extern PFNGLPROGRAMLOCALPARAMETER4FPROC glProgramLocalParameter4f; +extern PFNGLPROGRAMLOCALPARAMETER4FVPROC glProgramLocalParameter4fv; +extern PFNGLGETPROGRAMENVPARAMETERDVPROC glGetProgramEnvParameterdv; +extern PFNGLGETPROGRAMENVPARAMETERFVPROC glGetProgramEnvParameterfv; +extern PFNGLGETPROGRAMLOCALPARAMETERDVPROC glGetProgramLocalParameterdv; +extern PFNGLGETPROGRAMLOCALPARAMETERFVPROC glGetProgramLocalParameterfv; +extern PFNGLGETPROGRAMIVPROC glGetProgramiv; +extern PFNGLGETPROGRAMSTRINGPROC glGetProgramString; +extern PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv; +extern PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv; +extern PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv; +extern PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv; +extern PFNGLISPROGRAMPROC glIsProgram; +extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation; +extern PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib; +extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; + +extern PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D; +extern PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage; //GL_EXT_blend_func_separate extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT; @@ -297,7 +297,7 @@ extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; //GL_ARB_draw_buffers -extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB; +extern PFNGLDRAWBUFFERSPROC glDrawBuffers; //GL_ARB_texture_multisample extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample; @@ -312,7 +312,6 @@ extern PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings; extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange; extern PFNGLBINDBUFFERBASEPROC glBindBufferBase; - #elif LL_WINDOWS //---------------------------------------------------------------------------- // LL_WINDOWS @@ -328,250 +327,768 @@ extern PFNGLBINDBUFFERBASEPROC glBindBufferBase; #include "GL/glext.h" #include "GL/glh_extensions.h" +// WGL_AMD_gpu_association +extern PFNWGLGETGPUIDSAMDPROC wglGetGPUIDsAMD; +extern PFNWGLGETGPUINFOAMDPROC wglGetGPUInfoAMD; +extern PFNWGLGETCONTEXTGPUIDAMDPROC wglGetContextGPUIDAMD; +extern PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC wglCreateAssociatedContextAMD; +extern PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC wglCreateAssociatedContextAttribsAMD; +extern PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC wglDeleteAssociatedContextAMD; +extern PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC wglMakeAssociatedContextCurrentAMD; +extern PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC wglGetCurrentAssociatedContextAMD; +extern PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC wglBlitContextFramebufferAMD; + +// WGL_EXT_swap_control +extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT; +extern PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT; + // WGL_ARB_create_context extern PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB; -extern PFNGLGETSTRINGIPROC glGetStringi; - -// GL_ARB_vertex_buffer_object -extern PFNGLBINDBUFFERARBPROC glBindBufferARB; -extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB; -extern PFNGLGENBUFFERSARBPROC glGenBuffersARB; -extern PFNGLISBUFFERARBPROC glIsBufferARB; -extern PFNGLBUFFERDATAARBPROC glBufferDataARB; -extern PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB; -extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB; -extern PFNGLMAPBUFFERARBPROC glMapBufferARB; -extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB; -extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB; -extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB; - -// GL_ARB_vertex_array_object -extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray; -extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays; -extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays; -extern PFNGLISVERTEXARRAYPROC glIsVertexArray; - -// GL_ARB_sync -extern PFNGLFENCESYNCPROC glFenceSync; -extern PFNGLISSYNCPROC glIsSync; -extern PFNGLDELETESYNCPROC glDeleteSync; -extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync; -extern PFNGLWAITSYNCPROC glWaitSync; -extern PFNGLGETINTEGER64VPROC glGetInteger64v; -extern PFNGLGETSYNCIVPROC glGetSynciv; - -// GL_APPLE_flush_buffer_range -extern PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE; -extern PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE; - -// GL_ARB_map_buffer_range -extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange; -extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange; - -// GL_ATI_vertex_array_object -extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI; -extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI; -extern PFNGLUPDATEOBJECTBUFFERATIPROC glUpdateObjectBufferATI; -extern PFNGLGETOBJECTBUFFERFVATIPROC glGetObjectBufferfvATI; -extern PFNGLGETOBJECTBUFFERIVATIPROC glGetObjectBufferivATI; -extern PFNGLFREEOBJECTBUFFERATIPROC glFreeObjectBufferATI; -extern PFNGLARRAYOBJECTATIPROC glArrayObjectATI; -extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC glVertexAttribArrayObjectATI; -extern PFNGLGETARRAYOBJECTFVATIPROC glGetArrayObjectfvATI; -extern PFNGLGETARRAYOBJECTIVATIPROC glGetArrayObjectivATI; -extern PFNGLVARIANTARRAYOBJECTATIPROC glVariantObjectArrayATI; -extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC glGetVariantArrayObjectfvATI; -extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC glGetVariantArrayObjectivATI; - -extern PFNWGLGETGPUIDSAMDPROC wglGetGPUIDsAMD; -extern PFNWGLGETGPUINFOAMDPROC wglGetGPUInfoAMD; -extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT; - -// GL_ARB_occlusion_query -extern PFNGLGENQUERIESARBPROC glGenQueriesARB; -extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB; -extern PFNGLISQUERYARBPROC glIsQueryARB; -extern PFNGLBEGINQUERYARBPROC glBeginQueryARB; -extern PFNGLENDQUERYARBPROC glEndQueryARB; -extern PFNGLGETQUERYIVARBPROC glGetQueryivARB; -extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB; -extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB; - -// GL_ARB_timer_query -extern PFNGLQUERYCOUNTERPROC glQueryCounter; -extern PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v; -extern PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v; - - -// GL_ARB_point_parameters -extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB; -extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB; -// GL_ARB_shader_objects -extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB; -extern PFNGLGETHANDLEARBPROC glGetHandleARB; -extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB; -extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB; -extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB; -extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB; -extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB; -extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB; -extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB; -extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB; -extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB; -extern PFNGLUNIFORM1FARBPROC glUniform1fARB; -extern PFNGLUNIFORM2FARBPROC glUniform2fARB; -extern PFNGLUNIFORM3FARBPROC glUniform3fARB; -extern PFNGLUNIFORM4FARBPROC glUniform4fARB; -extern PFNGLUNIFORM1IARBPROC glUniform1iARB; -extern PFNGLUNIFORM2IARBPROC glUniform2iARB; -extern PFNGLUNIFORM3IARBPROC glUniform3iARB; -extern PFNGLUNIFORM4IARBPROC glUniform4iARB; -extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB; -extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB; -extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB; -extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB; -extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB; -extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB; -extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB; -extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB; -extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB; -extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB; +// GL_VERSION_1_2 +//extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; +//extern PFNGLTEXIMAGE3DPROC glTexImage3D; +//extern PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D; +//extern PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D; + +// GL_VERSION_1_3 +extern PFNGLACTIVETEXTUREPROC glActiveTexture; +extern PFNGLSAMPLECOVERAGEPROC glSampleCoverage; +extern PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D; +extern PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D; +extern PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D; +extern PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D; +extern PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D; +extern PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D; +extern PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage; +extern PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture; +extern PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d; +extern PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv; +extern PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f; +extern PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv; +extern PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i; +extern PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv; +extern PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s; +extern PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv; +extern PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d; +extern PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv; +extern PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f; +extern PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv; +extern PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i; +extern PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv; +extern PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s; +extern PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv; +extern PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d; +extern PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv; +extern PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f; +extern PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv; +extern PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i; +extern PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv; +extern PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s; +extern PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv; +extern PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d; +extern PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv; +extern PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f; +extern PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv; +extern PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i; +extern PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv; +extern PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s; +extern PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv; +extern PFNGLLOADTRANSPOSEMATRIXFPROC glLoadTransposeMatrixf; +extern PFNGLLOADTRANSPOSEMATRIXDPROC glLoadTransposeMatrixd; +extern PFNGLMULTTRANSPOSEMATRIXFPROC glMultTransposeMatrixf; +extern PFNGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd; + +// GL_VERSION_1_4 +extern PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate; +extern PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays; +extern PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements; +extern PFNGLPOINTPARAMETERFPROC glPointParameterf; +extern PFNGLPOINTPARAMETERFVPROC glPointParameterfv; +extern PFNGLPOINTPARAMETERIPROC glPointParameteri; +extern PFNGLPOINTPARAMETERIVPROC glPointParameteriv; +extern PFNGLFOGCOORDFPROC glFogCoordf; +extern PFNGLFOGCOORDFVPROC glFogCoordfv; +extern PFNGLFOGCOORDDPROC glFogCoordd; +extern PFNGLFOGCOORDDVPROC glFogCoorddv; +extern PFNGLFOGCOORDPOINTERPROC glFogCoordPointer; +extern PFNGLSECONDARYCOLOR3BPROC glSecondaryColor3b; +extern PFNGLSECONDARYCOLOR3BVPROC glSecondaryColor3bv; +extern PFNGLSECONDARYCOLOR3DPROC glSecondaryColor3d; +extern PFNGLSECONDARYCOLOR3DVPROC glSecondaryColor3dv; +extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f; +extern PFNGLSECONDARYCOLOR3FVPROC glSecondaryColor3fv; +extern PFNGLSECONDARYCOLOR3IPROC glSecondaryColor3i; +extern PFNGLSECONDARYCOLOR3IVPROC glSecondaryColor3iv; +extern PFNGLSECONDARYCOLOR3SPROC glSecondaryColor3s; +extern PFNGLSECONDARYCOLOR3SVPROC glSecondaryColor3sv; +extern PFNGLSECONDARYCOLOR3UBPROC glSecondaryColor3ub; +extern PFNGLSECONDARYCOLOR3UBVPROC glSecondaryColor3ubv; +extern PFNGLSECONDARYCOLOR3UIPROC glSecondaryColor3ui; +extern PFNGLSECONDARYCOLOR3UIVPROC glSecondaryColor3uiv; +extern PFNGLSECONDARYCOLOR3USPROC glSecondaryColor3us; +extern PFNGLSECONDARYCOLOR3USVPROC glSecondaryColor3usv; +extern PFNGLSECONDARYCOLORPOINTERPROC glSecondaryColorPointer; +extern PFNGLWINDOWPOS2DPROC glWindowPos2d; +extern PFNGLWINDOWPOS2DVPROC glWindowPos2dv; +extern PFNGLWINDOWPOS2FPROC glWindowPos2f; +extern PFNGLWINDOWPOS2FVPROC glWindowPos2fv; +extern PFNGLWINDOWPOS2IPROC glWindowPos2i; +extern PFNGLWINDOWPOS2IVPROC glWindowPos2iv; +extern PFNGLWINDOWPOS2SPROC glWindowPos2s; +extern PFNGLWINDOWPOS2SVPROC glWindowPos2sv; +extern PFNGLWINDOWPOS3DPROC glWindowPos3d; +extern PFNGLWINDOWPOS3DVPROC glWindowPos3dv; +extern PFNGLWINDOWPOS3FPROC glWindowPos3f; +extern PFNGLWINDOWPOS3FVPROC glWindowPos3fv; +extern PFNGLWINDOWPOS3IPROC glWindowPos3i; +extern PFNGLWINDOWPOS3IVPROC glWindowPos3iv; +extern PFNGLWINDOWPOS3SPROC glWindowPos3s; +extern PFNGLWINDOWPOS3SVPROC glWindowPos3sv; + +// GL_VERSION_1_5 +extern PFNGLGENQUERIESPROC glGenQueries; +extern PFNGLDELETEQUERIESPROC glDeleteQueries; +extern PFNGLISQUERYPROC glIsQuery; +extern PFNGLBEGINQUERYPROC glBeginQuery; +extern PFNGLENDQUERYPROC glEndQuery; +extern PFNGLGETQUERYIVPROC glGetQueryiv; +extern PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv; +extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv; +extern PFNGLBINDBUFFERPROC glBindBuffer; +extern PFNGLDELETEBUFFERSPROC glDeleteBuffers; +extern PFNGLGENBUFFERSPROC glGenBuffers; +extern PFNGLISBUFFERPROC glIsBuffer; +extern PFNGLBUFFERDATAPROC glBufferData; +extern PFNGLBUFFERSUBDATAPROC glBufferSubData; +extern PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData; +extern PFNGLMAPBUFFERPROC glMapBuffer; +extern PFNGLUNMAPBUFFERPROC glUnmapBuffer; +extern PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv; +extern PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv; + +// GL_VERSION_2_0 +extern PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate; +extern PFNGLDRAWBUFFERSPROC glDrawBuffers; +extern PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate; +extern PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate; +extern PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate; +extern PFNGLATTACHSHADERPROC glAttachShader; +extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation; +extern PFNGLCOMPILESHADERPROC glCompileShader; +extern PFNGLCREATEPROGRAMPROC glCreateProgram; +extern PFNGLCREATESHADERPROC glCreateShader; +extern PFNGLDELETEPROGRAMPROC glDeleteProgram; +extern PFNGLDELETESHADERPROC glDeleteShader; +extern PFNGLDETACHSHADERPROC glDetachShader; +extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray; +extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; +extern PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib; +extern PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform; +extern PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders; +extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; +extern PFNGLGETPROGRAMIVPROC glGetProgramiv; +extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog; +extern PFNGLGETSHADERIVPROC glGetShaderiv; +extern PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog; +extern PFNGLGETSHADERSOURCEPROC glGetShaderSource; +extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation; +extern PFNGLGETUNIFORMFVPROC glGetUniformfv; +extern PFNGLGETUNIFORMIVPROC glGetUniformiv; +extern PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv; +extern PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv; +extern PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv; +extern PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv; +extern PFNGLISPROGRAMPROC glIsProgram; +extern PFNGLISSHADERPROC glIsShader; +extern PFNGLLINKPROGRAMPROC glLinkProgram; +extern PFNGLSHADERSOURCEPROC glShaderSource; +extern PFNGLUSEPROGRAMPROC glUseProgram; +extern PFNGLUNIFORM1FPROC glUniform1f; +extern PFNGLUNIFORM2FPROC glUniform2f; +extern PFNGLUNIFORM3FPROC glUniform3f; +extern PFNGLUNIFORM4FPROC glUniform4f; +extern PFNGLUNIFORM1IPROC glUniform1i; +extern PFNGLUNIFORM2IPROC glUniform2i; +extern PFNGLUNIFORM3IPROC glUniform3i; +extern PFNGLUNIFORM4IPROC glUniform4i; +extern PFNGLUNIFORM1FVPROC glUniform1fv; +extern PFNGLUNIFORM2FVPROC glUniform2fv; +extern PFNGLUNIFORM3FVPROC glUniform3fv; +extern PFNGLUNIFORM4FVPROC glUniform4fv; +extern PFNGLUNIFORM1IVPROC glUniform1iv; +extern PFNGLUNIFORM2IVPROC glUniform2iv; +extern PFNGLUNIFORM3IVPROC glUniform3iv; +extern PFNGLUNIFORM4IVPROC glUniform4iv; +extern PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv; +extern PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv; +extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv; +extern PFNGLVALIDATEPROGRAMPROC glValidateProgram; +extern PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d; +extern PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv; +extern PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f; +extern PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv; +extern PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s; +extern PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv; +extern PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d; +extern PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv; +extern PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f; +extern PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv; +extern PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s; +extern PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv; +extern PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d; +extern PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv; +extern PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f; +extern PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv; +extern PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s; +extern PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv; +extern PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv; +extern PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv; +extern PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv; +extern PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub; +extern PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv; +extern PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv; +extern PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv; +extern PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv; +extern PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d; +extern PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv; +extern PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f; +extern PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv; +extern PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv; +extern PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s; +extern PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv; +extern PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv; +extern PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv; +extern PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv; +extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer; + +// GL_VERSION_2_1 +extern PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv; +extern PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv; +extern PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv; +extern PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv; extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv; -extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB; -extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB; -extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB; -extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB; -extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB; -extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB; -extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB; -extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB; -extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB; -extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB; +extern PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv; + +// GL_VERSION_3_0 +extern PFNGLCOLORMASKIPROC glColorMaski; +extern PFNGLGETBOOLEANI_VPROC glGetBooleani_v; +extern PFNGLGETINTEGERI_VPROC glGetIntegeri_v; +extern PFNGLENABLEIPROC glEnablei; +extern PFNGLDISABLEIPROC glDisablei; +extern PFNGLISENABLEDIPROC glIsEnabledi; +extern PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback; +extern PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback; +extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange; +extern PFNGLBINDBUFFERBASEPROC glBindBufferBase; +extern PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings; +extern PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying; +extern PFNGLCLAMPCOLORPROC glClampColor; +extern PFNGLBEGINCONDITIONALRENDERPROC glBeginConditionalRender; +extern PFNGLENDCONDITIONALRENDERPROC glEndConditionalRender; +extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer; +extern PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv; +extern PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv; +extern PFNGLVERTEXATTRIBI1IPROC glVertexAttribI1i; +extern PFNGLVERTEXATTRIBI2IPROC glVertexAttribI2i; +extern PFNGLVERTEXATTRIBI3IPROC glVertexAttribI3i; +extern PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i; +extern PFNGLVERTEXATTRIBI1UIPROC glVertexAttribI1ui; +extern PFNGLVERTEXATTRIBI2UIPROC glVertexAttribI2ui; +extern PFNGLVERTEXATTRIBI3UIPROC glVertexAttribI3ui; +extern PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui; +extern PFNGLVERTEXATTRIBI1IVPROC glVertexAttribI1iv; +extern PFNGLVERTEXATTRIBI2IVPROC glVertexAttribI2iv; +extern PFNGLVERTEXATTRIBI3IVPROC glVertexAttribI3iv; +extern PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv; +extern PFNGLVERTEXATTRIBI1UIVPROC glVertexAttribI1uiv; +extern PFNGLVERTEXATTRIBI2UIVPROC glVertexAttribI2uiv; +extern PFNGLVERTEXATTRIBI3UIVPROC glVertexAttribI3uiv; +extern PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv; +extern PFNGLVERTEXATTRIBI4BVPROC glVertexAttribI4bv; +extern PFNGLVERTEXATTRIBI4SVPROC glVertexAttribI4sv; +extern PFNGLVERTEXATTRIBI4UBVPROC glVertexAttribI4ubv; +extern PFNGLVERTEXATTRIBI4USVPROC glVertexAttribI4usv; +extern PFNGLGETUNIFORMUIVPROC glGetUniformuiv; +extern PFNGLBINDFRAGDATALOCATIONPROC glBindFragDataLocation; +extern PFNGLGETFRAGDATALOCATIONPROC glGetFragDataLocation; +extern PFNGLUNIFORM1UIPROC glUniform1ui; +extern PFNGLUNIFORM2UIPROC glUniform2ui; +extern PFNGLUNIFORM3UIPROC glUniform3ui; +extern PFNGLUNIFORM4UIPROC glUniform4ui; +extern PFNGLUNIFORM1UIVPROC glUniform1uiv; +extern PFNGLUNIFORM2UIVPROC glUniform2uiv; +extern PFNGLUNIFORM3UIVPROC glUniform3uiv; +extern PFNGLUNIFORM4UIVPROC glUniform4uiv; +extern PFNGLTEXPARAMETERIIVPROC glTexParameterIiv; +extern PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv; +extern PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv; +extern PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv; +extern PFNGLCLEARBUFFERIVPROC glClearBufferiv; +extern PFNGLCLEARBUFFERUIVPROC glClearBufferuiv; +extern PFNGLCLEARBUFFERFVPROC glClearBufferfv; +extern PFNGLCLEARBUFFERFIPROC glClearBufferfi; +extern PFNGLGETSTRINGIPROC glGetStringi; +extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer; +extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; +extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; +extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; +extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; +extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv; +extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer; +extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; +extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; +extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; +extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; +extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D; +extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; +extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D; +extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; +extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; +extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap; +extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; +extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; +extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; +extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange; +extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange; +extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray; +extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays; +extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays; +extern PFNGLISVERTEXARRAYPROC glIsVertexArray; + +// GL_VERSION_3_1 +extern PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; +extern PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced; +extern PFNGLTEXBUFFERPROC glTexBuffer; +extern PFNGLPRIMITIVERESTARTINDEXPROC glPrimitiveRestartIndex; +extern PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData; +extern PFNGLGETUNIFORMINDICESPROC glGetUniformIndices; +extern PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv; +extern PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName; +extern PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex; +extern PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv; +extern PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName; +extern PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding; + +// GL_VERSION_3_2 +extern PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex; +extern PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex; +extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex; +extern PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glMultiDrawElementsBaseVertex; +extern PFNGLPROVOKINGVERTEXPROC glProvokingVertex; +extern PFNGLFENCESYNCPROC glFenceSync; +extern PFNGLISSYNCPROC glIsSync; +extern PFNGLDELETESYNCPROC glDeleteSync; +extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync; +extern PFNGLWAITSYNCPROC glWaitSync; +extern PFNGLGETINTEGER64VPROC glGetInteger64v; +extern PFNGLGETSYNCIVPROC glGetSynciv; +extern PFNGLGETINTEGER64I_VPROC glGetInteger64i_v; +extern PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v; +extern PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture; +extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample; +extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample; +extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv; +extern PFNGLSAMPLEMASKIPROC glSampleMaski; + +// GL_VERSION_3_3 +extern PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed; +extern PFNGLGETFRAGDATAINDEXPROC glGetFragDataIndex; +extern PFNGLGENSAMPLERSPROC glGenSamplers; +extern PFNGLDELETESAMPLERSPROC glDeleteSamplers; +extern PFNGLISSAMPLERPROC glIsSampler; +extern PFNGLBINDSAMPLERPROC glBindSampler; +extern PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri; +extern PFNGLSAMPLERPARAMETERIVPROC glSamplerParameteriv; +extern PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf; +extern PFNGLSAMPLERPARAMETERFVPROC glSamplerParameterfv; +extern PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv; +extern PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv; +extern PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv; +extern PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv; +extern PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv; +extern PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv; +extern PFNGLQUERYCOUNTERPROC glQueryCounter; +extern PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v; +extern PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v; +extern PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor; +extern PFNGLVERTEXATTRIBP1UIPROC glVertexAttribP1ui; +extern PFNGLVERTEXATTRIBP1UIVPROC glVertexAttribP1uiv; +extern PFNGLVERTEXATTRIBP2UIPROC glVertexAttribP2ui; +extern PFNGLVERTEXATTRIBP2UIVPROC glVertexAttribP2uiv; +extern PFNGLVERTEXATTRIBP3UIPROC glVertexAttribP3ui; +extern PFNGLVERTEXATTRIBP3UIVPROC glVertexAttribP3uiv; +extern PFNGLVERTEXATTRIBP4UIPROC glVertexAttribP4ui; +extern PFNGLVERTEXATTRIBP4UIVPROC glVertexAttribP4uiv; +extern PFNGLVERTEXP2UIPROC glVertexP2ui; +extern PFNGLVERTEXP2UIVPROC glVertexP2uiv; +extern PFNGLVERTEXP3UIPROC glVertexP3ui; +extern PFNGLVERTEXP3UIVPROC glVertexP3uiv; +extern PFNGLVERTEXP4UIPROC glVertexP4ui; +extern PFNGLVERTEXP4UIVPROC glVertexP4uiv; +extern PFNGLTEXCOORDP1UIPROC glTexCoordP1ui; +extern PFNGLTEXCOORDP1UIVPROC glTexCoordP1uiv; +extern PFNGLTEXCOORDP2UIPROC glTexCoordP2ui; +extern PFNGLTEXCOORDP2UIVPROC glTexCoordP2uiv; +extern PFNGLTEXCOORDP3UIPROC glTexCoordP3ui; +extern PFNGLTEXCOORDP3UIVPROC glTexCoordP3uiv; +extern PFNGLTEXCOORDP4UIPROC glTexCoordP4ui; +extern PFNGLTEXCOORDP4UIVPROC glTexCoordP4uiv; +extern PFNGLMULTITEXCOORDP1UIPROC glMultiTexCoordP1ui; +extern PFNGLMULTITEXCOORDP1UIVPROC glMultiTexCoordP1uiv; +extern PFNGLMULTITEXCOORDP2UIPROC glMultiTexCoordP2ui; +extern PFNGLMULTITEXCOORDP2UIVPROC glMultiTexCoordP2uiv; +extern PFNGLMULTITEXCOORDP3UIPROC glMultiTexCoordP3ui; +extern PFNGLMULTITEXCOORDP3UIVPROC glMultiTexCoordP3uiv; +extern PFNGLMULTITEXCOORDP4UIPROC glMultiTexCoordP4ui; +extern PFNGLMULTITEXCOORDP4UIVPROC glMultiTexCoordP4uiv; +extern PFNGLNORMALP3UIPROC glNormalP3ui; +extern PFNGLNORMALP3UIVPROC glNormalP3uiv; +extern PFNGLCOLORP3UIPROC glColorP3ui; +extern PFNGLCOLORP3UIVPROC glColorP3uiv; +extern PFNGLCOLORP4UIPROC glColorP4ui; +extern PFNGLCOLORP4UIVPROC glColorP4uiv; +extern PFNGLSECONDARYCOLORP3UIPROC glSecondaryColorP3ui; +extern PFNGLSECONDARYCOLORP3UIVPROC glSecondaryColorP3uiv; + +// GL_VERSION_4_0 +extern PFNGLMINSAMPLESHADINGPROC glMinSampleShading; +extern PFNGLBLENDEQUATIONIPROC glBlendEquationi; +extern PFNGLBLENDEQUATIONSEPARATEIPROC glBlendEquationSeparatei; +extern PFNGLBLENDFUNCIPROC glBlendFunci; +extern PFNGLBLENDFUNCSEPARATEIPROC glBlendFuncSeparatei; +extern PFNGLDRAWARRAYSINDIRECTPROC glDrawArraysIndirect; +extern PFNGLDRAWELEMENTSINDIRECTPROC glDrawElementsIndirect; +extern PFNGLUNIFORM1DPROC glUniform1d; +extern PFNGLUNIFORM2DPROC glUniform2d; +extern PFNGLUNIFORM3DPROC glUniform3d; +extern PFNGLUNIFORM4DPROC glUniform4d; +extern PFNGLUNIFORM1DVPROC glUniform1dv; +extern PFNGLUNIFORM2DVPROC glUniform2dv; +extern PFNGLUNIFORM3DVPROC glUniform3dv; +extern PFNGLUNIFORM4DVPROC glUniform4dv; +extern PFNGLUNIFORMMATRIX2DVPROC glUniformMatrix2dv; +extern PFNGLUNIFORMMATRIX3DVPROC glUniformMatrix3dv; +extern PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv; +extern PFNGLUNIFORMMATRIX2X3DVPROC glUniformMatrix2x3dv; +extern PFNGLUNIFORMMATRIX2X4DVPROC glUniformMatrix2x4dv; +extern PFNGLUNIFORMMATRIX3X2DVPROC glUniformMatrix3x2dv; +extern PFNGLUNIFORMMATRIX3X4DVPROC glUniformMatrix3x4dv; +extern PFNGLUNIFORMMATRIX4X2DVPROC glUniformMatrix4x2dv; +extern PFNGLUNIFORMMATRIX4X3DVPROC glUniformMatrix4x3dv; +extern PFNGLGETUNIFORMDVPROC glGetUniformdv; +extern PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glGetSubroutineUniformLocation; +extern PFNGLGETSUBROUTINEINDEXPROC glGetSubroutineIndex; +extern PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glGetActiveSubroutineUniformiv; +extern PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glGetActiveSubroutineUniformName; +extern PFNGLGETACTIVESUBROUTINENAMEPROC glGetActiveSubroutineName; +extern PFNGLUNIFORMSUBROUTINESUIVPROC glUniformSubroutinesuiv; +extern PFNGLGETUNIFORMSUBROUTINEUIVPROC glGetUniformSubroutineuiv; +extern PFNGLGETPROGRAMSTAGEIVPROC glGetProgramStageiv; +extern PFNGLPATCHPARAMETERIPROC glPatchParameteri; +extern PFNGLPATCHPARAMETERFVPROC glPatchParameterfv; +extern PFNGLBINDTRANSFORMFEEDBACKPROC glBindTransformFeedback; +extern PFNGLDELETETRANSFORMFEEDBACKSPROC glDeleteTransformFeedbacks; +extern PFNGLGENTRANSFORMFEEDBACKSPROC glGenTransformFeedbacks; +extern PFNGLISTRANSFORMFEEDBACKPROC glIsTransformFeedback; +extern PFNGLPAUSETRANSFORMFEEDBACKPROC glPauseTransformFeedback; +extern PFNGLRESUMETRANSFORMFEEDBACKPROC glResumeTransformFeedback; +extern PFNGLDRAWTRANSFORMFEEDBACKPROC glDrawTransformFeedback; +extern PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glDrawTransformFeedbackStream; +extern PFNGLBEGINQUERYINDEXEDPROC glBeginQueryIndexed; +extern PFNGLENDQUERYINDEXEDPROC glEndQueryIndexed; +extern PFNGLGETQUERYINDEXEDIVPROC glGetQueryIndexediv; + + // GL_VERSION_4_1 +extern PFNGLRELEASESHADERCOMPILERPROC glReleaseShaderCompiler; +extern PFNGLSHADERBINARYPROC glShaderBinary; +extern PFNGLGETSHADERPRECISIONFORMATPROC glGetShaderPrecisionFormat; +extern PFNGLDEPTHRANGEFPROC glDepthRangef; +extern PFNGLCLEARDEPTHFPROC glClearDepthf; +extern PFNGLGETPROGRAMBINARYPROC glGetProgramBinary; +extern PFNGLPROGRAMBINARYPROC glProgramBinary; +extern PFNGLPROGRAMPARAMETERIPROC glProgramParameteri; +extern PFNGLUSEPROGRAMSTAGESPROC glUseProgramStages; +extern PFNGLACTIVESHADERPROGRAMPROC glActiveShaderProgram; +extern PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv; +extern PFNGLBINDPROGRAMPIPELINEPROC glBindProgramPipeline; +extern PFNGLDELETEPROGRAMPIPELINESPROC glDeleteProgramPipelines; +extern PFNGLGENPROGRAMPIPELINESPROC glGenProgramPipelines; +extern PFNGLISPROGRAMPIPELINEPROC glIsProgramPipeline; +extern PFNGLGETPROGRAMPIPELINEIVPROC glGetProgramPipelineiv; +extern PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i; +extern PFNGLPROGRAMUNIFORM1IVPROC glProgramUniform1iv; +extern PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f; +extern PFNGLPROGRAMUNIFORM1FVPROC glProgramUniform1fv; +extern PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d; +extern PFNGLPROGRAMUNIFORM1DVPROC glProgramUniform1dv; +extern PFNGLPROGRAMUNIFORM1UIPROC glProgramUniform1ui; +extern PFNGLPROGRAMUNIFORM1UIVPROC glProgramUniform1uiv; +extern PFNGLPROGRAMUNIFORM2IPROC glProgramUniform2i; +extern PFNGLPROGRAMUNIFORM2IVPROC glProgramUniform2iv; +extern PFNGLPROGRAMUNIFORM2FPROC glProgramUniform2f; +extern PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv; +extern PFNGLPROGRAMUNIFORM2DPROC glProgramUniform2d; +extern PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv; +extern PFNGLPROGRAMUNIFORM2UIPROC glProgramUniform2ui; +extern PFNGLPROGRAMUNIFORM2UIVPROC glProgramUniform2uiv; +extern PFNGLPROGRAMUNIFORM3IPROC glProgramUniform3i; +extern PFNGLPROGRAMUNIFORM3IVPROC glProgramUniform3iv; +extern PFNGLPROGRAMUNIFORM3FPROC glProgramUniform3f; +extern PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv; +extern PFNGLPROGRAMUNIFORM3DPROC glProgramUniform3d; +extern PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv; +extern PFNGLPROGRAMUNIFORM3UIPROC glProgramUniform3ui; +extern PFNGLPROGRAMUNIFORM3UIVPROC glProgramUniform3uiv; +extern PFNGLPROGRAMUNIFORM4IPROC glProgramUniform4i; +extern PFNGLPROGRAMUNIFORM4IVPROC glProgramUniform4iv; +extern PFNGLPROGRAMUNIFORM4FPROC glProgramUniform4f; +extern PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv; +extern PFNGLPROGRAMUNIFORM4DPROC glProgramUniform4d; +extern PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv; +extern PFNGLPROGRAMUNIFORM4UIPROC glProgramUniform4ui; +extern PFNGLPROGRAMUNIFORM4UIVPROC glProgramUniform4uiv; +extern PFNGLPROGRAMUNIFORMMATRIX2FVPROC glProgramUniformMatrix2fv; +extern PFNGLPROGRAMUNIFORMMATRIX3FVPROC glProgramUniformMatrix3fv; +extern PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv; +extern PFNGLPROGRAMUNIFORMMATRIX2DVPROC glProgramUniformMatrix2dv; +extern PFNGLPROGRAMUNIFORMMATRIX3DVPROC glProgramUniformMatrix3dv; +extern PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv; +extern PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glProgramUniformMatrix2x3fv; +extern PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glProgramUniformMatrix3x2fv; +extern PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glProgramUniformMatrix2x4fv; +extern PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glProgramUniformMatrix4x2fv; +extern PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glProgramUniformMatrix3x4fv; +extern PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glProgramUniformMatrix4x3fv; +extern PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glProgramUniformMatrix2x3dv; +extern PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glProgramUniformMatrix3x2dv; +extern PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glProgramUniformMatrix2x4dv; +extern PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glProgramUniformMatrix4x2dv; +extern PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glProgramUniformMatrix3x4dv; +extern PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glProgramUniformMatrix4x3dv; +extern PFNGLVALIDATEPROGRAMPIPELINEPROC glValidateProgramPipeline; +extern PFNGLGETPROGRAMPIPELINEINFOLOGPROC glGetProgramPipelineInfoLog; +extern PFNGLVERTEXATTRIBL1DPROC glVertexAttribL1d; +extern PFNGLVERTEXATTRIBL2DPROC glVertexAttribL2d; +extern PFNGLVERTEXATTRIBL3DPROC glVertexAttribL3d; +extern PFNGLVERTEXATTRIBL4DPROC glVertexAttribL4d; +extern PFNGLVERTEXATTRIBL1DVPROC glVertexAttribL1dv; +extern PFNGLVERTEXATTRIBL2DVPROC glVertexAttribL2dv; +extern PFNGLVERTEXATTRIBL3DVPROC glVertexAttribL3dv; +extern PFNGLVERTEXATTRIBL4DVPROC glVertexAttribL4dv; +extern PFNGLVERTEXATTRIBLPOINTERPROC glVertexAttribLPointer; +extern PFNGLGETVERTEXATTRIBLDVPROC glGetVertexAttribLdv; +extern PFNGLVIEWPORTARRAYVPROC glViewportArrayv; +extern PFNGLVIEWPORTINDEXEDFPROC glViewportIndexedf; +extern PFNGLVIEWPORTINDEXEDFVPROC glViewportIndexedfv; +extern PFNGLSCISSORARRAYVPROC glScissorArrayv; +extern PFNGLSCISSORINDEXEDPROC glScissorIndexed; +extern PFNGLSCISSORINDEXEDVPROC glScissorIndexedv; +extern PFNGLDEPTHRANGEARRAYVPROC glDepthRangeArrayv; +extern PFNGLDEPTHRANGEINDEXEDPROC glDepthRangeIndexed; +extern PFNGLGETFLOATI_VPROC glGetFloati_v; +extern PFNGLGETDOUBLEI_VPROC glGetDoublei_v; + +// GL_VERSION_4_2 +extern PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glDrawArraysInstancedBaseInstance; +extern PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glDrawElementsInstancedBaseInstance; +extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glDrawElementsInstancedBaseVertexBaseInstance; +extern PFNGLGETINTERNALFORMATIVPROC glGetInternalformativ; +extern PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glGetActiveAtomicCounterBufferiv; +extern PFNGLBINDIMAGETEXTUREPROC glBindImageTexture; +extern PFNGLMEMORYBARRIERPROC glMemoryBarrier; +extern PFNGLTEXSTORAGE1DPROC glTexStorage1D; +extern PFNGLTEXSTORAGE2DPROC glTexStorage2D; +extern PFNGLTEXSTORAGE3DPROC glTexStorage3D; +extern PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glDrawTransformFeedbackInstanced; +extern PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glDrawTransformFeedbackStreamInstanced; + +// GL_VERSION_4_3 +extern PFNGLCLEARBUFFERDATAPROC glClearBufferData; +extern PFNGLCLEARBUFFERSUBDATAPROC glClearBufferSubData; +extern PFNGLDISPATCHCOMPUTEPROC glDispatchCompute; +extern PFNGLDISPATCHCOMPUTEINDIRECTPROC glDispatchComputeIndirect; +extern PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData; +extern PFNGLFRAMEBUFFERPARAMETERIPROC glFramebufferParameteri; +extern PFNGLGETFRAMEBUFFERPARAMETERIVPROC glGetFramebufferParameteriv; +extern PFNGLGETINTERNALFORMATI64VPROC glGetInternalformati64v; +extern PFNGLINVALIDATETEXSUBIMAGEPROC glInvalidateTexSubImage; +extern PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage; +extern PFNGLINVALIDATEBUFFERSUBDATAPROC glInvalidateBufferSubData; +extern PFNGLINVALIDATEBUFFERDATAPROC glInvalidateBufferData; +extern PFNGLINVALIDATEFRAMEBUFFERPROC glInvalidateFramebuffer; +extern PFNGLINVALIDATESUBFRAMEBUFFERPROC glInvalidateSubFramebuffer; +extern PFNGLMULTIDRAWARRAYSINDIRECTPROC glMultiDrawArraysIndirect; +extern PFNGLMULTIDRAWELEMENTSINDIRECTPROC glMultiDrawElementsIndirect; +extern PFNGLGETPROGRAMINTERFACEIVPROC glGetProgramInterfaceiv; +extern PFNGLGETPROGRAMRESOURCEINDEXPROC glGetProgramResourceIndex; +extern PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName; +extern PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv; +extern PFNGLGETPROGRAMRESOURCELOCATIONPROC glGetProgramResourceLocation; +extern PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glGetProgramResourceLocationIndex; +extern PFNGLSHADERSTORAGEBLOCKBINDINGPROC glShaderStorageBlockBinding; +extern PFNGLTEXBUFFERRANGEPROC glTexBufferRange; +extern PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample; +extern PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample; +extern PFNGLTEXTUREVIEWPROC glTextureView; +extern PFNGLBINDVERTEXBUFFERPROC glBindVertexBuffer; +extern PFNGLVERTEXATTRIBFORMATPROC glVertexAttribFormat; +extern PFNGLVERTEXATTRIBIFORMATPROC glVertexAttribIFormat; +extern PFNGLVERTEXATTRIBLFORMATPROC glVertexAttribLFormat; +extern PFNGLVERTEXATTRIBBINDINGPROC glVertexAttribBinding; +extern PFNGLVERTEXBINDINGDIVISORPROC glVertexBindingDivisor; +extern PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl; +extern PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert; +extern PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback; +extern PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog; +extern PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup; +extern PFNGLPOPDEBUGGROUPPROC glPopDebugGroup; +extern PFNGLOBJECTLABELPROC glObjectLabel; +extern PFNGLGETOBJECTLABELPROC glGetObjectLabel; +extern PFNGLOBJECTPTRLABELPROC glObjectPtrLabel; +extern PFNGLGETOBJECTPTRLABELPROC glGetObjectPtrLabel; + +// GL_VERSION_4_4 +extern PFNGLBUFFERSTORAGEPROC glBufferStorage; +extern PFNGLCLEARTEXIMAGEPROC glClearTexImage; +extern PFNGLCLEARTEXSUBIMAGEPROC glClearTexSubImage; +extern PFNGLBINDBUFFERSBASEPROC glBindBuffersBase; +extern PFNGLBINDBUFFERSRANGEPROC glBindBuffersRange; +extern PFNGLBINDTEXTURESPROC glBindTextures; +extern PFNGLBINDSAMPLERSPROC glBindSamplers; +extern PFNGLBINDIMAGETEXTURESPROC glBindImageTextures; +extern PFNGLBINDVERTEXBUFFERSPROC glBindVertexBuffers; + +// GL_VERSION_4_5 +extern PFNGLCLIPCONTROLPROC glClipControl; +extern PFNGLCREATETRANSFORMFEEDBACKSPROC glCreateTransformFeedbacks; +extern PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glTransformFeedbackBufferBase; +extern PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glTransformFeedbackBufferRange; +extern PFNGLGETTRANSFORMFEEDBACKIVPROC glGetTransformFeedbackiv; +extern PFNGLGETTRANSFORMFEEDBACKI_VPROC glGetTransformFeedbacki_v; +extern PFNGLGETTRANSFORMFEEDBACKI64_VPROC glGetTransformFeedbacki64_v; +extern PFNGLCREATEBUFFERSPROC glCreateBuffers; +extern PFNGLNAMEDBUFFERSTORAGEPROC glNamedBufferStorage; +extern PFNGLNAMEDBUFFERDATAPROC glNamedBufferData; +extern PFNGLNAMEDBUFFERSUBDATAPROC glNamedBufferSubData; +extern PFNGLCOPYNAMEDBUFFERSUBDATAPROC glCopyNamedBufferSubData; +extern PFNGLCLEARNAMEDBUFFERDATAPROC glClearNamedBufferData; +extern PFNGLCLEARNAMEDBUFFERSUBDATAPROC glClearNamedBufferSubData; +extern PFNGLMAPNAMEDBUFFERPROC glMapNamedBuffer; +extern PFNGLMAPNAMEDBUFFERRANGEPROC glMapNamedBufferRange; +extern PFNGLUNMAPNAMEDBUFFERPROC glUnmapNamedBuffer; +extern PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glFlushMappedNamedBufferRange; +extern PFNGLGETNAMEDBUFFERPARAMETERIVPROC glGetNamedBufferParameteriv; +extern PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glGetNamedBufferParameteri64v; +extern PFNGLGETNAMEDBUFFERPOINTERVPROC glGetNamedBufferPointerv; +extern PFNGLGETNAMEDBUFFERSUBDATAPROC glGetNamedBufferSubData; +extern PFNGLCREATEFRAMEBUFFERSPROC glCreateFramebuffers; +extern PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glNamedFramebufferRenderbuffer; +extern PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glNamedFramebufferParameteri; +extern PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glNamedFramebufferTexture; +extern PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glNamedFramebufferTextureLayer; +extern PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glNamedFramebufferDrawBuffer; +extern PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glNamedFramebufferDrawBuffers; +extern PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glNamedFramebufferReadBuffer; +extern PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glInvalidateNamedFramebufferData; +extern PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glInvalidateNamedFramebufferSubData; +extern PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glClearNamedFramebufferiv; +extern PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glClearNamedFramebufferuiv; +extern PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glClearNamedFramebufferfv; +extern PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glClearNamedFramebufferfi; +extern PFNGLBLITNAMEDFRAMEBUFFERPROC glBlitNamedFramebuffer; +extern PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glCheckNamedFramebufferStatus; +extern PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glGetNamedFramebufferParameteriv; +extern PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetNamedFramebufferAttachmentParameteriv; +extern PFNGLCREATERENDERBUFFERSPROC glCreateRenderbuffers; +extern PFNGLNAMEDRENDERBUFFERSTORAGEPROC glNamedRenderbufferStorage; +extern PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glNamedRenderbufferStorageMultisample; +extern PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glGetNamedRenderbufferParameteriv; +extern PFNGLCREATETEXTURESPROC glCreateTextures; +extern PFNGLTEXTUREBUFFERPROC glTextureBuffer; +extern PFNGLTEXTUREBUFFERRANGEPROC glTextureBufferRange; +extern PFNGLTEXTURESTORAGE1DPROC glTextureStorage1D; +extern PFNGLTEXTURESTORAGE2DPROC glTextureStorage2D; +extern PFNGLTEXTURESTORAGE3DPROC glTextureStorage3D; +extern PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glTextureStorage2DMultisample; +extern PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glTextureStorage3DMultisample; +extern PFNGLTEXTURESUBIMAGE1DPROC glTextureSubImage1D; +extern PFNGLTEXTURESUBIMAGE2DPROC glTextureSubImage2D; +extern PFNGLTEXTURESUBIMAGE3DPROC glTextureSubImage3D; +extern PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glCompressedTextureSubImage1D; +extern PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glCompressedTextureSubImage2D; +extern PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glCompressedTextureSubImage3D; +extern PFNGLCOPYTEXTURESUBIMAGE1DPROC glCopyTextureSubImage1D; +extern PFNGLCOPYTEXTURESUBIMAGE2DPROC glCopyTextureSubImage2D; +extern PFNGLCOPYTEXTURESUBIMAGE3DPROC glCopyTextureSubImage3D; +extern PFNGLTEXTUREPARAMETERFPROC glTextureParameterf; +extern PFNGLTEXTUREPARAMETERFVPROC glTextureParameterfv; +extern PFNGLTEXTUREPARAMETERIPROC glTextureParameteri; +extern PFNGLTEXTUREPARAMETERIIVPROC glTextureParameterIiv; +extern PFNGLTEXTUREPARAMETERIUIVPROC glTextureParameterIuiv; +extern PFNGLTEXTUREPARAMETERIVPROC glTextureParameteriv; +extern PFNGLGENERATETEXTUREMIPMAPPROC glGenerateTextureMipmap; +extern PFNGLBINDTEXTUREUNITPROC glBindTextureUnit; +extern PFNGLGETTEXTUREIMAGEPROC glGetTextureImage; +extern PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glGetCompressedTextureImage; +extern PFNGLGETTEXTURELEVELPARAMETERFVPROC glGetTextureLevelParameterfv; +extern PFNGLGETTEXTURELEVELPARAMETERIVPROC glGetTextureLevelParameteriv; +extern PFNGLGETTEXTUREPARAMETERFVPROC glGetTextureParameterfv; +extern PFNGLGETTEXTUREPARAMETERIIVPROC glGetTextureParameterIiv; +extern PFNGLGETTEXTUREPARAMETERIUIVPROC glGetTextureParameterIuiv; +extern PFNGLGETTEXTUREPARAMETERIVPROC glGetTextureParameteriv; +extern PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays; +extern PFNGLDISABLEVERTEXARRAYATTRIBPROC glDisableVertexArrayAttrib; +extern PFNGLENABLEVERTEXARRAYATTRIBPROC glEnableVertexArrayAttrib; +extern PFNGLVERTEXARRAYELEMENTBUFFERPROC glVertexArrayElementBuffer; +extern PFNGLVERTEXARRAYVERTEXBUFFERPROC glVertexArrayVertexBuffer; +extern PFNGLVERTEXARRAYVERTEXBUFFERSPROC glVertexArrayVertexBuffers; +extern PFNGLVERTEXARRAYATTRIBBINDINGPROC glVertexArrayAttribBinding; +extern PFNGLVERTEXARRAYATTRIBFORMATPROC glVertexArrayAttribFormat; +extern PFNGLVERTEXARRAYATTRIBIFORMATPROC glVertexArrayAttribIFormat; +extern PFNGLVERTEXARRAYATTRIBLFORMATPROC glVertexArrayAttribLFormat; +extern PFNGLVERTEXARRAYBINDINGDIVISORPROC glVertexArrayBindingDivisor; +extern PFNGLGETVERTEXARRAYIVPROC glGetVertexArrayiv; +extern PFNGLGETVERTEXARRAYINDEXEDIVPROC glGetVertexArrayIndexediv; +extern PFNGLGETVERTEXARRAYINDEXED64IVPROC glGetVertexArrayIndexed64iv; +extern PFNGLCREATESAMPLERSPROC glCreateSamplers; +extern PFNGLCREATEPROGRAMPIPELINESPROC glCreateProgramPipelines; +extern PFNGLCREATEQUERIESPROC glCreateQueries; +extern PFNGLGETQUERYBUFFEROBJECTI64VPROC glGetQueryBufferObjecti64v; +extern PFNGLGETQUERYBUFFEROBJECTIVPROC glGetQueryBufferObjectiv; +extern PFNGLGETQUERYBUFFEROBJECTUI64VPROC glGetQueryBufferObjectui64v; +extern PFNGLGETQUERYBUFFEROBJECTUIVPROC glGetQueryBufferObjectuiv; +extern PFNGLMEMORYBARRIERBYREGIONPROC glMemoryBarrierByRegion; +extern PFNGLGETTEXTURESUBIMAGEPROC glGetTextureSubImage; +extern PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glGetCompressedTextureSubImage; +extern PFNGLGETGRAPHICSRESETSTATUSPROC glGetGraphicsResetStatus; +extern PFNGLGETNCOMPRESSEDTEXIMAGEPROC glGetnCompressedTexImage; +extern PFNGLGETNTEXIMAGEPROC glGetnTexImage; +extern PFNGLGETNUNIFORMDVPROC glGetnUniformdv; +extern PFNGLGETNUNIFORMFVPROC glGetnUniformfv; +extern PFNGLGETNUNIFORMIVPROC glGetnUniformiv; +extern PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv; +extern PFNGLREADNPIXELSPROC glReadnPixels; +extern PFNGLGETNMAPDVPROC glGetnMapdv; +extern PFNGLGETNMAPFVPROC glGetnMapfv; +extern PFNGLGETNMAPIVPROC glGetnMapiv; +extern PFNGLGETNPIXELMAPFVPROC glGetnPixelMapfv; +extern PFNGLGETNPIXELMAPUIVPROC glGetnPixelMapuiv; +extern PFNGLGETNPIXELMAPUSVPROC glGetnPixelMapusv; +extern PFNGLGETNPOLYGONSTIPPLEPROC glGetnPolygonStipple; +extern PFNGLGETNCOLORTABLEPROC glGetnColorTable; +extern PFNGLGETNCONVOLUTIONFILTERPROC glGetnConvolutionFilter; +extern PFNGLGETNSEPARABLEFILTERPROC glGetnSeparableFilter; +extern PFNGLGETNHISTOGRAMPROC glGetnHistogram; +extern PFNGLGETNMINMAXPROC glGetnMinmax; +extern PFNGLTEXTUREBARRIERPROC glTextureBarrier; + +// GL_VERSION_4_6 +extern PFNGLSPECIALIZESHADERPROC glSpecializeShader; +extern PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC glMultiDrawArraysIndirectCount; +extern PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC glMultiDrawElementsIndirectCount; +extern PFNGLPOLYGONOFFSETCLAMPPROC glPolygonOffsetClamp; -// GL_ARB_vertex_shader -extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB; -extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB; -extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB; -extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB; -extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB; -extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB; -extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB; -extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB; -extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB; -extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB; -extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB; -extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB; -extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB; -extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB; -extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB; -extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB; -extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB; -extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB; -extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB; -extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB; -extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB; -extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB; -extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB; -extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB; -extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB; -extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB; -extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB; -extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB; -extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB; -extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB; -extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB; -extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB; -extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB; -extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB; -extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB; -extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB; -extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB; -extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer; -extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB; -extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB; -extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB; -extern PFNGLBINDPROGRAMARBPROC glBindProgramARB; -extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB; -extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB; -extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB; -extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB; -extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB; -extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB; -extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB; -extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB; -extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB; -extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB; -extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB; -extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB; -extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB; -extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB; -extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB; -extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB; -extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB; -extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB; -extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB; -extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB; -extern PFNGLISPROGRAMARBPROC glIsProgramARB; -extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB; -extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB; -extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB; - -//GL_EXT_blend_func_separate -extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT; - -//GL_ARB_framebuffer_object -extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer; -extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; -extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; -extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; -extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; -extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv; -extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer; -extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; -extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; -extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; -extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; -extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D; -extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; -extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D; -extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; -extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; -extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap; -extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; -extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; -extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; - -//GL_ARB_draw_buffers -extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB; - -//GL_ARB_texture_multisample -extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample; -extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample; -extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv; -extern PFNGLSAMPLEMASKIPROC glSampleMaski; - -//transform feedback (4.0 core) -extern PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback; -extern PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback; -extern PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings; -extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange; -extern PFNGLBINDBUFFERBASEPROC glBindBufferBase; - -//GL_ARB_debug_output -extern PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB; -extern PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB; -extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB; -extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB; - -// GL_ARB_uniform_buffer_object -extern PFNGLGETUNIFORMINDICESPROC glGetUniformIndices; -extern PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv; -extern PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName; -extern PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex; -extern PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv; -extern PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName; -extern PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding; #elif LL_DARWIN //---------------------------------------------------------------------------- @@ -618,9 +1135,6 @@ extern void glGenerateMipmapEXT(GLenum target) AVAILABLE_MAC_OS_X_VERSION_10_4_A #define GL_MAX_SAMPLES 0x8D57 #endif -// GL_ARB_draw_buffers -extern void glDrawBuffersARB(GLsizei n, const GLenum* bufs) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; - #ifdef __cplusplus extern "C" { #endif @@ -705,8 +1219,8 @@ extern "C" { #ifndef GL_ARB_vertex_buffer_object /* GL types for handling large vertex buffer objects */ -typedef intptr_t GLintptrARB; -typedef intptr_t GLsizeiptrARB; +typedef intptr_t GLintptr; +typedef intptr_t GLsizeiptr; #endif diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 67f82c9c5e..bc349c2015 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -37,7 +37,7 @@ #include "OpenGL/OpenGL.h" #endif -// Print-print list of shader included source files that are linked together via glAttachObjectARB() +// Print-print list of shader included source files that are linked together via glAttachShader() // i.e. On macOS / OSX the AMD GLSL linker will display an error if a varying is left in an undefined state. #define DEBUG_SHADER_INCLUDES 0 @@ -47,7 +47,7 @@ using std::pair; using std::make_pair; using std::string; -GLhandleARB LLGLSLShader::sCurBoundShader = 0; +GLuint LLGLSLShader::sCurBoundShader = 0; LLGLSLShader* LLGLSLShader::sCurBoundShaderPtr = NULL; S32 LLGLSLShader::sIndexedTextureChannels = 0; bool LLGLSLShader::sProfileEnabled = false; @@ -227,11 +227,11 @@ void LLGLSLShader::stopProfile(U32 count, U32 mode) void LLGLSLShader::placeProfileQuery() { -#if !LL_DARWIN +#if 1 || !LL_DARWIN if (mTimerQuery == 0) { - glGenQueriesARB(1, &mSamplesQuery); - glGenQueriesARB(1, &mTimerQuery); + glGenQueries(1, &mSamplesQuery); + glGenQueries(1, &mTimerQuery); } if (!mTextureStateFetched) @@ -267,16 +267,16 @@ void LLGLSLShader::placeProfileQuery() } - glBeginQueryARB(GL_SAMPLES_PASSED, mSamplesQuery); - glBeginQueryARB(GL_TIME_ELAPSED, mTimerQuery); + glBeginQuery(GL_SAMPLES_PASSED, mSamplesQuery); + glBeginQuery(GL_TIME_ELAPSED, mTimerQuery); #endif } void LLGLSLShader::readProfileQuery(U32 count, U32 mode) { #if !LL_DARWIN - glEndQueryARB(GL_TIME_ELAPSED); - glEndQueryARB(GL_SAMPLES_PASSED); + glEndQuery(GL_TIME_ELAPSED); + glEndQuery(GL_SAMPLES_PASSED); U64 time_elapsed = 0; glGetQueryObjectui64v(mTimerQuery, GL_QUERY_RESULT, &time_elapsed); @@ -347,30 +347,37 @@ void LLGLSLShader::unloadInternal() if (mProgramObject) { - GLhandleARB obj[1024]; - GLsizei count; - glGetAttachedObjectsARB(mProgramObject, 1024, &count, obj); + GLuint obj[1024]; + GLsizei count = 0; + glGetAttachedShaders(mProgramObject, 1024, &count, obj); + + for (GLsizei i = 0; i < count; i++) + { + glDetachShader(mProgramObject, obj[i]); + } for (GLsizei i = 0; i < count; i++) { - glDetachObjectARB(mProgramObject, obj[i]); - glDeleteObjectARB(obj[i]); + if (glIsShader(obj[i])) + { + glDeleteShader(obj[i]); + } } - glDeleteObjectARB(mProgramObject); + glDeleteProgram(mProgramObject); mProgramObject = 0; } if (mTimerQuery) { - glDeleteQueriesARB(1, &mTimerQuery); + glDeleteQueries(1, &mTimerQuery); mTimerQuery = 0; } if (mSamplesQuery) { - glDeleteQueriesARB(1, &mSamplesQuery); + glDeleteQueries(1, &mSamplesQuery); mSamplesQuery = 0; } @@ -401,7 +408,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, llassert_always(!mShaderFiles.empty()); // Create program - mProgramObject = glCreateProgramObjectARB(); + mProgramObject = glCreateProgram(); if (mProgramObject == 0) { // Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist. @@ -425,7 +432,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin(); for ( ; fileIter != mShaderFiles.end(); fileIter++ ) { - GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels); + GLuint shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels); LL_DEBUGS("ShaderLoading") << "SHADER FILE: " << (*fileIter).first << " mShaderLevel=" << mShaderLevel << LL_ENDL; if (shaderhandle) { @@ -505,20 +512,20 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, } #if DEBUG_SHADER_INCLUDES -void dumpAttachObject( const char *func_name, GLhandleARB program_object, const std::string &object_path ) +void dumpAttachObject( const char *func_name, GLuint program_object, const std::string &object_path ) { - GLcharARB* info_log; + GLchar* info_log; GLint info_len_expect = 0; GLint info_len_actual = 0; - glGetObjectParameterivARB(program_object, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_len_expect); + glGetShaderiv(program_object, GL_INFO_LOG_LENGTH,, &info_len_expect); fprintf(stderr, " * %-20s(), log size: %d, %s\n", func_name, info_len_expect, object_path.c_str()); if (info_len_expect > 0) { fprintf(stderr, " ========== %s() ========== \n", func_name); - info_log = new GLcharARB [ info_len_expect ]; - glGetInfoLogARB(program_object, info_len_expect, &info_len_actual, info_log); + info_log = new GLchar [ info_len_expect ]; + glGetProgramInfoLog(program_object, info_len_expect, &info_len_actual, info_log); fprintf(stderr, "%s\n", info_log); delete [] info_log; } @@ -530,7 +537,7 @@ BOOL LLGLSLShader::attachVertexObject(std::string object_path) if (LLShaderMgr::instance()->mVertexShaderObjects.count(object_path) > 0) { stop_glerror(); - glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mVertexShaderObjects[object_path]); + glAttachShader(mProgramObject, LLShaderMgr::instance()->mVertexShaderObjects[object_path]); #if DEBUG_SHADER_INCLUDES dumpAttachObject("attachVertexObject", mProgramObject, object_path); #endif // DEBUG_SHADER_INCLUDES @@ -549,7 +556,7 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path) if (LLShaderMgr::instance()->mFragmentShaderObjects.count(object_path) > 0) { stop_glerror(); - glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mFragmentShaderObjects[object_path]); + glAttachShader(mProgramObject, LLShaderMgr::instance()->mFragmentShaderObjects[object_path]); #if DEBUG_SHADER_INCLUDES dumpAttachObject("attachFragmentObject", mProgramObject, object_path); #endif // DEBUG_SHADER_INCLUDES @@ -563,12 +570,12 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path) } } -void LLGLSLShader::attachObject(GLhandleARB object) +void LLGLSLShader::attachObject(GLuint object) { if (object != 0) { stop_glerror(); - glAttachObjectARB(mProgramObject, object); + glAttachShader(mProgramObject, object); #if DEBUG_SHADER_INCLUDES std::string object_path("???"); dumpAttachObject("attachObject", mProgramObject, object_path); @@ -581,7 +588,7 @@ void LLGLSLShader::attachObject(GLhandleARB object) } } -void LLGLSLShader::attachObjects(GLhandleARB* objects, S32 count) +void LLGLSLShader::attachObjects(GLuint* objects, S32 count) { for (S32 i = 0; i < count; i++) { @@ -597,7 +604,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++) { const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str(); - glBindAttribLocationARB(mProgramObject, i, (const GLcharARB *) name); + glBindAttribLocation(mProgramObject, i, (const GLchar *) name); } //link the program @@ -620,7 +627,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++) { const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str(); - S32 index = glGetAttribLocationARB(mProgramObject, (const GLcharARB *)name); + S32 index = glGetAttribLocation(mProgramObject, (const GLchar *)name); if (index != -1) { #if LL_RELEASE_WITH_DEBUG_INFO @@ -637,7 +644,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri for (U32 i = 0; i < numAttributes; i++) { const char* name = (*attributes)[i].String().c_str(); - S32 index = glGetAttribLocationARB(mProgramObject, name); + S32 index = glGetAttribLocation(mProgramObject, name); if (index != -1) { mAttribute[LLShaderMgr::instance()->mReservedAttribs.size() + i] = index; @@ -668,7 +675,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * name[0] = 0; - glGetActiveUniformARB(mProgramObject, index, 1024, &length, &size, &type, (GLcharARB *)name); + glGetActiveUniform(mProgramObject, index, 1024, &length, &size, &type, (GLchar *)name); #if !LL_DARWIN if (size > 0) { @@ -713,7 +720,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * } #endif - S32 location = glGetUniformLocationARB(mProgramObject, name); + S32 location = glGetUniformLocation(mProgramObject, name); if (location != -1) { //chop off "[0]" so we can always access the first element @@ -779,14 +786,14 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - if ((type >= GL_SAMPLER_1D_ARB && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB) || + if ((type >= GL_SAMPLER_1D && type <= GL_SAMPLER_2D_RECT_SHADOW) || type == GL_SAMPLER_2D_MULTISAMPLE || - type == GL_SAMPLER_CUBE_MAP_ARRAY_ARB) + type == GL_SAMPLER_CUBE_MAP_ARRAY) { //this here is a texture GLint ret = mActiveTextureChannels; if (size == 1) { - glUniform1iARB(location, mActiveTextureChannels); + glUniform1i(location, mActiveTextureChannels); LL_DEBUGS("ShaderUniform") << "Assigned to texture channel " << mActiveTextureChannels << LL_ENDL; mActiveTextureChannels++; } @@ -800,7 +807,7 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint { channel[i] = mActiveTextureChannels++; } - glUniform1ivARB(location, size, channel); + glUniform1iv(location, size, channel); LL_DEBUGS("ShaderUniform") << "Assigned to texture channel " << (mActiveTextureChannels-size) << " through " << (mActiveTextureChannels-1) << LL_ENDL; } @@ -833,7 +840,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) //get the number of active uniforms GLint activeCount; - glGetObjectParameterivARB(mProgramObject, GL_OBJECT_ACTIVE_UNIFORMS_ARB, &activeCount); + glGetProgramiv(mProgramObject, GL_ACTIVE_UNIFORMS, &activeCount); //........................................................................................................................................ //........................................................................................ @@ -860,12 +867,12 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) */ - S32 diffuseMap = glGetUniformLocationARB(mProgramObject, "diffuseMap"); - S32 specularMap = glGetUniformLocationARB(mProgramObject, "specularMap"); - S32 bumpMap = glGetUniformLocationARB(mProgramObject, "bumpMap"); - S32 altDiffuseMap = glGetUniformLocationARB(mProgramObject, "altDiffuseMap"); - S32 environmentMap = glGetUniformLocationARB(mProgramObject, "environmentMap"); - S32 reflectionMap = glGetUniformLocationARB(mProgramObject, "reflectionMap"); + S32 diffuseMap = glGetUniformLocation(mProgramObject, "diffuseMap"); + S32 specularMap = glGetUniformLocation(mProgramObject, "specularMap"); + S32 bumpMap = glGetUniformLocation(mProgramObject, "bumpMap"); + S32 altDiffuseMap = glGetUniformLocation(mProgramObject, "altDiffuseMap"); + S32 environmentMap = glGetUniformLocation(mProgramObject, "environmentMap"); + S32 reflectionMap = glGetUniformLocation(mProgramObject, "reflectionMap"); std::set<S32> skip_index; @@ -882,7 +889,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) { name[0] = '\0'; - glGetActiveUniformARB(mProgramObject, i, 1024, &length, &size, &type, (GLcharARB *)name); + glGetActiveUniform(mProgramObject, i, 1024, &length, &size, &type, (GLchar *)name); if (-1 == diffuseMap && std::string(name) == "diffuseMap") { @@ -965,6 +972,14 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) } //........................................................................................................................................ + if (mFeatures.hasReflectionProbes) // Set up block binding, in a way supported by Apple (rather than binding = 1 in .glsl). + { // See slide 35 and more of https://docs.huihoo.com/apple/wwdc/2011/session_420__advances_in_opengl_for_mac_os_x_lion.pdf + static const GLuint BLOCKBINDING = 1; //picked by us + //Get the index, similar to a uniform location + GLuint UBOBlockIndex = glGetUniformBlockIndex(mProgramObject, "ReflectionProbes"); + //Set this index to a binding index + glUniformBlockBinding(mProgramObject, UBOBlockIndex, BLOCKBINDING); + } unbind(); LL_DEBUGS("ShaderUniform") << "Total Uniform Size: " << mTotalUniformSize << LL_ENDL; @@ -995,7 +1010,7 @@ void LLGLSLShader::bind() if (sCurBoundShader != mProgramObject) // Don't re-bind current shader { LLVertexBuffer::unbind(); - glUseProgramObjectARB(mProgramObject); + glUseProgram(mProgramObject); sCurBoundShader = mProgramObject; sCurBoundShaderPtr = this; } @@ -1027,7 +1042,7 @@ void LLGLSLShader::unbind() gGL.flush(); stop_glerror(); LLVertexBuffer::unbind(); - glUseProgramObjectARB(0); + glUseProgram(0); sCurBoundShader = 0; sCurBoundShaderPtr = NULL; stop_glerror(); @@ -1038,7 +1053,7 @@ void LLGLSLShader::bindNoShader(void) LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; LLVertexBuffer::unbind(); - glUseProgramObjectARB(0); + glUseProgram(0); sCurBoundShader = 0; sCurBoundShaderPtr = NULL; } @@ -1168,7 +1183,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x) const auto& iter = mValue.find(mUniform[index]); if (iter == mValue.end() || iter->second.mV[0] != x) { - glUniform1iARB(mUniform[index], x); + glUniform1i(mUniform[index], x); mValue[mUniform[index]] = LLVector4(x,0.f,0.f,0.f); } } @@ -1191,7 +1206,7 @@ void LLGLSLShader::uniform1f(U32 index, GLfloat x) const auto& iter = mValue.find(mUniform[index]); if (iter == mValue.end() || iter->second.mV[0] != x) { - glUniform1fARB(mUniform[index], x); + glUniform1f(mUniform[index], x); mValue[mUniform[index]] = LLVector4(x,0.f,0.f,0.f); } } @@ -1214,7 +1229,7 @@ void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y) LLVector4 vec(x,y,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform2fARB(mUniform[index], x, y); + glUniform2f(mUniform[index], x, y); mValue[mUniform[index]] = vec; } } @@ -1237,7 +1252,7 @@ void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z) LLVector4 vec(x,y,z,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform3fARB(mUniform[index], x, y, z); + glUniform3f(mUniform[index], x, y, z); mValue[mUniform[index]] = vec; } } @@ -1260,7 +1275,7 @@ void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat LLVector4 vec(x,y,z,w); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform4fARB(mUniform[index], x, y, z, w); + glUniform4f(mUniform[index], x, y, z, w); mValue[mUniform[index]] = vec; } } @@ -1283,7 +1298,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v) LLVector4 vec(v[0],0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform1ivARB(mUniform[index], count, v); + glUniform1iv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1306,7 +1321,7 @@ void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v) LLVector4 vec(v[0], v[1], v[2], v[3]); if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1) { - glUniform1ivARB(mUniform[index], count, v); + glUniform1iv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1330,7 +1345,7 @@ void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v) LLVector4 vec(v[0],0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform1fvARB(mUniform[index], count, v); + glUniform1fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1353,7 +1368,7 @@ void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v) LLVector4 vec(v[0],v[1],0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform2fvARB(mUniform[index], count, v); + glUniform2fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1376,7 +1391,7 @@ void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v) LLVector4 vec(v[0],v[1],v[2],0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform3fvARB(mUniform[index], count, v); + glUniform3fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1400,7 +1415,7 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v) if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform4fvARB(mUniform[index], count, v); + glUniform4fv(mUniform[index], count, v); mValue[mUniform[index]] = vec; } } @@ -1419,7 +1434,7 @@ void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, c if (mUniform[index] >= 0) { - glUniformMatrix2fvARB(mUniform[index], count, transpose, v); + glUniformMatrix2fv(mUniform[index], count, transpose, v); } } } @@ -1436,7 +1451,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c if (mUniform[index] >= 0) { - glUniformMatrix3fvARB(mUniform[index], count, transpose, v); + glUniformMatrix3fv(mUniform[index], count, transpose, v); } } } @@ -1472,7 +1487,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c if (mUniform[index] >= 0) { - glUniformMatrix4fvARB(mUniform[index], count, transpose, v); + glUniformMatrix4fv(mUniform[index], count, transpose, v); } } } @@ -1490,7 +1505,7 @@ GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform) if (gDebugGL) { stop_glerror(); - if (iter->second != glGetUniformLocationARB(mProgramObject, uniform.String().c_str())) + if (iter->second != glGetUniformLocation(mProgramObject, uniform.String().c_str())) { LL_ERRS() << "Uniform does not match." << LL_ENDL; } @@ -1545,7 +1560,7 @@ void LLGLSLShader::uniform1i(const LLStaticHashedString& uniform, GLint v) LLVector4 vec(v,0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform1iARB(location, v); + glUniform1i(location, v); mValue[location] = vec; } } @@ -1562,7 +1577,7 @@ void LLGLSLShader::uniform1iv(const LLStaticHashedString& uniform, U32 count, co if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform1ivARB(location, count, v); + glUniform1iv(location, count, v); mValue[location] = vec; } } @@ -1579,7 +1594,7 @@ void LLGLSLShader::uniform4iv(const LLStaticHashedString& uniform, U32 count, co if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform4ivARB(location, count, v); + glUniform4iv(location, count, v); mValue[location] = vec; } } @@ -1595,7 +1610,7 @@ void LLGLSLShader::uniform2i(const LLStaticHashedString& uniform, GLint i, GLint LLVector4 vec(i,j,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform2iARB(location, i, j); + glUniform2i(location, i, j); mValue[location] = vec; } } @@ -1612,7 +1627,7 @@ void LLGLSLShader::uniform1f(const LLStaticHashedString& uniform, GLfloat v) LLVector4 vec(v,0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform1fARB(location, v); + glUniform1f(location, v); mValue[location] = vec; } } @@ -1628,7 +1643,7 @@ void LLGLSLShader::uniform2f(const LLStaticHashedString& uniform, GLfloat x, GLf LLVector4 vec(x,y,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform2fARB(location, x,y); + glUniform2f(location, x,y); mValue[location] = vec; } } @@ -1645,7 +1660,7 @@ void LLGLSLShader::uniform3f(const LLStaticHashedString& uniform, GLfloat x, GLf LLVector4 vec(x,y,z,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec)) { - glUniform3fARB(location, x,y,z); + glUniform3f(location, x,y,z); mValue[location] = vec; } } @@ -1661,7 +1676,7 @@ void LLGLSLShader::uniform1fv(const LLStaticHashedString& uniform, U32 count, co LLVector4 vec(v[0],0.f,0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform1fvARB(location, count, v); + glUniform1fv(location, count, v); mValue[location] = vec; } } @@ -1677,7 +1692,7 @@ void LLGLSLShader::uniform2fv(const LLStaticHashedString& uniform, U32 count, co LLVector4 vec(v[0],v[1],0.f,0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform2fvARB(location, count, v); + glUniform2fv(location, count, v); mValue[location] = vec; } } @@ -1693,7 +1708,7 @@ void LLGLSLShader::uniform3fv(const LLStaticHashedString& uniform, U32 count, co LLVector4 vec(v[0],v[1],v[2],0.f); if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { - glUniform3fvARB(location, count, v); + glUniform3fv(location, count, v); mValue[location] = vec; } } @@ -1710,7 +1725,7 @@ void LLGLSLShader::uniform4fv(const LLStaticHashedString& uniform, U32 count, co if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - glUniform4fvARB(location, count, v); + glUniform4fv(location, count, v); mValue[location] = vec; } } @@ -1723,7 +1738,7 @@ void LLGLSLShader::uniformMatrix4fv(const LLStaticHashedString& uniform, U32 cou if (location >= 0) { stop_glerror(); - glUniformMatrix4fvARB(location, count, transpose, v); + glUniformMatrix4fv(location, count, transpose, v); stop_glerror(); } } @@ -1733,7 +1748,7 @@ void LLGLSLShader::vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GL { if (mAttribute[index] > 0) { - glVertexAttrib4fARB(mAttribute[index], x, y, z, w); + glVertexAttrib4f(mAttribute[index], x, y, z, w); } } @@ -1741,7 +1756,7 @@ void LLGLSLShader::vertexAttrib4fv(U32 index, GLfloat* v) { if (mAttribute[index] > 0) { - glVertexAttrib4fvARB(mAttribute[index], v); + glVertexAttrib4fv(mAttribute[index], v); } } diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 68e1a8954d..c26ee014cb 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -146,7 +146,7 @@ public: LLGLSLShader(); ~LLGLSLShader(); - static GLhandleARB sCurBoundShader; + static GLuint sCurBoundShader; static LLGLSLShader* sCurBoundShaderPtr; static S32 sIndexedTextureChannels; @@ -168,8 +168,8 @@ public: const char** varyings = NULL); BOOL attachFragmentObject(std::string object); BOOL attachVertexObject(std::string object); - void attachObject(GLhandleARB object); - void attachObjects(GLhandleARB* objects = NULL, S32 count = 0); + void attachObject(GLuint object); + void attachObjects(GLuint* objects = NULL, S32 count = 0); BOOL mapAttributes(const std::vector<LLStaticHashedString> * attributes); BOOL mapUniforms(const std::vector<LLStaticHashedString> *); void mapUniform(GLint index, const std::vector<LLStaticHashedString> *); @@ -243,7 +243,7 @@ public: U32 mMatHash[LLRender::NUM_MATRIX_MODES]; U32 mLightHash; - GLhandleARB mProgramObject; + GLuint mProgramObject; #if LL_RELEASE_WITH_DEBUG_INFO struct attr_name { diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h index a4924eba14..27ab142925 100644 --- a/indra/llrender/llglstates.h +++ b/indra/llrender/llglstates.h @@ -75,7 +75,7 @@ public: mLineStipple(GL_LINE_STIPPLE), mNormalize(GL_NORMALIZE), mPolygonSmooth(GL_POLYGON_SMOOTH), - mGLMultisample(GL_MULTISAMPLE_ARB) + mGLMultisample(GL_MULTISAMPLE) { } }; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 6215727de0..d8e312106c 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -794,7 +794,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 if (is_compressed) { S32 tex_size = dataFormatBytes(mFormatPrimary, w, h); - glCompressedTexImage2DARB(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in); + glCompressedTexImage2D(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in); stop_glerror(); } else @@ -990,7 +990,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 if (is_compressed) { S32 tex_size = dataFormatBytes(mFormatPrimary, w, h); - glCompressedTexImage2DARB(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in); + glCompressedTexImage2D(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in); stop_glerror(); } else @@ -1838,7 +1838,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre return FALSE ; } - glGetCompressedTexImageARB(mTarget, gl_discard, (GLvoid*)(imageraw->getData())); + glGetCompressedTexImage(mTarget, gl_discard, (GLvoid*)(imageraw->getData())); //stop_glerror(); } else diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index b6ea5aa7f1..74154e5676 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -239,17 +239,17 @@ void LLPostProcess::applyColorFilterShader(void) gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, sceneRenderTexture); getShaderUniforms(colorFilterUniforms, gPostColorFilterProgram.mProgramObject); - glUniform1iARB(colorFilterUniforms["RenderTexture"], 0); - glUniform1fARB(colorFilterUniforms["brightness"], tweaks.getBrightness()); - glUniform1fARB(colorFilterUniforms["contrast"], tweaks.getContrast()); + glUniform1i(colorFilterUniforms["RenderTexture"], 0); + glUniform1f(colorFilterUniforms["brightness"], tweaks.getBrightness()); + glUniform1f(colorFilterUniforms["contrast"], tweaks.getContrast()); float baseI = (tweaks.getContrastBaseR() + tweaks.getContrastBaseG() + tweaks.getContrastBaseB()) / 3.0f; baseI = tweaks.getContrastBaseIntensity() / ((baseI < 0.001f) ? 0.001f : baseI); float baseR = tweaks.getContrastBaseR() * baseI; float baseG = tweaks.getContrastBaseG() * baseI; float baseB = tweaks.getContrastBaseB() * baseI; - glUniform3fARB(colorFilterUniforms["contrastBase"], baseR, baseG, baseB); - glUniform1fARB(colorFilterUniforms["saturation"], tweaks.getSaturation()); - glUniform3fARB(colorFilterUniforms["lumWeights"], LUMINANCE_R, LUMINANCE_G, LUMINANCE_B); + glUniform3f(colorFilterUniforms["contrastBase"], baseR, baseG, baseB); + glUniform1f(colorFilterUniforms["saturation"], tweaks.getSaturation()); + glUniform3f(colorFilterUniforms["lumWeights"], LUMINANCE_R, LUMINANCE_G, LUMINANCE_B); LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_REPLACE); @@ -282,22 +282,22 @@ void LLPostProcess::applyNightVisionShader(void) getShaderUniforms(nightVisionUniforms, gPostNightVisionProgram.mProgramObject); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, sceneRenderTexture); - glUniform1iARB(nightVisionUniforms["RenderTexture"], 0); + glUniform1i(nightVisionUniforms["RenderTexture"], 0); gGL.getTexUnit(1)->activate(); gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->bindManual(LLTexUnit::TT_TEXTURE, noiseTexture); - glUniform1iARB(nightVisionUniforms["NoiseTexture"], 1); + glUniform1i(nightVisionUniforms["NoiseTexture"], 1); - glUniform1fARB(nightVisionUniforms["brightMult"], tweaks.getBrightMult()); - glUniform1fARB(nightVisionUniforms["noiseStrength"], tweaks.getNoiseStrength()); + glUniform1f(nightVisionUniforms["brightMult"], tweaks.getBrightMult()); + glUniform1f(nightVisionUniforms["noiseStrength"], tweaks.getNoiseStrength()); noiseTextureScale = 0.01f + ((101.f - tweaks.getNoiseSize()) / 100.f); noiseTextureScale *= (screenH / NOISE_SIZE); - glUniform3fARB(nightVisionUniforms["lumWeights"], LUMINANCE_R, LUMINANCE_G, LUMINANCE_B); + glUniform3f(nightVisionUniforms["lumWeights"], LUMINANCE_R, LUMINANCE_G, LUMINANCE_B); LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_REPLACE); @@ -345,12 +345,12 @@ void LLPostProcess::createBloomShader(void) bloomBlurUniforms[sBlurWidth] = 0; } -void LLPostProcess::getShaderUniforms(glslUniforms & uniforms, GLhandleARB & prog) +void LLPostProcess::getShaderUniforms(glslUniforms & uniforms, GLuint & prog) { /// Find uniform locations and insert into map glslUniforms::iterator i; for (i = uniforms.begin(); i != uniforms.end(); ++i){ - i->second = glGetUniformLocationARB(prog, i->first.String().c_str()); + i->second = glGetUniformLocation(prog, i->first.String().c_str()); } } @@ -391,7 +391,7 @@ void LLPostProcess::doEffects(void) void LLPostProcess::copyFrameBuffer(U32 & texture, unsigned int width, unsigned int height) { gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture); - glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, width, height, 0); + glCopyTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 0, 0, width, height, 0); } void LLPostProcess::drawOrthoQuad(unsigned int width, unsigned int height, QuadType type) @@ -410,60 +410,60 @@ void LLPostProcess::drawOrthoQuad(unsigned int width, unsigned int height, QuadT glBegin(GL_QUADS); if (type != QUAD_BLOOM_EXTRACT){ - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.f, (GLfloat) height); + glMultiTexCoord2f(GL_TEXTURE0, 0.f, (GLfloat) height); } else { - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.f, (GLfloat) height * 2.0f); + glMultiTexCoord2f(GL_TEXTURE0, 0.f, (GLfloat) height * 2.0f); } if (type == QUAD_NOISE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, + glMultiTexCoord2f(GL_TEXTURE1, noiseX, noiseTextureScale + noiseY); } else if (type == QUAD_BLOOM_COMBINE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.f, (GLfloat) height * 0.5f); + glMultiTexCoord2f(GL_TEXTURE1, 0.f, (GLfloat) height * 0.5f); } glVertex2f(0.f, (GLfloat) screenH - height); if (type != QUAD_BLOOM_EXTRACT){ - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.f, 0.f); + glMultiTexCoord2f(GL_TEXTURE0, 0.f, 0.f); } else { - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.f, 0.f); + glMultiTexCoord2f(GL_TEXTURE0, 0.f, 0.f); } if (type == QUAD_NOISE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, + glMultiTexCoord2f(GL_TEXTURE1, noiseX, noiseY); } else if (type == QUAD_BLOOM_COMBINE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.f, 0.f); + glMultiTexCoord2f(GL_TEXTURE1, 0.f, 0.f); } glVertex2f(0.f, (GLfloat) height + (screenH - height)); if (type != QUAD_BLOOM_EXTRACT){ - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, (GLfloat) width, 0.f); + glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width, 0.f); } else { - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, (GLfloat) width * 2.0f, 0.f); + glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width * 2.0f, 0.f); } if (type == QUAD_NOISE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, + glMultiTexCoord2f(GL_TEXTURE1, screenRatio * noiseTextureScale + noiseX, noiseY); } else if (type == QUAD_BLOOM_COMBINE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, (GLfloat) width * 0.5f, 0.f); + glMultiTexCoord2f(GL_TEXTURE1, (GLfloat) width * 0.5f, 0.f); } glVertex2f((GLfloat) width, (GLfloat) height + (screenH - height)); if (type != QUAD_BLOOM_EXTRACT){ - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, (GLfloat) width, (GLfloat) height); + glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width, (GLfloat) height); } else { - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, (GLfloat) width * 2.0f, (GLfloat) height * 2.0f); + glMultiTexCoord2f(GL_TEXTURE0, (GLfloat) width * 2.0f, (GLfloat) height * 2.0f); } if (type == QUAD_NOISE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, + glMultiTexCoord2f(GL_TEXTURE1, screenRatio * noiseTextureScale + noiseX, noiseTextureScale + noiseY); } else if (type == QUAD_BLOOM_COMBINE){ - glMultiTexCoord2fARB(GL_TEXTURE1_ARB, (GLfloat) width * 0.5f, (GLfloat) height * 0.5f); + glMultiTexCoord2f(GL_TEXTURE1, (GLfloat) width * 0.5f, (GLfloat) height * 0.5f); } glVertex2f((GLfloat) width, (GLfloat) screenH - height); glEnd(); @@ -503,7 +503,7 @@ void LLPostProcess::createTexture(LLPointer<LLImageGL>& texture, unsigned int wi if(texture->createGLTexture()) { gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture->getTexName()); - glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, width, height, 0, + glTexImage2D(GL_TEXTURE_RECTANGLE, 0, 4, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); @@ -557,7 +557,7 @@ bool LLPostProcess::checkError(void) return retCode; } -void LLPostProcess::checkShaderError(GLhandleARB shader) +void LLPostProcess::checkShaderError(GLuint shader) { GLint infologLength = 0; GLint charsWritten = 0; @@ -565,7 +565,7 @@ void LLPostProcess::checkShaderError(GLhandleARB shader) checkError(); // Check for OpenGL errors - glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infologLength); + glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infologLength); checkError(); // Check for OpenGL errors @@ -577,7 +577,7 @@ void LLPostProcess::checkShaderError(GLhandleARB shader) /// Could not allocate infolog buffer return; } - glGetInfoLogARB(shader, infologLength, &charsWritten, infoLog); + glGetProgramInfoLog(shader, infologLength, &charsWritten, infoLog); // shaderErrorLog << (char *) infoLog << std::endl; mShaderErrorString = (char *) infoLog; free(infoLog); diff --git a/indra/llrender/llpostprocess.h b/indra/llrender/llpostprocess.h index ce17b6693d..bdfc632831 100644 --- a/indra/llrender/llpostprocess.h +++ b/indra/llrender/llpostprocess.h @@ -249,12 +249,12 @@ private: void applyColorFilterShader(void); /// OpenGL Helper Functions - void getShaderUniforms(glslUniforms & uniforms, GLhandleARB & prog); + void getShaderUniforms(glslUniforms & uniforms, GLuint & prog); void createTexture(LLPointer<LLImageGL>& texture, unsigned int width, unsigned int height); void copyFrameBuffer(U32 & texture, unsigned int width, unsigned int height); void createNoiseTexture(LLPointer<LLImageGL>& texture); bool checkError(void); - void checkShaderError(GLhandleARB shader); + void checkShaderError(GLuint shader); void drawOrthoQuad(unsigned int width, unsigned int height, QuadType type); void viewOrthogonal(unsigned int width, unsigned int height); void changeOrthogonal(unsigned int width, unsigned int height); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index e5bd19e91c..471dbce1dd 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -69,9 +69,9 @@ static const U32 LL_NUM_LIGHT_UNITS = 8; static const GLenum sGLTextureType[] = { GL_TEXTURE_2D, - GL_TEXTURE_RECTANGLE_ARB, - GL_TEXTURE_CUBE_MAP_ARB, - GL_TEXTURE_CUBE_MAP_ARRAY_ARB, + GL_TEXTURE_RECTANGLE, + GL_TEXTURE_CUBE_MAP, + GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_3D }; @@ -123,7 +123,7 @@ void LLTexUnit::refreshState(void) gGL.flush(); - glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); + glActiveTexture(GL_TEXTURE0 + mIndex); if (mCurrTexType != TT_NONE) { @@ -144,7 +144,7 @@ void LLTexUnit::activate(void) if ((S32)gGL.mCurrTextureUnitIndex != mIndex || gGL.mDirty) { gGL.flush(); - glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); + glActiveTexture(GL_TEXTURE0 + mIndex); gGL.mCurrTextureUnitIndex = mIndex; } } @@ -188,7 +188,7 @@ void LLTexUnit::bindFast(LLTexture* texture) { LLImageGL* gl_tex = texture->getGLTexture(); - glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); + glActiveTexture(GL_TEXTURE0 + mIndex); gGL.mCurrTextureUnitIndex = mIndex; mCurrTexture = gl_tex->getTexName(); if (!mCurrTexture) @@ -340,7 +340,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap) activate(); enable(LLTexUnit::TT_CUBE_MAP); mCurrTexture = cubeMap->mImages[0]->getTexName(); - glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, mCurrTexture); + glBindTexture(GL_TEXTURE_CUBE_MAP, mCurrTexture); mHasMipMaps = cubeMap->mImages[0]->mHasMipMaps; cubeMap->mImages[0]->updateBindStats(); if (cubeMap->mImages[0]->mTexOptionsDirty) @@ -470,7 +470,7 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode) glTexParameteri (sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_T, sGLAddressMode[mode]); if (mCurrTexType == TT_CUBE_MAP) { - glTexParameteri (GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]); + glTexParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, sGLAddressMode[mode]); } } @@ -545,7 +545,7 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) case TBS_PREV_ALPHA: case TBS_ONE_MINUS_PREV_COLOR: case TBS_ONE_MINUS_PREV_ALPHA: - return GL_PREVIOUS_ARB; + return GL_PREVIOUS; // All four cases should return the same value. case TBS_TEX_COLOR: @@ -559,18 +559,18 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) case TBS_VERT_ALPHA: case TBS_ONE_MINUS_VERT_COLOR: case TBS_ONE_MINUS_VERT_ALPHA: - return GL_PRIMARY_COLOR_ARB; + return GL_PRIMARY_COLOR; // All four cases should return the same value. case TBS_CONST_COLOR: case TBS_CONST_ALPHA: case TBS_ONE_MINUS_CONST_COLOR: case TBS_ONE_MINUS_CONST_ALPHA: - return GL_CONSTANT_ARB; + return GL_CONSTANT; default: LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << LL_ENDL; - return GL_PRIMARY_COLOR_ARB; + return GL_PRIMARY_COLOR; } } @@ -639,10 +639,10 @@ void LLTexUnit::debugTextureUnit(void) if (mIndex < 0) return; GLint activeTexture; - glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &activeTexture); - if ((GL_TEXTURE0_ARB + mIndex) != activeTexture) + glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture); + if ((GL_TEXTURE0 + mIndex) != activeTexture) { - U32 set_unit = (activeTexture - GL_TEXTURE0_ARB); + U32 set_unit = (activeTexture - GL_TEXTURE0); LL_WARNS() << "Incorrect Texture Unit! Expected: " << set_unit << " Actual: " << mIndex << LL_ENDL; } } @@ -875,9 +875,9 @@ void LLRender::init() #if LL_WINDOWS if (gGLManager.mHasDebugOutput && gDebugGL) { //setup debug output callback - //glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE); - glDebugMessageCallbackARB((GLDEBUGPROCARB) gl_debug_callback, NULL); - glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); + //glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE); + glDebugMessageCallback((GLDEBUGPROC) gl_debug_callback, NULL); + glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); } #endif @@ -1471,7 +1471,7 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor, llassert(color_dfactor < BF_UNDEF); llassert(alpha_sfactor < BF_UNDEF); llassert(alpha_dfactor < BF_UNDEF); - if (!gGLManager.mHasBlendFuncSeparate) + if (!LLRender::sGLCoreProfile && !gGLManager.mHasBlendFuncSeparate) { LL_WARNS_ONCE("render") << "no glBlendFuncSeparateEXT(), using color-only blend func" << LL_ENDL; blendFunc(color_sfactor, color_dfactor); @@ -1485,8 +1485,9 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor, mCurrBlendColorDFactor = color_dfactor; mCurrBlendAlphaDFactor = alpha_dfactor; flush(); - glBlendFuncSeparateEXT(sGLBlendFactor[color_sfactor], sGLBlendFactor[color_dfactor], - sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]); + + glBlendFuncSeparate(sGLBlendFactor[color_sfactor], sGLBlendFactor[color_dfactor], + sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]); } } diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index fa46e0f7d0..fa23654978 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -490,7 +490,7 @@ void LLRenderTarget::bindTarget() GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3}; - glDrawBuffersARB(mTex.size(), drawbuffers); + glDrawBuffers(mTex.size(), drawbuffers); } if (mTex.empty()) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 96fb764f75..5293166ec3 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -558,26 +558,59 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) //============================================================================ // Load Shader -static std::string get_object_log(GLhandleARB ret) +static std::string get_shader_log(GLuint ret) { std::string res; //get log length GLint length; - glGetObjectParameterivARB(ret, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); + glGetShaderiv(ret, GL_INFO_LOG_LENGTH, &length); if (length > 0) { //the log could be any size, so allocate appropriately - GLcharARB* log = new GLcharARB[length]; - glGetInfoLogARB(ret, length, &length, log); + GLchar* log = new GLchar[length]; + glGetShaderInfoLog(ret, length, &length, log); res = std::string((char *)log); delete[] log; } return res; } +static std::string get_program_log(GLuint ret) +{ + std::string res; + + //get log length + GLint length; + glGetProgramiv(ret, GL_INFO_LOG_LENGTH, &length); + if (length > 0) + { + //the log could be any size, so allocate appropriately + GLchar* log = new GLchar[length]; + glGetProgramInfoLog(ret, length, &length, log); + res = std::string((char*)log); + delete[] log; + } + return res; +} + +// get the info log for the given object, be it a shader or program object +// NOTE: ret MUST be a shader OR a program object +static std::string get_object_log(GLuint ret) +{ + if (glIsProgram(ret)) + { + return get_program_log(ret); + } + else + { + llassert(glIsShader(ret)); + return get_shader_log(ret); + } +} + //dump shader source for debugging -void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLcharARB** shader_code_text) +void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLchar** shader_code_text) { char num_str[16]; // U32 = max 10 digits @@ -592,9 +625,10 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLcharARB** shader_cod LL_CONT << LL_ENDL; } -void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string& filename) +void LLShaderMgr::dumpObjectLog(GLuint ret, BOOL warns, const std::string& filename) { - std::string log = get_object_log(ret); + std::string log; + log = get_object_log(ret); std::string fname = filename; if (filename.empty()) { @@ -608,7 +642,7 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string& } } -GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines, S32 texture_index_channels) +GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines, S32 texture_index_channels) { // endsure work-around for missing GLSL funcs gets propogated to feature shader files (e.g. srgbF.glsl) @@ -679,9 +713,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade //we can't have any lines longer than 1024 characters //or any shaders longer than 4096 lines... deal - DaveP - GLcharARB buff[1024]; - GLcharARB *extra_code_text[1024]; - GLcharARB *shader_code_text[4096 + LL_ARRAY_SIZE(extra_code_text)] = { NULL }; + GLchar buff[1024]; + GLchar *extra_code_text[1024]; + GLchar *shader_code_text[4096 + LL_ARRAY_SIZE(extra_code_text)] = { NULL }; GLuint extra_code_count = 0, shader_code_count = 0; BOOST_STATIC_ASSERT(LL_ARRAY_SIZE(extra_code_text) < LL_ARRAY_SIZE(shader_code_text)); @@ -763,7 +797,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade extra_code_text[extra_code_count++] = strdup("#define ATTRIBUTE in\n"); - if (type == GL_VERTEX_SHADER_ARB) + if (type == GL_VERTEX_SHADER) { //"varying" state is "out" in a vertex program, "in" in a fragment program // ("varying" is deprecated after version 1.20) extra_code_text[extra_code_count++] = strdup("#define VARYING out\n"); @@ -800,7 +834,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade for (std::unordered_map<std::string,std::string>::iterator iter = defines->begin(); iter != defines->end(); ++iter) { std::string define = "#define " + iter->first + " " + iter->second + "\n"; - extra_code_text[extra_code_count++] = (GLcharARB *) strdup(define.c_str()); + extra_code_text[extra_code_count++] = (GLchar *) strdup(define.c_str()); } } @@ -809,7 +843,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade extra_code_text[extra_code_count++] = strdup( "#define IS_AMD_CARD 1\n" ); } - if (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER_ARB) + if (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER) { //use specified number of texture channels for indexed texture rendering @@ -949,7 +983,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade } else { - shader_code_text[shader_code_count] = (GLcharARB *)strdup((char *)buff); + shader_code_text[shader_code_count] = (GLchar *)strdup((char *)buff); if(flag_write_to_out_of_extra_block_area & flags) { @@ -986,40 +1020,40 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade fclose(file); //create shader object - GLhandleARB ret = glCreateShaderObjectARB(type); + GLuint ret = glCreateShader(type); error = glGetError(); if (error != GL_NO_ERROR) { - LL_WARNS("ShaderLoading") << "GL ERROR in glCreateShaderObjectARB: " << error << " for file: " << open_file_name << LL_ENDL; + LL_WARNS("ShaderLoading") << "GL ERROR in glCreateShader: " << error << " for file: " << open_file_name << LL_ENDL; } //load source - glShaderSourceARB(ret, shader_code_count, (const GLcharARB**) shader_code_text, NULL); + glShaderSource(ret, shader_code_count, (const GLchar**) shader_code_text, NULL); error = glGetError(); if (error != GL_NO_ERROR) { - LL_WARNS("ShaderLoading") << "GL ERROR in glShaderSourceARB: " << error << " for file: " << open_file_name << LL_ENDL; + LL_WARNS("ShaderLoading") << "GL ERROR in glShaderSource: " << error << " for file: " << open_file_name << LL_ENDL; } //compile source - glCompileShaderARB(ret); + glCompileShader(ret); error = glGetError(); if (error != GL_NO_ERROR) { - LL_WARNS("ShaderLoading") << "GL ERROR in glCompileShaderARB: " << error << " for file: " << open_file_name << LL_ENDL; + LL_WARNS("ShaderLoading") << "GL ERROR in glCompileShader: " << error << " for file: " << open_file_name << LL_ENDL; } if (error == GL_NO_ERROR) { //check for errors GLint success = GL_TRUE; - glGetObjectParameterivARB(ret, GL_OBJECT_COMPILE_STATUS_ARB, &success); + glGetShaderiv(ret, GL_COMPILE_STATUS, &success); error = glGetError(); - if (error != GL_NO_ERROR || success == GL_FALSE) + if (error != GL_NO_ERROR || success == GL_FALSE) { //an error occured, print log LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL; @@ -1044,10 +1078,10 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade if (ret) { // Add shader file to map - if (type == GL_VERTEX_SHADER_ARB) { + if (type == GL_VERTEX_SHADER) { mVertexShaderObjects[filename] = ret; } - else if (type == GL_FRAGMENT_SHADER_ARB) { + else if (type == GL_FRAGMENT_SHADER) { mFragmentShaderObjects[filename] = ret; } shader_level = try_gpu_class; @@ -1064,19 +1098,21 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade return ret; } -BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors) +BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors) { //check for errors - glLinkProgramARB(obj); + glLinkProgram(obj); GLint success = GL_TRUE; - glGetObjectParameterivARB(obj, GL_OBJECT_LINK_STATUS_ARB, &success); + glGetProgramiv(obj, GL_LINK_STATUS, &success); if (!suppress_errors && success == GL_FALSE) { //an error occured, print log LL_SHADER_LOADING_WARNS() << "GLSL Linker Error:" << LL_ENDL; + dumpObjectLog(obj, TRUE, "linker"); + return success; } - std::string log = get_object_log(obj); + std::string log = get_program_log(obj); LLStringUtil::toLower(log); if (log.find("software") != std::string::npos) { @@ -1087,12 +1123,12 @@ BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors) return success; } -BOOL LLShaderMgr::validateProgramObject(GLhandleARB obj) +BOOL LLShaderMgr::validateProgramObject(GLuint obj) { //check program validity against current GL - glValidateProgramARB(obj); + glValidateProgram(obj); GLint success = GL_TRUE; - glGetObjectParameterivARB(obj, GL_OBJECT_VALIDATE_STATUS_ARB, &success); + glGetProgramiv(obj, GL_LINK_STATUS, &success); if (success == GL_FALSE) { LL_SHADER_LOADING_WARNS() << "GLSL program not valid: " << LL_ENDL; @@ -1173,7 +1209,7 @@ void LLShaderMgr::initAttribsAndUniforms() mReservedUniforms.push_back("emissiveColor"); mReservedUniforms.push_back("metallicFactor"); mReservedUniforms.push_back("roughnessFactor"); - + mReservedUniforms.push_back("diffuseMap"); mReservedUniforms.push_back("altDiffuseMap"); mReservedUniforms.push_back("specularMap"); diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 9e8f848491..008e3dafa6 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -269,11 +269,11 @@ public: virtual void initAttribsAndUniforms(void); BOOL attachShaderFeatures(LLGLSLShader * shader); - void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE, const std::string& filename = ""); - void dumpShaderSource(U32 shader_code_count, GLcharARB** shader_code_text); - BOOL linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE); - BOOL validateProgramObject(GLhandleARB obj); - GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1); + void dumpObjectLog(GLuint ret, BOOL warns = TRUE, const std::string& filename = ""); + void dumpShaderSource(U32 shader_code_count, GLchar** shader_code_text); + BOOL linkProgramObject(GLuint obj, BOOL suppress_errors = FALSE); + BOOL validateProgramObject(GLuint obj); + GLuint loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1); // Implemented in the application to actually point to the shader directory. virtual std::string getShaderDirPrefix(void) = 0; // Pure Virtual @@ -283,8 +283,8 @@ public: public: // Map of shader names to compiled - std::map<std::string, GLhandleARB> mVertexShaderObjects; - std::map<std::string, GLhandleARB> mFragmentShaderObjects; + std::map<std::string, GLuint> mVertexShaderObjects; + std::map<std::string, GLuint> mFragmentShaderObjects; //global (reserved slot) shader parameters std::vector<std::string> mReservedAttribs; diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index b1b69f1508..a40ea2eb1e 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -83,11 +83,11 @@ const U32 LL_VBO_POOL_SEED_COUNT = vbo_block_index(LL_VBO_POOL_MAX_SEED_SIZE); //============================================================================ //static -LLVBOPool LLVertexBuffer::sStreamVBOPool(GL_STREAM_DRAW_ARB, GL_ARRAY_BUFFER_ARB); -LLVBOPool LLVertexBuffer::sDynamicVBOPool(GL_DYNAMIC_DRAW_ARB, GL_ARRAY_BUFFER_ARB); -LLVBOPool LLVertexBuffer::sDynamicCopyVBOPool(GL_DYNAMIC_COPY_ARB, GL_ARRAY_BUFFER_ARB); -LLVBOPool LLVertexBuffer::sStreamIBOPool(GL_STREAM_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB); -LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB); +LLVBOPool LLVertexBuffer::sStreamVBOPool(GL_STREAM_DRAW, GL_ARRAY_BUFFER); +LLVBOPool LLVertexBuffer::sDynamicVBOPool(GL_DYNAMIC_DRAW, GL_ARRAY_BUFFER); +LLVBOPool LLVertexBuffer::sDynamicCopyVBOPool(GL_DYNAMIC_COPY, GL_ARRAY_BUFFER); +LLVBOPool LLVertexBuffer::sStreamIBOPool(GL_STREAM_DRAW, GL_ELEMENT_ARRAY_BUFFER); +LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW, GL_ELEMENT_ARRAY_BUFFER); U32 LLVBOPool::sBytesPooled = 0; U32 LLVBOPool::sIndexBytesPooled = 0; @@ -127,7 +127,7 @@ U32 LLVBOPool::genBuffer() if (sNameIdx == 0) { - glGenBuffersARB(1024, sNamePool); + glGenBuffers(1024, sNamePool); sNameIdx = 1024; } @@ -141,11 +141,11 @@ void LLVBOPool::deleteBuffer(U32 name) { LLVertexBuffer::unbind(); - glBindBufferARB(mType, name); - glBufferDataARB(mType, 0, NULL, mUsage); - glBindBufferARB(mType, 0); + glBindBuffer(mType, name); + glBufferData(mType, 0, NULL, mUsage); + glBindBuffer(mType, 0); - glDeleteBuffersARB(1, &name); + glDeleteBuffers(1, &name); } } @@ -176,14 +176,14 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed) //make a new buffer name = genBuffer(); - glBindBufferARB(mType, name); + glBindBuffer(mType, name); if (!for_seed && i < LL_VBO_POOL_SEED_COUNT) { //record this miss mMissCount[i]++; } - if (mType == GL_ARRAY_BUFFER_ARB) + if (mType == GL_ARRAY_BUFFER) { LLVertexBuffer::sAllocatedBytes += size; } @@ -192,10 +192,10 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed) LLVertexBuffer::sAllocatedIndexBytes += size; } - if (LLVertexBuffer::sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB) + if (LLVertexBuffer::sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW) { - glBufferDataARB(mType, size, 0, mUsage); - if (mUsage != GL_DYNAMIC_COPY_ARB) + glBufferData(mType, size, 0, mUsage); + if (mUsage != GL_DYNAMIC_COPY) { //data will be provided by application ret = (U8*) ll_aligned_malloc<64>(size); if (!ret) @@ -212,10 +212,10 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed) } else { //always use a true hint of static draw when allocating non-client-backed buffers - glBufferDataARB(mType, size, 0, GL_STATIC_DRAW_ARB); + glBufferData(mType, size, 0, GL_STATIC_DRAW); } - glBindBufferARB(mType, 0); + glBindBuffer(mType, 0); if (for_seed) { //put into pool for future use @@ -225,7 +225,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed) rec.mGLName = name; rec.mClientData = ret; - if (mType == GL_ARRAY_BUFFER_ARB) + if (mType == GL_ARRAY_BUFFER) { sBytesPooled += size; } @@ -241,7 +241,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed) name = mFreeList[i].front().mGLName; ret = mFreeList[i].front().mClientData; - if (mType == GL_ARRAY_BUFFER_ARB) + if (mType == GL_ARRAY_BUFFER) { sBytesPooled -= size; } @@ -263,7 +263,7 @@ void LLVBOPool::release(U32 name, U8* buffer, U32 size) deleteBuffer(name); ll_aligned_free_fallback((U8*) buffer); - if (mType == GL_ARRAY_BUFFER_ARB) + if (mType == GL_ARRAY_BUFFER) { LLVertexBuffer::sAllocatedBytes -= size; } @@ -322,7 +322,7 @@ void LLVBOPool::cleanup() l.pop_front(); - if (mType == GL_ARRAY_BUFFER_ARB) + if (mType == GL_ARRAY_BUFFER) { sBytesPooled -= size; LLVertexBuffer::sAllocatedBytes -= size; @@ -451,14 +451,14 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) { //was enabled if (!(data_mask & mask)) { //needs to be disabled - glDisableVertexAttribArrayARB(loc); + glDisableVertexAttribArray(loc); } } else { //was disabled if (data_mask & mask) { //needs to be enabled - glEnableVertexAttribArrayARB(loc); + glEnableVertexAttribArray(loc); } } } @@ -763,12 +763,12 @@ void LLVertexBuffer::unbind() if (sVBOActive) { - glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); + glBindBuffer(GL_ARRAY_BUFFER, 0); sVBOActive = false; } if (sIBOActive) { - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); sIBOActive = false; } @@ -801,32 +801,32 @@ S32 LLVertexBuffer::determineUsage(S32 usage) ret_usage = 0; } - if (ret_usage == GL_STREAM_DRAW_ARB && !sUseStreamDraw) + if (ret_usage == GL_STREAM_DRAW && !sUseStreamDraw) { ret_usage = 0; } - if (ret_usage == GL_DYNAMIC_DRAW_ARB && sPreferStreamDraw) + if (ret_usage == GL_DYNAMIC_DRAW && sPreferStreamDraw) { - ret_usage = GL_STREAM_DRAW_ARB; + ret_usage = GL_STREAM_DRAW; } if (ret_usage == 0 && LLRender::sGLCoreProfile) { //MUST use VBOs for all rendering - ret_usage = GL_STREAM_DRAW_ARB; + ret_usage = GL_STREAM_DRAW; } - if (ret_usage && ret_usage != GL_STREAM_DRAW_ARB) + if (ret_usage && ret_usage != GL_STREAM_DRAW) { //only stream_draw and dynamic_draw are supported when using VBOs, dynamic draw is the default - if (ret_usage != GL_DYNAMIC_COPY_ARB) + if (ret_usage != GL_DYNAMIC_COPY) { if (sDisableVBOMapping) { //always use stream draw if VBO mapping is disabled - ret_usage = GL_STREAM_DRAW_ARB; + ret_usage = GL_STREAM_DRAW; } else { - ret_usage = GL_DYNAMIC_DRAW_ARB; + ret_usage = GL_DYNAMIC_DRAW; } } } @@ -859,7 +859,7 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) mMappable(false), mFence(NULL) { - mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping); + mMappable = (mUsage == GL_DYNAMIC_DRAW && !sDisableVBOMapping); //zero out offsets for (U32 i = 0; i < TYPE_MAX; i++) @@ -982,11 +982,11 @@ void LLVertexBuffer::genBuffer(U32 size) { mSize = vbo_block_size(size); - if (mUsage == GL_STREAM_DRAW_ARB) + if (mUsage == GL_STREAM_DRAW) { mMappedData = sStreamVBOPool.allocate(mGLBuffer, mSize); } - else if (mUsage == GL_DYNAMIC_DRAW_ARB) + else if (mUsage == GL_DYNAMIC_DRAW) { mMappedData = sDynamicVBOPool.allocate(mGLBuffer, mSize); } @@ -1003,7 +1003,7 @@ void LLVertexBuffer::genIndices(U32 size) { mIndicesSize = vbo_block_size(size); - if (mUsage == GL_STREAM_DRAW_ARB) + if (mUsage == GL_STREAM_DRAW) { mMappedIndexData = sStreamIBOPool.allocate(mGLIndices, mIndicesSize); } @@ -1017,7 +1017,7 @@ void LLVertexBuffer::genIndices(U32 size) void LLVertexBuffer::releaseBuffer() { - if (mUsage == GL_STREAM_DRAW_ARB) + if (mUsage == GL_STREAM_DRAW) { sStreamVBOPool.release(mGLBuffer, mMappedData, mSize); } @@ -1034,7 +1034,7 @@ void LLVertexBuffer::releaseBuffer() void LLVertexBuffer::releaseIndices() { - if (mUsage == GL_STREAM_DRAW_ARB) + if (mUsage == GL_STREAM_DRAW) { sStreamIBOPool.release(mGLIndices, mMappedIndexData, mIndicesSize); } @@ -1334,7 +1334,7 @@ void LLVertexBuffer::setupVertexArray() { if (mTypeMask & (1 << i)) { - glEnableVertexAttribArrayARB(i); + glEnableVertexAttribArray(i); if (attrib_integer[i]) { @@ -1360,14 +1360,14 @@ void LLVertexBuffer::setupVertexArray() // pointer value. Ruslan asserts that in this case the last // param is interpreted as an array data offset within the VBO // rather than as an actual pointer, so it's okay. - glVertexAttribPointerARB(i, attrib_size[i], attrib_type[i], + glVertexAttribPointer(i, attrib_size[i], attrib_type[i], attrib_normalized[i], sTypeSize[i], reinterpret_cast<GLvoid*>(intptr_t(mOffsets[i]))); } } else { - glDisableVertexAttribArrayARB(i); + glDisableVertexAttribArray(i); } } @@ -1499,7 +1499,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran #ifdef GL_ARB_map_buffer_range S32 offset = mOffsets[type] + sTypeSize[type]*index; S32 length = (sTypeSize[type]*count+0xF) & ~0xF; - src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length, + src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER, offset, length, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_RANGE_BIT); @@ -1512,7 +1512,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran if (gDebugGL) { GLint size = 0; - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size); + glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size); if (size < mSize) { @@ -1520,7 +1520,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran } } - src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize, + src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER, 0, mSize, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT); #endif @@ -1530,21 +1530,17 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran { if (map_range) { -#ifndef LL_MESA_HEADLESS - glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE); - glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE); -#endif - src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); } else { - src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); } } else { map_range = false; - src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); } llassert(src != NULL); @@ -1568,8 +1564,8 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran //print out more debug info before crash LL_INFOS() << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << LL_ENDL; GLint size; - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size); - LL_INFOS() << "GL_ARRAY_BUFFER_ARB size is " << size << LL_ENDL; + glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size); + LL_INFOS() << "GL_ARRAY_BUFFER size is " << size << LL_ENDL; //-------------------- GLint buff; @@ -1684,7 +1680,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) #ifdef GL_ARB_map_buffer_range S32 offset = sizeof(U16)*index; S32 length = sizeof(U16)*count; - src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, + src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, offset, length, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_RANGE_BIT); @@ -1693,7 +1689,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) else { #ifdef GL_ARB_map_buffer_range - src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices, + src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, sizeof(U16)*mNumIndices, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT); #endif @@ -1703,21 +1699,17 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { if (map_range) { -#ifndef LL_MESA_HEADLESS - glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE); - glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE); -#endif - src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); } else { - src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); } } else { map_range = false; - src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); } llassert(src != NULL); @@ -1793,12 +1785,12 @@ void LLVertexBuffer::unmapBuffer() S32 length = sTypeSize[region.mType]*region.mCount; if (mSize >= length + offset) { - glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, offset, length, (U8*)mMappedData + offset); + glBufferSubData(GL_ARRAY_BUFFER, offset, length, (U8*)mMappedData + offset); } else { GLint size = 0; - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size); + glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size); LL_WARNS() << "Attempted to map regions to a buffer that is too small, " << "mapped size: " << mSize << ", gl buffer size: " << size @@ -1814,7 +1806,7 @@ void LLVertexBuffer::unmapBuffer() else { stop_glerror(); - glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, getSize(), (U8*) mMappedData); + glBufferSubData(GL_ARRAY_BUFFER, 0, getSize(), (U8*) mMappedData); stop_glerror(); } } @@ -1832,15 +1824,7 @@ void LLVertexBuffer::unmapBuffer() S32 length = sTypeSize[region.mType]*region.mCount; if (gGLManager.mHasMapBufferRange) { -#ifdef GL_ARB_map_buffer_range - glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length); -#endif - } - else if (gGLManager.mHasFlushBufferRange) - { -#ifndef LL_MESA_HEADLESS - glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER_ARB, offset, length); -#endif + glFlushMappedBufferRange(GL_ARRAY_BUFFER, offset, length); } } @@ -1848,7 +1832,7 @@ void LLVertexBuffer::unmapBuffer() } } stop_glerror(); - glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); + glUnmapBuffer(GL_ARRAY_BUFFER); stop_glerror(); mMappedData = NULL; @@ -1873,12 +1857,12 @@ void LLVertexBuffer::unmapBuffer() S32 length = sizeof(U16)*region.mCount; if (mIndicesSize >= length + offset) { - glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, (U8*) mMappedIndexData+offset); + glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, length, (U8*) mMappedIndexData+offset); } else { GLint size = 0; - glGetBufferParameterivARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size); + glGetBufferParameteriv(GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_SIZE, &size); LL_WARNS() << "Attempted to map regions to a buffer that is too small, " << "mapped size: " << mIndicesSize << ", gl buffer size: " << size @@ -1894,7 +1878,7 @@ void LLVertexBuffer::unmapBuffer() else { stop_glerror(); - glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, getIndicesSize(), (U8*) mMappedIndexData); + glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, getIndicesSize(), (U8*) mMappedIndexData); stop_glerror(); } } @@ -1912,17 +1896,7 @@ void LLVertexBuffer::unmapBuffer() S32 length = sizeof(U16)*region.mCount; if (gGLManager.mHasMapBufferRange) { -#ifdef GL_ARB_map_buffer_range - glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length); -#endif - } - else if (gGLManager.mHasFlushBufferRange) - { -#ifdef GL_APPLE_flush_buffer_range -#ifndef LL_MESA_HEADLESS - glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length); -#endif -#endif + glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER, offset, length); } stop_glerror(); } @@ -1931,7 +1905,7 @@ void LLVertexBuffer::unmapBuffer() } } - glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB); + glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER); mMappedIndexData = NULL; } @@ -2085,7 +2059,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind) if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive)))) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX; - glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer); + glBindBuffer(GL_ARRAY_BUFFER, mGLBuffer); sGLRenderBuffer = mGLBuffer; sBindCount++; sVBOActive = true; @@ -2102,7 +2076,7 @@ bool LLVertexBuffer::bindGLBufferFast() { if (mGLBuffer != sGLRenderBuffer || !sVBOActive) { - glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer); + glBindBuffer(GL_ARRAY_BUFFER, mGLBuffer); sGLRenderBuffer = mGLBuffer; sBindCount++; sVBOActive = true; @@ -2125,7 +2099,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind) { LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL; }*/ - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mGLIndices); sGLRenderIndices = mGLIndices; stop_glerror(); sBindCount++; @@ -2140,7 +2114,7 @@ bool LLVertexBuffer::bindGLIndicesFast() { if (mGLIndices != sGLRenderIndices || !sIBOActive) { - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mGLIndices); sGLRenderIndices = mGLIndices; sBindCount++; sIBOActive = true; @@ -2302,7 +2276,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { if (sVBOActive) { - glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); + glBindBuffer(GL_ARRAY_BUFFER, 0); sBindCount++; sVBOActive = false; setup = true; // ... or a VBO is deactivated @@ -2317,7 +2291,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { if (sIBOActive) { - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); sBindCount++; sIBOActive = false; } @@ -2392,74 +2366,74 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) { S32 loc = TYPE_NORMAL; void* ptr = (void*)(base + mOffsets[TYPE_NORMAL]); - glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr); + glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr); } if (data_mask & MAP_TEXCOORD3) { S32 loc = TYPE_TEXCOORD3; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]); - glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr); + glVertexAttribPointer(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr); } if (data_mask & MAP_TEXCOORD2) { S32 loc = TYPE_TEXCOORD2; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]); - glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr); + glVertexAttribPointer(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr); } if (data_mask & MAP_TEXCOORD1) { S32 loc = TYPE_TEXCOORD1; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]); - glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr); + glVertexAttribPointer(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr); } if (data_mask & MAP_TANGENT) { S32 loc = TYPE_TANGENT; void* ptr = (void*)(base + mOffsets[TYPE_TANGENT]); - glVertexAttribPointerARB(loc, 4,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr); + glVertexAttribPointer(loc, 4,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr); } if (data_mask & MAP_TEXCOORD0) { S32 loc = TYPE_TEXCOORD0; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]); - glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr); + glVertexAttribPointer(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr); } if (data_mask & MAP_COLOR) { S32 loc = TYPE_COLOR; //bind emissive instead of color pointer if emissive is present void* ptr = (data_mask & MAP_EMISSIVE) ? (void*)(base + mOffsets[TYPE_EMISSIVE]) : (void*)(base + mOffsets[TYPE_COLOR]); - glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr); + glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr); } if (data_mask & MAP_EMISSIVE) { S32 loc = TYPE_EMISSIVE; void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]); - glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); + glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); if (!(data_mask & MAP_COLOR)) { //map emissive to color channel when color is not also being bound to avoid unnecessary shader swaps loc = TYPE_COLOR; - glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); + glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); } } if (data_mask & MAP_WEIGHT) { S32 loc = TYPE_WEIGHT; void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT]); - glVertexAttribPointerARB(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr); + glVertexAttribPointer(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr); } if (data_mask & MAP_WEIGHT4) { S32 loc = TYPE_WEIGHT4; void* ptr = (void*)(base+mOffsets[TYPE_WEIGHT4]); - glVertexAttribPointerARB(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr); + glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr); } if (data_mask & MAP_CLOTHWEIGHT) { S32 loc = TYPE_CLOTHWEIGHT; void* ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]); - glVertexAttribPointerARB(loc, 4, GL_FLOAT, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr); + glVertexAttribPointer(loc, 4, GL_FLOAT, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr); } if (data_mask & MAP_TEXTURE_INDEX && (gGLManager.mGLSLVersionMajor >= 2 || gGLManager.mGLSLVersionMinor >= 30)) //indexed texture rendering requires GLSL 1.30 or later @@ -2474,7 +2448,7 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) { S32 loc = TYPE_VERTEX; void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]); - glVertexAttribPointerARB(loc, 3,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr); + glVertexAttribPointer(loc, 3,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr); } llglassertok(); @@ -2488,74 +2462,74 @@ void LLVertexBuffer::setupVertexBufferFast(U32 data_mask) { S32 loc = TYPE_NORMAL; void* ptr = (void*)(base + mOffsets[TYPE_NORMAL]); - glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr); + glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr); } if (data_mask & MAP_TEXCOORD3) { S32 loc = TYPE_TEXCOORD3; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]); - glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr); + glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr); } if (data_mask & MAP_TEXCOORD2) { S32 loc = TYPE_TEXCOORD2; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]); - glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr); + glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr); } if (data_mask & MAP_TEXCOORD1) { S32 loc = TYPE_TEXCOORD1; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]); - glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr); + glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr); } if (data_mask & MAP_TANGENT) { S32 loc = TYPE_TANGENT; void* ptr = (void*)(base + mOffsets[TYPE_TANGENT]); - glVertexAttribPointerARB(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr); + glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr); } if (data_mask & MAP_TEXCOORD0) { S32 loc = TYPE_TEXCOORD0; void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]); - glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr); + glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr); } if (data_mask & MAP_COLOR) { S32 loc = TYPE_COLOR; //bind emissive instead of color pointer if emissive is present void* ptr = (data_mask & MAP_EMISSIVE) ? (void*)(base + mOffsets[TYPE_EMISSIVE]) : (void*)(base + mOffsets[TYPE_COLOR]); - glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr); + glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr); } if (data_mask & MAP_EMISSIVE) { S32 loc = TYPE_EMISSIVE; void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]); - glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); + glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); if (!(data_mask & MAP_COLOR)) { //map emissive to color channel when color is not also being bound to avoid unnecessary shader swaps loc = TYPE_COLOR; - glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); + glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr); } } if (data_mask & MAP_WEIGHT) { S32 loc = TYPE_WEIGHT; void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT]); - glVertexAttribPointerARB(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr); + glVertexAttribPointer(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr); } if (data_mask & MAP_WEIGHT4) { S32 loc = TYPE_WEIGHT4; void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT4]); - glVertexAttribPointerARB(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr); + glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr); } if (data_mask & MAP_CLOTHWEIGHT) { S32 loc = TYPE_CLOTHWEIGHT; void* ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]); - glVertexAttribPointerARB(loc, 4, GL_FLOAT, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr); + glVertexAttribPointer(loc, 4, GL_FLOAT, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr); } if (data_mask & MAP_TEXTURE_INDEX) { @@ -2569,7 +2543,7 @@ void LLVertexBuffer::setupVertexBufferFast(U32 data_mask) { S32 loc = TYPE_VERTEX; void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]); - glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr); + glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr); } } diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index baf8407fc6..a7907f9cae 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -288,7 +288,7 @@ public: U8* getMappedIndices() const { return mMappedIndexData; } S32 getOffset(S32 type) const { return mOffsets[type]; } S32 getUsage() const { return mUsage; } - bool isWriteable() const { return (mMappable || mUsage == GL_STREAM_DRAW_ARB) ? true : false; } + bool isWriteable() const { return (mMappable || mUsage == GL_STREAM_DRAW) ? true : false; } void draw(U32 mode, U32 count, U32 indices_offset) const; void drawArrays(U32 mode, U32 offset, U32 count) const; diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 8d064ec86c..ceb80ed349 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -261,6 +261,7 @@ attributedStringInfo getSegments(NSAttributedString *str) NSOpenGLPFADepthSize, 24, NSOpenGLPFAAlphaSize, 8, NSOpenGLPFAColorSize, 24, + NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core, 0 }; diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl index 68a57d12f0..449cbeaa28 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl @@ -161,7 +161,11 @@ float getDepth(vec2 pos_screen) vec4 getTexture2DLodAmbient(vec2 tc, float lod) { - vec4 ret = texture2DLod(projectionMap, tc, lod); +#ifndef FXAA_GLSL_120 + vec4 ret = textureLod(projectionMap, tc, lod); +#else + vec4 ret = texture2D(projectionMap, tc); +#endif ret.rgb = srgb_to_linear(ret.rgb); vec2 dist = tc-vec2(0.5); @@ -173,7 +177,11 @@ vec4 getTexture2DLodAmbient(vec2 tc, float lod) vec4 getTexture2DLodDiffuse(vec2 tc, float lod) { - vec4 ret = texture2DLod(projectionMap, tc, lod); +#ifndef FXAA_GLSL_120 + vec4 ret = textureLod(projectionMap, tc, lod); +#else + vec4 ret = texture2D(projectionMap, tc); +#endif ret.rgb = srgb_to_linear(ret.rgb); vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); @@ -216,7 +224,11 @@ vec3 getProjectedLightDiffuseColor(float light_distance, vec2 projected_uv) vec4 texture2DLodSpecular(vec2 tc, float lod) { - vec4 ret = texture2DLod(projectionMap, tc, lod); +#ifndef FXAA_GLSL_120 + vec4 ret = textureLod(projectionMap, tc, lod); +#else + vec4 ret = texture2D(projectionMap, tc); +#endif ret.rgb = srgb_to_linear(ret.rgb); vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); diff --git a/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl index ab5badf538..3d96fe25be 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl @@ -32,7 +32,7 @@ uniform samplerCubeArray reflectionProbes; -layout (std140, binding = 1) uniform ReflectionProbes +layout (std140) uniform ReflectionProbes { // list of OBBs for user override probes // box is a set of 3 planes outward facing planes and the depth of the box along that plane diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index 1f5fdde9ca..3ff039261b 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -33,7 +33,7 @@ uniform samplerCubeArray reflectionProbes; uniform samplerCubeArray irradianceProbes; -layout (std140, binding = 1) uniform ReflectionProbes +layout (std140) uniform ReflectionProbes { // list of OBBs for user override probes // box is a set of 3 planes outward facing planes and the depth of the box along that plane diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index e6017534ca..d78c47a36a 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -32,8 +32,8 @@ #define PBR_USE_IRRADIANCE_HACK 1 #define DEBUG_PBR_LIGHT_TYPE 0 // Output no global light to make it easier to see pointLight and spotLight -#define DEBUG_PBR_PACKORM0 0 // Rough=0, Metal=0 -#define DEBUG_PBR_PACKORM1 0 // Rough=1, Metal=1 +#define DEBUG_PBR_PACK_ORM0 0 // Rough=0, Metal=0 +#define DEBUG_PBR_PACK_ORM1 0 // Rough=1, Metal=1 #define DEBUG_PBR_TANGENT1 1 // Tangent = 1,0,0 #define DEBUG_PBR_VERT2CAM1 0 // vertex2camera = 0,0,1 #define DEBUG_PBR_SPECLIGHT051 0 // Force specLigh to be 0,0.5,1 @@ -76,6 +76,7 @@ #define DEBUG_PBR_IRRADIANCE 0 // Output: Diffuse Irradiance, NOTE: SSAO is factored in #define DEBUG_PBR_FSS_ESS_LAMBERT 0 // Output: FssEssLambert #define DEBUG_PBR_EMS 0 // Output: Ems = (1 - BRDF Scale + BRDF Bias) +#define DEBUG_PBR_EMS_AVG 0 // Output: Avg Ems #define DEBUG_PBR_AVG 0 // Output: Avg #define DEBUG_PBR_FMS_EMS 0 // Output: FmsEms #define DEBUG_PBR_DIFFUSE_K 0 // Output: diffuse FssEssLambert + FmsEms @@ -114,6 +115,7 @@ #define DEBUG_PBR_SUN_SPEC_FV 0 // F() * V() #define DEBUG_PBR_SUN_SPEC_DFV 0 // D() * F() * V() #define DEBUG_PBR_SUN_SPEC_NL_DFV 0 // nl * D() * F() * V() +#define DEBUG_PBR_SUN_FINAL 0 // LAMBERT_NL + BRDF() #define DEBUG_PBR_IOR 0 // Output: grayscale IOR #define DEBUG_PBR_REFLECT0_BASE 0 // Output: black reflect0 default from ior @@ -339,9 +341,6 @@ void main() specLight = vec3(0,0.5,1.0); irradiance = specLight; #endif -#if HAS_IBL - kSpec = mix( kSpec, iridescenceFresnel, iridescenceFactor); -#endif vec3 FssEssGGX = kSpec*vScaleBias.x + vScaleBias.y; #if DEBUG_PBR_SPEC_IBL vec3 debug_color_spec = specWeight * specLight * FssEssGGX; diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 9153fe031e..f23e9db040 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -284,7 +284,7 @@ void main() } } -#if DEBUG_SPOT_DIFFUSE +#if DEBUG_PBR_SPOT_DIFFUSE final_color = vec3(nl * dist_atten); #endif #if DEBUG_SPOT_NL diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 54f189625e..d5aa980d7e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -531,7 +531,7 @@ static void settings_to_globals() LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize")); - LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); + LLRender::sGLCoreProfile = TRUE; // Now required, ignoring gSavedSettings.getBOOL("RenderGLContextCoreProfile"); LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index bfb79f3a4c..70bc603a42 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1252,7 +1252,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition() LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) : LLDrawable(root->getVObj(), true), - LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp) + LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW, regionp) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 4a9a3caaec..67c3000410 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -54,7 +54,7 @@ #include "llviewertexturelist.h" static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK; -static U32 sBufferUsage = GL_STREAM_DRAW_ARB; +static U32 sBufferUsage = GL_STREAM_DRAW; static U32 sShaderLevel = 0; LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL; @@ -146,11 +146,11 @@ void LLDrawPoolAvatar::prerender() if (sShaderLevel > 0) { - sBufferUsage = GL_DYNAMIC_DRAW_ARB; + sBufferUsage = GL_DYNAMIC_DRAW; } else { - sBufferUsage = GL_STREAM_DRAW_ARB; + sBufferUsage = GL_STREAM_DRAW; } } @@ -934,7 +934,7 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const LLVertexBufferAvatar::LLVertexBufferAvatar() : LLVertexBuffer(sDataMask, - GL_STREAM_DRAW_ARB) //avatars are always stream draw due to morph targets + GL_STREAM_DRAW) //avatars are always stream draw due to morph targets { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f35b4b6d91..33d6a205e7 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1224,7 +1224,7 @@ void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf) mask |= LLVertexBuffer::MAP_WEIGHT4; } - LLVertexBuffer* buff = new LLVertexBuffer(mask, GL_STATIC_DRAW_ARB); + LLVertexBuffer* buff = new LLVertexBuffer(mask, GL_STATIC_DRAW); vf.mVertexBuffer = buff; buff->allocateBuffer(vf.mNumVertices, 0, true); @@ -1539,7 +1539,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, #ifdef GL_TRANSFORM_FEEDBACK_BUFFER if (use_transform_feedback && - mVertexBuffer->getUsage() == GL_DYNAMIC_COPY_ARB && + mVertexBuffer->getUsage() == GL_DYNAMIC_COPY && gTransformPositionProgram.mProgramObject && //transform shaders are loaded mVertexBuffer->useVBOs() && //target buffer is in VRAM !rebuild_weights && //TODO: add support for weights @@ -1674,7 +1674,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } } - glBindBufferARB(GL_TRANSFORM_FEEDBACK_BUFFER, 0); + glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, 0); gGL.popMatrix(); if (cur_shader) diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index e934041e2e..826d4892ef 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -607,7 +607,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) void LLFeatureManager::setGraphicsLevel(U32 level, bool skipFeatures) { LLViewerShaderMgr::sSkipReload = true; - + flush_glerror(); // Whatever may have already happened (e.g., to cause us to change), don't let confuse it with new initializations. applyBaseMasks(); // if we're passed an invalid level, default to "Low" diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 175f1849cf..d75f3eef6f 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -1000,8 +1000,8 @@ F32 gpu_benchmark() gBenchmarkProgram.mName = "Benchmark Shader"; gBenchmarkProgram.mFeatures.attachNothing = true; gBenchmarkProgram.mShaderFiles.clear(); - gBenchmarkProgram.mShaderFiles.push_back(std::make_pair("interface/benchmarkV.glsl", GL_VERTEX_SHADER_ARB)); - gBenchmarkProgram.mShaderFiles.push_back(std::make_pair("interface/benchmarkF.glsl", GL_FRAGMENT_SHADER_ARB)); + gBenchmarkProgram.mShaderFiles.push_back(std::make_pair("interface/benchmarkV.glsl", GL_VERTEX_SHADER)); + gBenchmarkProgram.mShaderFiles.push_back(std::make_pair("interface/benchmarkF.glsl", GL_FRAGMENT_SHADER)); gBenchmarkProgram.mShaderLevel = 1; if (!gBenchmarkProgram.createShader(NULL, NULL)) { @@ -1084,7 +1084,7 @@ F32 gpu_benchmark() delete [] pixels; //make a dummy triangle to draw with - LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX, GL_STREAM_DRAW_ARB); + LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX, GL_STREAM_DRAW); if (!buff->allocateBuffer(3, 0, true)) { diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index af00cdd05f..b2d223a3e8 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -56,9 +56,16 @@ LLGLTFMaterial* LLGLTFMaterialList::getMaterial(const LLUUID& id) } LLFileSystem file(id, asset_type, LLFileSystem::READ); + auto size = file.getSize(); + if (!size) + { + LL_DEBUGS() << "Zero size material." << LL_ENDL; + mat->unref(); + return; + } std::vector<char> buffer; - buffer.resize(file.getSize()); + buffer.resize(size); file.read((U8*)&buffer[0], buffer.size()); LLSD asset; diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 677e920031..97277ee798 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -725,14 +725,14 @@ void LLReflectionMapManager::updateUniforms() //copy rpd into uniform buffer object if (mUBO == 0) { - glGenBuffersARB(1, &mUBO); + glGenBuffers(1, &mUBO); } { LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmsu - update buffer"); - glBindBufferARB(GL_UNIFORM_BUFFER, mUBO); - glBufferDataARB(GL_UNIFORM_BUFFER, sizeof(ReflectionProbeData), &rpd, GL_STREAM_DRAW); - glBindBufferARB(GL_UNIFORM_BUFFER, 0); + glBindBuffer(GL_UNIFORM_BUFFER, mUBO); + glBufferData(GL_UNIFORM_BUFFER, sizeof(ReflectionProbeData), &rpd, GL_STREAM_DRAW); + glBindBuffer(GL_UNIFORM_BUFFER, 0); } } diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 2e44dc1459..6a2f53aa42 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -445,14 +445,14 @@ void LLSceneMonitor::calcDiffAggregate() if(mDiffState == EXECUTE_DIFF) { - glBeginQueryARB(GL_SAMPLES_PASSED_ARB, mQueryObject); + glBeginQuery(GL_SAMPLES_PASSED_ARB, mQueryObject); } gl_draw_scaled_target(0, 0, S32(mDiff->getWidth() * mDiffPixelRatio), S32(mDiff->getHeight() * mDiffPixelRatio), mDiff); if(mDiffState == EXECUTE_DIFF) { - glEndQueryARB(GL_SAMPLES_PASSED_ARB); + glEndQuery(GL_SAMPLES_PASSED_ARB); mDiffState = WAIT_ON_RESULT; } @@ -483,11 +483,11 @@ void LLSceneMonitor::fetchQueryResult() mDiffState = WAITING_FOR_NEXT_DIFF; GLuint available = 0; - glGetQueryObjectuivARB(mQueryObject, GL_QUERY_RESULT_AVAILABLE_ARB, &available); + glGetQueryObjectuiv(mQueryObject, GL_QUERY_RESULT_AVAILABLE_ARB, &available); if(available) { GLuint count = 0; - glGetQueryObjectuivARB(mQueryObject, GL_QUERY_RESULT_ARB, &count); + glGetQueryObjectuiv(mQueryObject, GL_QUERY_RESULT_ARB, &count); mDiffResult = sqrtf(count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio)); //0.5 -> (front face + back face) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index c4ad48033e..12ba29466d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6112,7 +6112,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor) { //Need to because crash on ATI 3800 (and similar cards) MAINT-5018 - LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 10b3683cc8..d02c5861b1 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1581,7 +1581,7 @@ void renderOctree(LLSpatialGroup* group) if (group->mBuilt > 0.f) { group->mBuilt -= 2.f * gFrameIntervalSeconds.value(); - if (group->mBufferUsage == GL_STATIC_DRAW_ARB) + if (group->mBufferUsage == GL_STATIC_DRAW) { col.setVec(1.0f, 0, 0, group->mBuilt*0.5f); } @@ -1591,7 +1591,7 @@ void renderOctree(LLSpatialGroup* group) //col.setVec(1.0f, 1.0f, 0, sinf(group->mBuilt*3.14159f)*0.5f); } - if (group->mBufferUsage != GL_STATIC_DRAW_ARB) + if (group->mBufferUsage != GL_STATIC_DRAW) { LLGLDepthTest gl_depth(FALSE, FALSE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); @@ -1686,7 +1686,7 @@ void renderOctree(LLSpatialGroup* group) } else { - if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->isEmpty() + if (group->mBufferUsage == GL_STATIC_DRAW && !group->isEmpty() && group->getSpatialPartition()->mRenderByGroup) { col.setVec(0.8f, 0.4f, 0.1f, 0.1f); diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp index c3eb70f850..0cdad86a76 100644 --- a/indra/newview/llsprite.cpp +++ b/indra/newview/llsprite.cpp @@ -190,7 +190,7 @@ void LLSprite::updateFace(LLFace &face) { LLVertexBuffer* buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, - GL_STREAM_DRAW_ARB); + GL_STREAM_DRAW); buff->allocateBuffer(4, 12, TRUE); face.setGeomIndex(0); face.setIndicesIndex(0); diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 36b2bd4c32..c785c80cea 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -800,7 +800,7 @@ U32 LLOcclusionCullingGroup::getNewOcclusionQueryObjectName() { //seed 1024 query names into the free query pool GLuint queries[1024]; - glGenQueriesARB(1024, queries); + glGenQueries(1024, queries); for (int i = 0; i < 1024; ++i) { sFreeQueries.push(queries[i]); @@ -1129,7 +1129,7 @@ void LLOcclusionCullingGroup::checkOcclusion() GLuint available; { LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("co - query available"); - glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available); + glGetQueryObjectuiv(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available); } if (available) @@ -1137,7 +1137,7 @@ void LLOcclusionCullingGroup::checkOcclusion() GLuint query_result; // Will be # samples drawn, or a boolean depending on mHasOcclusionQuery2 (both are type GLuint) { LL_PROFILE_ZONE_NAMED_CATEGORY_OCTREE("co - query result"); - glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &query_result); + glGetQueryObjectuiv(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &query_result); } #if LL_TRACK_PENDING_OCCLUSION_QUERIES sPendingQueries.erase(mOcclusionQuery[LLViewerCamera::sCurCameraID]); @@ -1250,7 +1250,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh //get an occlusion query that hasn't been used in awhile releaseOcclusionQueryObjectName(mOcclusionQuery[LLViewerCamera::sCurCameraID]); mOcclusionQuery[LLViewerCamera::sCurCameraID] = getNewOcclusionQueryObjectName(); - glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]); + glBeginQuery(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]); } LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; @@ -1292,7 +1292,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh { LL_PROFILE_ZONE_NAMED("glEndQuery"); - glEndQueryARB(mode); + glEndQuery(mode); } } } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 8ec51b3856..142d929188 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -914,8 +914,8 @@ std::string LLViewerShaderMgr::loadBasicShaders() // We no longer have to bind the shaders to global glhandles, they are automatically added to a map now. for (U32 i = 0; i < shaders.size(); i++) { - // Note usage of GL_VERTEX_SHADER_ARB - if (loadShaderFile(shaders[i].first, shaders[i].second, GL_VERTEX_SHADER_ARB, &attribs) == 0) + // Note usage of GL_VERTEX_SHADER + if (loadShaderFile(shaders[i].first, shaders[i].second, GL_VERTEX_SHADER, &attribs) == 0) { LL_WARNS("Shader") << "Failed to load vertex shader " << shaders[i].first << LL_ENDL; return shaders[i].first; @@ -975,8 +975,8 @@ std::string LLViewerShaderMgr::loadBasicShaders() for (U32 i = 0; i < shaders.size(); i++) { - // Note usage of GL_FRAGMENT_SHADER_ARB - if (loadShaderFile(shaders[i].first, shaders[i].second, GL_FRAGMENT_SHADER_ARB, &attribs, index_channels[i]) == 0) + // Note usage of GL_FRAGMENT_SHADER + if (loadShaderFile(shaders[i].first, shaders[i].second, GL_FRAGMENT_SHADER, &attribs, index_channels[i]) == 0) { LL_WARNS("Shader") << "Failed to load fragment shader " << shaders[i].first << LL_ENDL; return shaders[i].first; @@ -1009,8 +1009,8 @@ BOOL LLViewerShaderMgr::loadShadersEnvironment() gTerrainProgram.mFeatures.disableTextureIndex = true; gTerrainProgram.mFeatures.hasGamma = true; gTerrainProgram.mShaderFiles.clear(); - gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER_ARB)); - gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER)); + gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainF.glsl", GL_FRAGMENT_SHADER)); gTerrainProgram.mShaderLevel = mShaderLevel[SHADER_ENVIRONMENT]; success = gTerrainProgram.createShader(NULL, NULL); llassert(success); @@ -1050,8 +1050,8 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterProgram.mFeatures.hasTransport = true; gWaterProgram.mFeatures.hasSrgb = true; gWaterProgram.mShaderFiles.clear(); - gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER_ARB)); - gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER)); + gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER)); gWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; gWaterProgram.mShaderLevel = mShaderLevel[SHADER_WATER]; success = gWaterProgram.createShader(NULL, NULL); @@ -1067,8 +1067,8 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterEdgeProgram.mFeatures.hasTransport = true; gWaterEdgeProgram.mFeatures.hasSrgb = true; gWaterEdgeProgram.mShaderFiles.clear(); - gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER_ARB)); - gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER)); + gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER)); gWaterEdgeProgram.addPermutation("WATER_EDGE", "1"); gWaterEdgeProgram.mShaderGroup = LLGLSLShader::SG_WATER; gWaterEdgeProgram.mShaderLevel = mShaderLevel[SHADER_WATER]; @@ -1083,8 +1083,8 @@ BOOL LLViewerShaderMgr::loadShadersWater() gUnderWaterProgram.mFeatures.calculatesAtmospherics = true; gUnderWaterProgram.mFeatures.hasWaterFog = true; gUnderWaterProgram.mShaderFiles.clear(); - gUnderWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER_ARB)); - gUnderWaterProgram.mShaderFiles.push_back(make_pair("environment/underWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gUnderWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER)); + gUnderWaterProgram.mShaderFiles.push_back(make_pair("environment/underWaterF.glsl", GL_FRAGMENT_SHADER)); gUnderWaterProgram.mShaderLevel = mShaderLevel[SHADER_WATER]; gUnderWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gUnderWaterProgram.createShader(NULL, NULL); @@ -1102,8 +1102,8 @@ BOOL LLViewerShaderMgr::loadShadersWater() gTerrainWaterProgram.mFeatures.mIndexedTextureChannels = 0; gTerrainWaterProgram.mFeatures.disableTextureIndex = true; gTerrainWaterProgram.mShaderFiles.clear(); - gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterV.glsl", GL_VERTEX_SHADER_ARB)); - gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterV.glsl", GL_VERTEX_SHADER)); + gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterF.glsl", GL_FRAGMENT_SHADER)); gTerrainWaterProgram.mShaderLevel = mShaderLevel[SHADER_ENVIRONMENT]; gTerrainWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; @@ -1161,8 +1161,8 @@ BOOL LLViewerShaderMgr::loadShadersEffects() { gGlowProgram.mName = "Glow Shader (Post)"; gGlowProgram.mShaderFiles.clear(); - gGlowProgram.mShaderFiles.push_back(make_pair("effects/glowV.glsl", GL_VERTEX_SHADER_ARB)); - gGlowProgram.mShaderFiles.push_back(make_pair("effects/glowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gGlowProgram.mShaderFiles.push_back(make_pair("effects/glowV.glsl", GL_VERTEX_SHADER)); + gGlowProgram.mShaderFiles.push_back(make_pair("effects/glowF.glsl", GL_FRAGMENT_SHADER)); gGlowProgram.mShaderLevel = mShaderLevel[SHADER_EFFECT]; success = gGlowProgram.createShader(NULL, NULL); if (!success) @@ -1175,8 +1175,8 @@ BOOL LLViewerShaderMgr::loadShadersEffects() { gGlowExtractProgram.mName = "Glow Extract Shader (Post)"; gGlowExtractProgram.mShaderFiles.clear(); - gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractV.glsl", GL_VERTEX_SHADER_ARB)); - gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractF.glsl", GL_FRAGMENT_SHADER_ARB)); + gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractV.glsl", GL_VERTEX_SHADER)); + gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractF.glsl", GL_FRAGMENT_SHADER)); gGlowExtractProgram.mShaderLevel = mShaderLevel[SHADER_EFFECT]; success = gGlowExtractProgram.createShader(NULL, NULL); if (!success) @@ -1296,8 +1296,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredHighlightProgram.mName = "Deferred Highlight Shader"; gDeferredHighlightProgram.mShaderFiles.clear(); - gDeferredHighlightProgram.mShaderFiles.push_back(make_pair("interface/highlightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredHighlightProgram.mShaderFiles.push_back(make_pair("deferred/highlightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredHighlightProgram.mShaderFiles.push_back(make_pair("interface/highlightV.glsl", GL_VERTEX_SHADER)); + gDeferredHighlightProgram.mShaderFiles.push_back(make_pair("deferred/highlightF.glsl", GL_FRAGMENT_SHADER)); gDeferredHighlightProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gDeferredHighlightProgram.createShader(NULL, NULL); } @@ -1306,8 +1306,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredHighlightNormalProgram.mName = "Deferred Highlight Normals Shader"; gDeferredHighlightNormalProgram.mShaderFiles.clear(); - gDeferredHighlightNormalProgram.mShaderFiles.push_back(make_pair("interface/highlightNormV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredHighlightNormalProgram.mShaderFiles.push_back(make_pair("deferred/highlightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredHighlightNormalProgram.mShaderFiles.push_back(make_pair("interface/highlightNormV.glsl", GL_VERTEX_SHADER)); + gDeferredHighlightNormalProgram.mShaderFiles.push_back(make_pair("deferred/highlightF.glsl", GL_FRAGMENT_SHADER)); gDeferredHighlightNormalProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gHighlightNormalProgram.createShader(NULL, NULL); } @@ -1316,8 +1316,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredHighlightSpecularProgram.mName = "Deferred Highlight Spec Shader"; gDeferredHighlightSpecularProgram.mShaderFiles.clear(); - gDeferredHighlightSpecularProgram.mShaderFiles.push_back(make_pair("interface/highlightSpecV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredHighlightSpecularProgram.mShaderFiles.push_back(make_pair("deferred/highlightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredHighlightSpecularProgram.mShaderFiles.push_back(make_pair("interface/highlightSpecV.glsl", GL_VERTEX_SHADER)); + gDeferredHighlightSpecularProgram.mShaderFiles.push_back(make_pair("deferred/highlightF.glsl", GL_FRAGMENT_SHADER)); gDeferredHighlightSpecularProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gDeferredHighlightSpecularProgram.createShader(NULL, NULL); } @@ -1328,8 +1328,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredDiffuseProgram.mFeatures.encodesNormal = true; gDeferredDiffuseProgram.mFeatures.hasSrgb = true; gDeferredDiffuseProgram.mShaderFiles.clear(); - gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseIndexedF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER)); + gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseIndexedF.glsl", GL_FRAGMENT_SHADER)); gDeferredDiffuseProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredDiffuseProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = make_rigged_variant(gDeferredDiffuseProgram, gDeferredSkinnedDiffuseProgram); @@ -1341,8 +1341,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredDiffuseAlphaMaskProgram.mName = "Deferred Diffuse Alpha Mask Shader"; gDeferredDiffuseAlphaMaskProgram.mFeatures.encodesNormal = true; gDeferredDiffuseAlphaMaskProgram.mShaderFiles.clear(); - gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskIndexedF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER)); + gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskIndexedF.glsl", GL_FRAGMENT_SHADER)); gDeferredDiffuseAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredDiffuseAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = make_rigged_variant(gDeferredDiffuseAlphaMaskProgram, gDeferredSkinnedDiffuseAlphaMaskProgram); @@ -1354,8 +1354,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredNonIndexedDiffuseAlphaMaskProgram.mName = "Deferred Diffuse Non-Indexed Alpha Mask Shader"; gDeferredNonIndexedDiffuseAlphaMaskProgram.mFeatures.encodesNormal = true; gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.clear(); - gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER)); + gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskF.glsl", GL_FRAGMENT_SHADER)); gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredNonIndexedDiffuseAlphaMaskProgram.createShader(NULL, NULL); llassert(success); @@ -1366,8 +1366,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mName = "Deferred Diffuse Non-Indexed Alpha Mask Shader"; gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mFeatures.encodesNormal = true; gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.clear(); - gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseNoColorV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskNoColorF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseNoColorV.glsl", GL_VERTEX_SHADER)); + gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskNoColorF.glsl", GL_FRAGMENT_SHADER)); gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.createShader(NULL, NULL); llassert(success); @@ -1379,8 +1379,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredNonIndexedDiffuseProgram.mShaderFiles.clear(); gDeferredNonIndexedDiffuseProgram.mFeatures.encodesNormal = true; gDeferredNonIndexedDiffuseProgram.mFeatures.hasSrgb = true; - gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER)); + gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER)); gDeferredNonIndexedDiffuseProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredNonIndexedDiffuseProgram.createShader(NULL, NULL); llassert(success); @@ -1391,8 +1391,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredBumpProgram.mName = "Deferred Bump Shader"; gDeferredBumpProgram.mFeatures.encodesNormal = true; gDeferredBumpProgram.mShaderFiles.clear(); - gDeferredBumpProgram.mShaderFiles.push_back(make_pair("deferred/bumpV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredBumpProgram.mShaderFiles.push_back(make_pair("deferred/bumpF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredBumpProgram.mShaderFiles.push_back(make_pair("deferred/bumpV.glsl", GL_VERTEX_SHADER)); + gDeferredBumpProgram.mShaderFiles.push_back(make_pair("deferred/bumpF.glsl", GL_FRAGMENT_SHADER)); gDeferredBumpProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = make_rigged_variant(gDeferredBumpProgram, gDeferredSkinnedBumpProgram); success = success && gDeferredBumpProgram.createShader(NULL, NULL); @@ -1428,8 +1428,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() U32 alpha_mode = i & 0x3; gDeferredMaterialProgram[i].mShaderFiles.clear(); - gDeferredMaterialProgram[i].mShaderFiles.push_back(make_pair("deferred/materialV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredMaterialProgram[i].mShaderFiles.push_back(make_pair("deferred/materialF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredMaterialProgram[i].mShaderFiles.push_back(make_pair("deferred/materialV.glsl", GL_VERTEX_SHADER)); + gDeferredMaterialProgram[i].mShaderFiles.push_back(make_pair("deferred/materialF.glsl", GL_FRAGMENT_SHADER)); gDeferredMaterialProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredMaterialProgram[i].clearPermutations(); @@ -1507,8 +1507,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() U32 alpha_mode = i & 0x3; gDeferredMaterialWaterProgram[i].mShaderFiles.clear(); - gDeferredMaterialWaterProgram[i].mShaderFiles.push_back(make_pair("deferred/materialV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredMaterialWaterProgram[i].mShaderFiles.push_back(make_pair("deferred/materialF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredMaterialWaterProgram[i].mShaderFiles.push_back(make_pair("deferred/materialV.glsl", GL_VERTEX_SHADER)); + gDeferredMaterialWaterProgram[i].mShaderFiles.push_back(make_pair("deferred/materialF.glsl", GL_FRAGMENT_SHADER)); gDeferredMaterialWaterProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredMaterialWaterProgram[i].mShaderGroup = LLGLSLShader::SG_WATER; @@ -1604,8 +1604,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredPBROpaqueProgram.mFeatures.hasSrgb = true; gDeferredPBROpaqueProgram.mShaderFiles.clear(); - gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueV.glsl", GL_VERTEX_SHADER)); + gDeferredPBROpaqueProgram.mShaderFiles.push_back(make_pair("deferred/pbropaqueF.glsl", GL_FRAGMENT_SHADER)); gDeferredPBROpaqueProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredPBROpaqueProgram.addPermutation("HAS_NORMAL_MAP", "1"); gDeferredPBROpaqueProgram.addPermutation("HAS_SPECULAR_MAP", "1"); @@ -1699,8 +1699,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTreeProgram.mName = "Deferred Tree Shader"; gDeferredTreeProgram.mShaderFiles.clear(); gDeferredTreeProgram.mFeatures.encodesNormal = true; - gDeferredTreeProgram.mShaderFiles.push_back(make_pair("deferred/treeV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredTreeProgram.mShaderFiles.push_back(make_pair("deferred/treeF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredTreeProgram.mShaderFiles.push_back(make_pair("deferred/treeV.glsl", GL_VERTEX_SHADER)); + gDeferredTreeProgram.mShaderFiles.push_back(make_pair("deferred/treeF.glsl", GL_FRAGMENT_SHADER)); gDeferredTreeProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredTreeProgram.createShader(NULL, NULL); } @@ -1711,8 +1711,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTreeShadowProgram.mShaderFiles.clear(); gDeferredTreeShadowProgram.mFeatures.isDeferred = true; gDeferredTreeShadowProgram.mFeatures.hasShadows = true; - gDeferredTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredTreeShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredTreeShadowProgram.mRiggedVariant = &gDeferredSkinnedTreeShadowProgram; success = gDeferredTreeShadowProgram.createShader(NULL, NULL); @@ -1726,8 +1726,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSkinnedTreeShadowProgram.mFeatures.isDeferred = true; gDeferredSkinnedTreeShadowProgram.mFeatures.hasShadows = true; gDeferredSkinnedTreeShadowProgram.mFeatures.hasObjectSkinning = true; - gDeferredSkinnedTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowSkinnedV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSkinnedTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSkinnedTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowSkinnedV.glsl", GL_VERTEX_SHADER)); + gDeferredSkinnedTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredSkinnedTreeShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredSkinnedTreeShadowProgram.createShader(NULL, NULL); llassert(success); @@ -1740,8 +1740,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredImpostorProgram.mFeatures.encodesNormal = true; //gDeferredImpostorProgram.mFeatures.isDeferred = true; gDeferredImpostorProgram.mShaderFiles.clear(); - gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorV.glsl", GL_VERTEX_SHADER)); + gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorF.glsl", GL_FRAGMENT_SHADER)); gDeferredImpostorProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredImpostorProgram.createShader(NULL, NULL); llassert(success); @@ -1755,8 +1755,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredLightProgram.mFeatures.hasSrgb = true; gDeferredLightProgram.mShaderFiles.clear(); - gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER)); + gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredLightProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredLightProgram.clearPermutations(); @@ -1791,8 +1791,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredMultiLightProgram[i].clearPermutations(); gDeferredMultiLightProgram[i].mShaderFiles.clear(); - gDeferredMultiLightProgram[i].mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredMultiLightProgram[i].mShaderFiles.push_back(make_pair("deferred/multiPointLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredMultiLightProgram[i].mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER)); + gDeferredMultiLightProgram[i].mShaderFiles.push_back(make_pair("deferred/multiPointLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredMultiLightProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredMultiLightProgram[i].addPermutation("LIGHT_COUNT", llformat("%d", i+1)); @@ -1825,8 +1825,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSpotLightProgram.mFeatures.hasShadows = true; gDeferredSpotLightProgram.clearPermutations(); - gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/spotLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER)); + gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/spotLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredSpotLightProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; if (ambient_kill) @@ -1857,8 +1857,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredMultiSpotLightProgram.clearPermutations(); gDeferredMultiSpotLightProgram.mShaderFiles.clear(); - gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiSpotLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER)); + gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiSpotLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredMultiSpotLightProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; if (local_light_kill) @@ -1897,8 +1897,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSunProgram.mName = "Deferred Sun Shader"; gDeferredSunProgram.mShaderFiles.clear(); - gDeferredSunProgram.mShaderFiles.push_back(make_pair(vertex, GL_VERTEX_SHADER_ARB)); - gDeferredSunProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB)); + gDeferredSunProgram.mShaderFiles.push_back(make_pair(vertex, GL_VERTEX_SHADER)); + gDeferredSunProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER)); gDeferredSunProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredSunProgram.createShader(NULL, NULL); @@ -1911,8 +1911,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredBlurLightProgram.mFeatures.isDeferred = true; gDeferredBlurLightProgram.mShaderFiles.clear(); - gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightV.glsl", GL_VERTEX_SHADER)); + gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredBlurLightProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredBlurLightProgram.createShader(NULL, NULL); @@ -1960,8 +1960,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() } shader->mShaderFiles.clear(); - shader->mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB)); - shader->mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB)); + shader->mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER)); + shader->mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER)); shader->clearPermutations(); shader->addPermutation("USE_VERTEX_COLOR", "1"); @@ -2036,8 +2036,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() } shader->mShaderFiles.clear(); - shader->mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB)); - shader->mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB)); + shader->mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER)); + shader->mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER)); shader->clearPermutations(); shader->addPermutation("USE_INDEXED_TEX", "1"); @@ -2107,8 +2107,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() } shader[i]->mShaderGroup = LLGLSLShader::SG_WATER; shader[i]->mShaderFiles.clear(); - shader[i]->mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB)); - shader[i]->mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB)); + shader[i]->mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER)); + shader[i]->mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER)); shader[i]->clearPermutations(); shader[i]->addPermutation("USE_INDEXED_TEX", "1"); @@ -2167,8 +2167,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarEyesProgram.mFeatures.hasShadows = true; gDeferredAvatarEyesProgram.mShaderFiles.clear(); - gDeferredAvatarEyesProgram.mShaderFiles.push_back(make_pair("deferred/avatarEyesV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAvatarEyesProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarEyesProgram.mShaderFiles.push_back(make_pair("deferred/avatarEyesV.glsl", GL_VERTEX_SHADER)); + gDeferredAvatarEyesProgram.mShaderFiles.push_back(make_pair("deferred/diffuseF.glsl", GL_FRAGMENT_SHADER)); gDeferredAvatarEyesProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredAvatarEyesProgram.createShader(NULL, NULL); llassert(success); @@ -2183,8 +2183,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightProgram.mFeatures.hasSrgb = true; gDeferredFullbrightProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightProgram.mShaderFiles.clear(); - gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER)); + gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gDeferredFullbrightProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = make_rigged_variant(gDeferredFullbrightProgram, gDeferredSkinnedFullbrightProgram); success = gDeferredFullbrightProgram.createShader(NULL, NULL); @@ -2200,8 +2200,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightAlphaMaskProgram.mFeatures.hasSrgb = true; gDeferredFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightAlphaMaskProgram.mShaderFiles.clear(); - gDeferredFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER)); + gDeferredFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gDeferredFullbrightAlphaMaskProgram.addPermutation("HAS_ALPHA_MASK","1"); gDeferredFullbrightAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = make_rigged_variant(gDeferredFullbrightAlphaMaskProgram, gDeferredSkinnedFullbrightAlphaMaskProgram); @@ -2219,8 +2219,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightWaterProgram.mFeatures.hasSrgb = true; gDeferredFullbrightWaterProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightWaterProgram.mShaderFiles.clear(); - gDeferredFullbrightWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredFullbrightWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredFullbrightWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER)); + gDeferredFullbrightWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gDeferredFullbrightWaterProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredFullbrightWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; gDeferredFullbrightWaterProgram.addPermutation("WATER_FOG","1"); @@ -2239,8 +2239,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasSrgb = true; gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightAlphaMaskWaterProgram.mShaderFiles.clear(); - gDeferredFullbrightAlphaMaskWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredFullbrightAlphaMaskWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredFullbrightAlphaMaskWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER)); + gDeferredFullbrightAlphaMaskWaterProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gDeferredFullbrightAlphaMaskWaterProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredFullbrightAlphaMaskWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; gDeferredFullbrightAlphaMaskWaterProgram.addPermutation("HAS_ALPHA_MASK","1"); @@ -2258,10 +2258,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightShinyProgram.mFeatures.hasGamma = true; gDeferredFullbrightShinyProgram.mFeatures.hasTransport = true; gDeferredFullbrightShinyProgram.mFeatures.hasSrgb = true; - gDeferredFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels-1; + gDeferredFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels-2; gDeferredFullbrightShinyProgram.mShaderFiles.clear(); - gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyV.glsl", GL_VERTEX_SHADER)); + gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER)); gDeferredFullbrightShinyProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; if (gDeferredFullbrightShinyProgram.mShaderLevel > 2) { @@ -2281,8 +2281,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredEmissiveProgram.mFeatures.hasTransport = true; gDeferredEmissiveProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredEmissiveProgram.mShaderFiles.clear(); - gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveV.glsl", GL_VERTEX_SHADER)); + gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveF.glsl", GL_FRAGMENT_SHADER)); gDeferredEmissiveProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = make_rigged_variant(gDeferredEmissiveProgram, gDeferredSkinnedEmissiveProgram); success = success && gDeferredEmissiveProgram.createShader(NULL, NULL); @@ -2300,8 +2300,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWaterProgram.mFeatures.hasSrgb = true; gDeferredWaterProgram.mShaderFiles.clear(); - gDeferredWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterV.glsl", GL_VERTEX_SHADER)); + gDeferredWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterF.glsl", GL_FRAGMENT_SHADER)); gDeferredWaterProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gDeferredWaterProgram.createShader(NULL, NULL); @@ -2321,8 +2321,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() //gDeferredUnderWaterProgram.mFeatures.hasShadows = true; gDeferredUnderWaterProgram.mShaderFiles.clear(); - gDeferredUnderWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredUnderWaterProgram.mShaderFiles.push_back(make_pair("deferred/underWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredUnderWaterProgram.mShaderFiles.push_back(make_pair("deferred/waterV.glsl", GL_VERTEX_SHADER)); + gDeferredUnderWaterProgram.mShaderFiles.push_back(make_pair("deferred/underWaterF.glsl", GL_FRAGMENT_SHADER)); gDeferredUnderWaterProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredUnderWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gDeferredUnderWaterProgram.createShader(NULL, NULL); @@ -2343,8 +2343,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSoftenProgram.mFeatures.hasReflectionProbes = mShaderLevel[SHADER_DEFERRED] > 2; gDeferredSoftenProgram.clearPermutations(); - gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER)); + gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredSoftenProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; @@ -2382,8 +2382,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredSoftenWaterProgram.mName = "Deferred Soften Underwater Shader"; gDeferredSoftenWaterProgram.mShaderFiles.clear(); - gDeferredSoftenWaterProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSoftenWaterProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSoftenWaterProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER)); + gDeferredSoftenWaterProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER)); gDeferredSoftenWaterProgram.clearPermutations(); gDeferredSoftenWaterProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; @@ -2435,8 +2435,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredShadowProgram.mFeatures.isDeferred = true; gDeferredShadowProgram.mFeatures.hasShadows = true; gDeferredShadowProgram.mShaderFiles.clear(); - gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowV.glsl", GL_VERTEX_SHADER)); + gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; if (gGLManager.mHasDepthClamp) { @@ -2454,8 +2454,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSkinnedShadowProgram.mFeatures.hasShadows = true; gDeferredSkinnedShadowProgram.mFeatures.hasObjectSkinning = true; gDeferredSkinnedShadowProgram.mShaderFiles.clear(); - gDeferredSkinnedShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowSkinnedV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSkinnedShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSkinnedShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowSkinnedV.glsl", GL_VERTEX_SHADER)); + gDeferredSkinnedShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredSkinnedShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; if (gGLManager.mHasDepthClamp) { @@ -2471,8 +2471,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredShadowCubeProgram.mFeatures.isDeferred = true; gDeferredShadowCubeProgram.mFeatures.hasShadows = true; gDeferredShadowCubeProgram.mShaderFiles.clear(); - gDeferredShadowCubeProgram.mShaderFiles.push_back(make_pair("deferred/shadowCubeV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredShadowCubeProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredShadowCubeProgram.mShaderFiles.push_back(make_pair("deferred/shadowCubeV.glsl", GL_VERTEX_SHADER)); + gDeferredShadowCubeProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER)); if (gGLManager.mHasDepthClamp) { gDeferredShadowCubeProgram.addPermutation("DEPTH_CLAMP", "1"); @@ -2488,8 +2488,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredShadowFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredShadowFullbrightAlphaMaskProgram.mShaderFiles.clear(); - gDeferredShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER)); + gDeferredShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER)); gDeferredShadowFullbrightAlphaMaskProgram.clearPermutations(); if (gGLManager.mHasDepthClamp) @@ -2509,8 +2509,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mFeatures.hasObjectSkinning = true; gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mShaderFiles.clear(); - gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskSkinnedV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskSkinnedV.glsl", GL_VERTEX_SHADER)); + gDeferredSkinnedShadowFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER)); gDeferredSkinnedShadowFullbrightAlphaMaskProgram.clearPermutations(); if (gGLManager.mHasDepthClamp) @@ -2529,8 +2529,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredShadowAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredShadowAlphaMaskProgram.mShaderFiles.clear(); - gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER)); + gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER)); if (gGLManager.mHasDepthClamp) { gDeferredShadowAlphaMaskProgram.addPermutation("DEPTH_CLAMP", "1"); @@ -2547,8 +2547,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSkinnedShadowAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredSkinnedShadowAlphaMaskProgram.mFeatures.hasObjectSkinning = true; gDeferredSkinnedShadowAlphaMaskProgram.mShaderFiles.clear(); - gDeferredSkinnedShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskSkinnedV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredSkinnedShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredSkinnedShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskSkinnedV.glsl", GL_VERTEX_SHADER)); + gDeferredSkinnedShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER)); if (gGLManager.mHasDepthClamp) { gDeferredSkinnedShadowAlphaMaskProgram.addPermutation("DEPTH_CLAMP", "1"); @@ -2564,8 +2564,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarShadowProgram.mFeatures.hasSkinning = true; gDeferredAvatarShadowProgram.mShaderFiles.clear(); - gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowF.glsl", GL_FRAGMENT_SHADER)); if (gGLManager.mHasDepthClamp) { gDeferredAvatarShadowProgram.addPermutation("DEPTH_CLAMP", "1"); @@ -2580,8 +2580,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarAlphaShadowProgram.mName = "Deferred Avatar Alpha Shadow Shader"; gDeferredAvatarAlphaShadowProgram.mFeatures.hasSkinning = true; gDeferredAvatarAlphaShadowProgram.mShaderFiles.clear(); - gDeferredAvatarAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAvatarAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredAvatarAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredAvatarAlphaShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); gDeferredAvatarAlphaShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredAvatarAlphaShadowProgram.createShader(NULL, NULL); @@ -2593,8 +2593,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarAlphaMaskShadowProgram.mName = "Deferred Avatar Alpha Mask Shadow Shader"; gDeferredAvatarAlphaMaskShadowProgram.mFeatures.hasSkinning = true; gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.clear(); - gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaMaskShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredAvatarAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaMaskShadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredAvatarAlphaMaskShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); gDeferredAvatarAlphaMaskShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredAvatarAlphaMaskShadowProgram.createShader(NULL, NULL); @@ -2607,8 +2607,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAttachmentShadowProgram.mFeatures.hasObjectSkinning = true; gDeferredAttachmentShadowProgram.mShaderFiles.clear(); - gDeferredAttachmentShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAttachmentShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAttachmentShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredAttachmentShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentShadowF.glsl", GL_FRAGMENT_SHADER)); if (gGLManager.mHasDepthClamp) { gDeferredAttachmentShadowProgram.addPermutation("DEPTH_CLAMP", "1"); @@ -2623,8 +2623,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAttachmentAlphaShadowProgram.mName = "Deferred Attachment Alpha Shadow Shader"; gDeferredAttachmentAlphaShadowProgram.mFeatures.hasObjectSkinning = true; gDeferredAttachmentAlphaShadowProgram.mShaderFiles.clear(); - gDeferredAttachmentAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAttachmentAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAttachmentAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredAttachmentAlphaShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredAttachmentAlphaShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); gDeferredAttachmentAlphaShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredAttachmentAlphaShadowProgram.createShader(NULL, NULL); @@ -2636,8 +2636,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAttachmentAlphaMaskShadowProgram.mName = "Deferred Attachment Alpha Mask Shadow Shader"; gDeferredAttachmentAlphaMaskShadowProgram.mFeatures.hasObjectSkinning = true; gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.clear(); - gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaMaskShadowF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaShadowV.glsl", GL_VERTEX_SHADER)); + gDeferredAttachmentAlphaMaskShadowProgram.mShaderFiles.push_back(make_pair("deferred/attachmentAlphaMaskShadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredAttachmentAlphaMaskShadowProgram.addPermutation("DEPTH_CLAMP", gGLManager.mHasDepthClamp ? "1" : "0"); gDeferredAttachmentAlphaMaskShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredAttachmentAlphaMaskShadowProgram.createShader(NULL, NULL); @@ -2660,8 +2660,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTerrainProgram.mFeatures.hasTransport = true; gDeferredTerrainProgram.mShaderFiles.clear(); - gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER)); + gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER)); gDeferredTerrainProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredTerrainProgram.createShader(NULL, NULL); llassert(success); @@ -2683,8 +2683,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTerrainWaterProgram.mFeatures.hasTransport = true; gDeferredTerrainWaterProgram.mShaderFiles.clear(); - gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER)); + gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER)); gDeferredTerrainWaterProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredTerrainWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; gDeferredTerrainWaterProgram.addPermutation("WATER_FOG", "1"); @@ -2698,8 +2698,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarProgram.mFeatures.hasSkinning = true; gDeferredAvatarProgram.mFeatures.encodesNormal = true; gDeferredAvatarProgram.mShaderFiles.clear(); - gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarV.glsl", GL_VERTEX_SHADER)); + gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER)); gDeferredAvatarProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredAvatarProgram.createShader(NULL, NULL); llassert(success); @@ -2723,8 +2723,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarAlphaProgram.mFeatures.hasShadows = true; gDeferredAvatarAlphaProgram.mShaderFiles.clear(); - gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER)); + gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER)); gDeferredAvatarAlphaProgram.clearPermutations(); gDeferredAvatarAlphaProgram.addPermutation("USE_DIFFUSE_TEX", "1"); @@ -2763,8 +2763,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredPostGammaCorrectProgram.mFeatures.hasSrgb = true; gDeferredPostGammaCorrectProgram.mFeatures.isDeferred = true; gDeferredPostGammaCorrectProgram.mShaderFiles.clear(); - gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredGammaCorrect.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredGammaCorrect.glsl", GL_FRAGMENT_SHADER)); gDeferredPostGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredPostGammaCorrectProgram.createShader(NULL, NULL); llassert(success); @@ -2775,8 +2775,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gFXAAProgram.mName = "FXAA Shader"; gFXAAProgram.mFeatures.isDeferred = true; gFXAAProgram.mShaderFiles.clear(); - gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB)); - gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/fxaaF.glsl", GL_FRAGMENT_SHADER_ARB)); + gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER)); + gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/fxaaF.glsl", GL_FRAGMENT_SHADER)); gFXAAProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gFXAAProgram.createShader(NULL, NULL); llassert(success); @@ -2787,8 +2787,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredPostProgram.mName = "Deferred Post Shader"; gFXAAProgram.mFeatures.isDeferred = true; gDeferredPostProgram.mShaderFiles.clear(); - gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredF.glsl", GL_FRAGMENT_SHADER)); gDeferredPostProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredPostProgram.createShader(NULL, NULL); llassert(success); @@ -2799,8 +2799,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredCoFProgram.mName = "Deferred CoF Shader"; gDeferredCoFProgram.mShaderFiles.clear(); gDeferredCoFProgram.mFeatures.isDeferred = true; - gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/cofF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/cofF.glsl", GL_FRAGMENT_SHADER)); gDeferredCoFProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredCoFProgram.createShader(NULL, NULL); llassert(success); @@ -2811,8 +2811,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredDoFCombineProgram.mName = "Deferred DoFCombine Shader"; gDeferredDoFCombineProgram.mFeatures.isDeferred = true; gDeferredDoFCombineProgram.mShaderFiles.clear(); - gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/dofCombineF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/dofCombineF.glsl", GL_FRAGMENT_SHADER)); gDeferredDoFCombineProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredDoFCombineProgram.createShader(NULL, NULL); llassert(success); @@ -2823,8 +2823,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredPostNoDoFProgram.mName = "Deferred Post Shader"; gDeferredPostNoDoFProgram.mFeatures.isDeferred = true; gDeferredPostNoDoFProgram.mShaderFiles.clear(); - gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoDoFF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoDoFF.glsl", GL_FRAGMENT_SHADER)); gDeferredPostNoDoFProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredPostNoDoFProgram.createShader(NULL, NULL); llassert(success); @@ -2839,8 +2839,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLSkyProgram.mFeatures.hasGamma = true; gDeferredWLSkyProgram.mFeatures.hasSrgb = true; - gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyV.glsl", GL_VERTEX_SHADER)); + gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyF.glsl", GL_FRAGMENT_SHADER)); gDeferredWLSkyProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredWLSkyProgram.mShaderGroup = LLGLSLShader::SG_SKY; @@ -2857,8 +2857,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLCloudProgram.mFeatures.hasGamma = true; gDeferredWLCloudProgram.mFeatures.hasSrgb = true; - gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsV.glsl", GL_VERTEX_SHADER)); + gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsF.glsl", GL_FRAGMENT_SHADER)); gDeferredWLCloudProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredWLCloudProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gDeferredWLCloudProgram.createShader(NULL, NULL); @@ -2876,8 +2876,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLSunProgram.mFeatures.disableTextureIndex = true; gDeferredWLSunProgram.mFeatures.hasSrgb = true; gDeferredWLSunProgram.mShaderFiles.clear(); - gDeferredWLSunProgram.mShaderFiles.push_back(make_pair("deferred/sunDiscV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredWLSunProgram.mShaderFiles.push_back(make_pair("deferred/sunDiscF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredWLSunProgram.mShaderFiles.push_back(make_pair("deferred/sunDiscV.glsl", GL_VERTEX_SHADER)); + gDeferredWLSunProgram.mShaderFiles.push_back(make_pair("deferred/sunDiscF.glsl", GL_FRAGMENT_SHADER)); gDeferredWLSunProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredWLSunProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gDeferredWLSunProgram.createShader(NULL, NULL); @@ -2896,8 +2896,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLMoonProgram.mFeatures.disableTextureIndex = true; gDeferredWLMoonProgram.mShaderFiles.clear(); - gDeferredWLMoonProgram.mShaderFiles.push_back(make_pair("deferred/moonV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredWLMoonProgram.mShaderFiles.push_back(make_pair("deferred/moonF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredWLMoonProgram.mShaderFiles.push_back(make_pair("deferred/moonV.glsl", GL_VERTEX_SHADER)); + gDeferredWLMoonProgram.mShaderFiles.push_back(make_pair("deferred/moonF.glsl", GL_FRAGMENT_SHADER)); gDeferredWLMoonProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredWLMoonProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gDeferredWLMoonProgram.createShader(NULL, NULL); @@ -2908,8 +2908,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredStarProgram.mName = "Deferred Star Program"; gDeferredStarProgram.mShaderFiles.clear(); - gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsV.glsl", GL_VERTEX_SHADER_ARB)); - gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsV.glsl", GL_VERTEX_SHADER)); + gDeferredStarProgram.mShaderFiles.push_back(make_pair("deferred/starsF.glsl", GL_FRAGMENT_SHADER)); gDeferredStarProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gDeferredStarProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gDeferredStarProgram.createShader(NULL, NULL); @@ -2920,8 +2920,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gNormalMapGenProgram.mName = "Normal Map Generation Program"; gNormalMapGenProgram.mShaderFiles.clear(); - gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenV.glsl", GL_VERTEX_SHADER_ARB)); - gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenF.glsl", GL_FRAGMENT_SHADER_ARB)); + gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenV.glsl", GL_VERTEX_SHADER)); + gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenF.glsl", GL_FRAGMENT_SHADER)); gNormalMapGenProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; gNormalMapGenProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gNormalMapGenProgram.createShader(NULL, NULL); @@ -2944,8 +2944,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasLighting = true; gObjectSimpleNonIndexedTexGenProgram.mFeatures.disableTextureIndex = true; gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.clear(); - gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleNonIndexedTexGenProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gObjectSimpleNonIndexedTexGenProgram.createShader(NULL, NULL); } @@ -2960,8 +2960,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasLighting = true; gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.disableTextureIndex = true; gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.clear(); - gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleNonIndexedTexGenWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectSimpleNonIndexedTexGenWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gObjectSimpleNonIndexedTexGenWaterProgram.createShader(NULL, NULL); @@ -2978,8 +2978,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectAlphaMaskNonIndexedProgram.mFeatures.disableTextureIndex = true; gObjectAlphaMaskNonIndexedProgram.mFeatures.hasAlphaMask = true; gObjectAlphaMaskNonIndexedProgram.mShaderFiles.clear(); - gObjectAlphaMaskNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleNonIndexedV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectAlphaMaskNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectAlphaMaskNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleNonIndexedV.glsl", GL_VERTEX_SHADER)); + gObjectAlphaMaskNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gObjectAlphaMaskNonIndexedProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gObjectAlphaMaskNonIndexedProgram.createShader(NULL, NULL); } @@ -2995,8 +2995,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.disableTextureIndex = true; gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.hasAlphaMask = true; gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.clear(); - gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleNonIndexedV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleNonIndexedV.glsl", GL_VERTEX_SHADER)); + gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectAlphaMaskNonIndexedWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectAlphaMaskNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gObjectAlphaMaskNonIndexedWaterProgram.createShader(NULL, NULL); @@ -3013,8 +3013,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectAlphaMaskNoColorProgram.mFeatures.disableTextureIndex = true; gObjectAlphaMaskNoColorProgram.mFeatures.hasAlphaMask = true; gObjectAlphaMaskNoColorProgram.mShaderFiles.clear(); - gObjectAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("objects/simpleNoColorV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("objects/simpleNoColorV.glsl", GL_VERTEX_SHADER)); + gObjectAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gObjectAlphaMaskNoColorProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gObjectAlphaMaskNoColorProgram.createShader(NULL, NULL); } @@ -3030,8 +3030,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectAlphaMaskNoColorWaterProgram.mFeatures.disableTextureIndex = true; gObjectAlphaMaskNoColorWaterProgram.mFeatures.hasAlphaMask = true; gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.clear(); - gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleNoColorV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleNoColorV.glsl", GL_VERTEX_SHADER)); + gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectAlphaMaskNoColorWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectAlphaMaskNoColorWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gObjectAlphaMaskNoColorWaterProgram.createShader(NULL, NULL); @@ -3048,8 +3048,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gTreeProgram.mFeatures.disableTextureIndex = true; gTreeProgram.mFeatures.hasAlphaMask = true; gTreeProgram.mShaderFiles.clear(); - gTreeProgram.mShaderFiles.push_back(make_pair("objects/treeV.glsl", GL_VERTEX_SHADER_ARB)); - gTreeProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTreeProgram.mShaderFiles.push_back(make_pair("objects/treeV.glsl", GL_VERTEX_SHADER)); + gTreeProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gTreeProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gTreeProgram.createShader(NULL, NULL); } @@ -3065,8 +3065,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gTreeWaterProgram.mFeatures.disableTextureIndex = true; gTreeWaterProgram.mFeatures.hasAlphaMask = true; gTreeWaterProgram.mShaderFiles.clear(); - gTreeWaterProgram.mShaderFiles.push_back(make_pair("objects/treeV.glsl", GL_VERTEX_SHADER_ARB)); - gTreeWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTreeWaterProgram.mShaderFiles.push_back(make_pair("objects/treeV.glsl", GL_VERTEX_SHADER)); + gTreeWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); gTreeWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gTreeWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gTreeWaterProgram.createShader(NULL, NULL); @@ -3082,8 +3082,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightNoColorProgram.mFeatures.hasSrgb = true; gObjectFullbrightNoColorProgram.mFeatures.disableTextureIndex = true; gObjectFullbrightNoColorProgram.mShaderFiles.clear(); - gObjectFullbrightNoColorProgram.mShaderFiles.push_back(make_pair("objects/fullbrightNoColorV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightNoColorProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightNoColorProgram.mShaderFiles.push_back(make_pair("objects/fullbrightNoColorV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightNoColorProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightNoColorProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gObjectFullbrightNoColorProgram.createShader(NULL, NULL); } @@ -3097,8 +3097,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightNoColorWaterProgram.mFeatures.hasTransport = true; gObjectFullbrightNoColorWaterProgram.mFeatures.disableTextureIndex = true; gObjectFullbrightNoColorWaterProgram.mShaderFiles.clear(); - gObjectFullbrightNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightNoColorV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightNoColorV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightNoColorWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectFullbrightNoColorWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = gObjectFullbrightNoColorWaterProgram.createShader(NULL, NULL); @@ -3110,8 +3110,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gImpostorProgram.mFeatures.disableTextureIndex = true; gImpostorProgram.mFeatures.hasSrgb = true; gImpostorProgram.mShaderFiles.clear(); - gImpostorProgram.mShaderFiles.push_back(make_pair("objects/impostorV.glsl", GL_VERTEX_SHADER_ARB)); - gImpostorProgram.mShaderFiles.push_back(make_pair("objects/impostorF.glsl", GL_FRAGMENT_SHADER_ARB)); + gImpostorProgram.mShaderFiles.push_back(make_pair("objects/impostorV.glsl", GL_VERTEX_SHADER)); + gImpostorProgram.mShaderFiles.push_back(make_pair("objects/impostorF.glsl", GL_FRAGMENT_SHADER)); gImpostorProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gImpostorProgram.createShader(NULL, NULL); } @@ -3127,8 +3127,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectPreviewProgram.mFeatures.mIndexedTextureChannels = 0; gObjectPreviewProgram.mFeatures.disableTextureIndex = true; gObjectPreviewProgram.mShaderFiles.clear(); - gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER)); + gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewF.glsl", GL_FRAGMENT_SHADER)); gObjectPreviewProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gObjectPreviewProgram.createShader(NULL, NULL); gObjectPreviewProgram.mFeatures.hasLighting = true; @@ -3145,8 +3145,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gPhysicsPreviewProgram.mFeatures.mIndexedTextureChannels = 0; gPhysicsPreviewProgram.mFeatures.disableTextureIndex = true; gPhysicsPreviewProgram.mShaderFiles.clear(); - gPhysicsPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewPhysicsV.glsl", GL_VERTEX_SHADER_ARB)); - gPhysicsPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewPhysicsF.glsl", GL_FRAGMENT_SHADER_ARB)); + gPhysicsPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewPhysicsV.glsl", GL_VERTEX_SHADER)); + gPhysicsPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewPhysicsF.glsl", GL_FRAGMENT_SHADER)); gPhysicsPreviewProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = gPhysicsPreviewProgram.createShader(NULL, NULL); gPhysicsPreviewProgram.mFeatures.hasLighting = false; @@ -3162,8 +3162,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectSimpleProgram.mFeatures.hasLighting = true; gObjectSimpleProgram.mFeatures.mIndexedTextureChannels = 0; gObjectSimpleProgram.mShaderFiles.clear(); - gObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectSimpleProgram, gSkinnedObjectSimpleProgram); success = success && gObjectSimpleProgram.createShader(NULL, NULL); @@ -3183,8 +3183,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() // gObjectSimpleImpostorProgram.mFeatures.hasAlphaMask = true; gObjectSimpleImpostorProgram.mShaderFiles.clear(); - gObjectSimpleImpostorProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleImpostorProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleImpostorProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleImpostorProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleImpostorProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectSimpleImpostorProgram, gSkinnedObjectSimpleImpostorProgram); success = success && gObjectSimpleImpostorProgram.createShader(NULL, NULL); @@ -3200,8 +3200,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectSimpleWaterProgram.mFeatures.hasLighting = true; gObjectSimpleWaterProgram.mFeatures.mIndexedTextureChannels = 0; gObjectSimpleWaterProgram.mShaderFiles.clear(); - gObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectSimpleWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; make_rigged_variant(gObjectSimpleWaterProgram, gSkinnedObjectSimpleWaterProgram); @@ -3213,8 +3213,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectBumpProgram.mName = "Bump Shader"; gObjectBumpProgram.mFeatures.encodesNormal = true; gObjectBumpProgram.mShaderFiles.clear(); - gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpV.glsl", GL_VERTEX_SHADER)); + gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpF.glsl", GL_FRAGMENT_SHADER)); gObjectBumpProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectBumpProgram, gSkinnedObjectBumpProgram); success = success && gObjectBumpProgram.createShader(NULL, NULL); @@ -3243,8 +3243,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectSimpleAlphaMaskProgram.mFeatures.hasAlphaMask = true; gObjectSimpleAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0; gObjectSimpleAlphaMaskProgram.mShaderFiles.clear(); - gObjectSimpleAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectSimpleAlphaMaskProgram, gSkinnedObjectSimpleAlphaMaskProgram); success = success && gObjectSimpleAlphaMaskProgram.createShader(NULL, NULL); @@ -3261,8 +3261,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectSimpleWaterAlphaMaskProgram.mFeatures.hasAlphaMask = true; gObjectSimpleWaterAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0; gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.clear(); - gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER)); + gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectSimpleWaterAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectSimpleWaterAlphaMaskProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = make_rigged_variant(gObjectSimpleWaterAlphaMaskProgram, gSkinnedObjectSimpleWaterAlphaMaskProgram); @@ -3279,8 +3279,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightProgram.mFeatures.hasSrgb = true; gObjectFullbrightProgram.mFeatures.mIndexedTextureChannels = 0; gObjectFullbrightProgram.mShaderFiles.clear(); - gObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectFullbrightProgram, gSkinnedObjectFullbrightProgram); success = success && gObjectFullbrightProgram.createShader(NULL, NULL); @@ -3295,8 +3295,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightWaterProgram.mFeatures.hasTransport = true; gObjectFullbrightWaterProgram.mFeatures.mIndexedTextureChannels = 0; gObjectFullbrightWaterProgram.mShaderFiles.clear(); - gObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectFullbrightWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = make_rigged_variant(gObjectFullbrightWaterProgram, gSkinnedObjectFullbrightWaterProgram); @@ -3313,8 +3313,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectEmissiveProgram.mFeatures.hasSrgb = true; gObjectEmissiveProgram.mFeatures.mIndexedTextureChannels = 0; gObjectEmissiveProgram.mShaderFiles.clear(); - gObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER)); + gObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gObjectEmissiveProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectEmissiveProgram, gSkinnedObjectEmissiveProgram); success = success && gObjectEmissiveProgram.createShader(NULL, NULL); @@ -3329,8 +3329,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectEmissiveWaterProgram.mFeatures.hasTransport = true; gObjectEmissiveWaterProgram.mFeatures.mIndexedTextureChannels = 0; gObjectEmissiveWaterProgram.mShaderFiles.clear(); - gObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER)); + gObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectEmissiveWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectEmissiveWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = make_rigged_variant(gObjectEmissiveWaterProgram, gSkinnedObjectEmissiveWaterProgram); @@ -3348,8 +3348,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightAlphaMaskProgram.mFeatures.hasSrgb = true; gObjectFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0; gObjectFullbrightAlphaMaskProgram.mShaderFiles.clear(); - gObjectFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectFullbrightAlphaMaskProgram, gSkinnedObjectFullbrightAlphaMaskProgram); success = success && gObjectFullbrightAlphaMaskProgram.createShader(NULL, NULL); @@ -3365,8 +3365,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightWaterAlphaMaskProgram.mFeatures.hasAlphaMask = true; gObjectFullbrightWaterAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0; gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.clear(); - gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightWaterAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectFullbrightWaterAlphaMaskProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = make_rigged_variant(gObjectFullbrightWaterAlphaMaskProgram, gSkinnedObjectFullbrightWaterAlphaMaskProgram); @@ -3383,8 +3383,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectShinyProgram.mFeatures.isShiny = true; gObjectShinyProgram.mFeatures.mIndexedTextureChannels = 0; gObjectShinyProgram.mShaderFiles.clear(); - gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER)); + gObjectShinyProgram.mShaderFiles.push_back(make_pair("objects/shinyF.glsl", GL_FRAGMENT_SHADER)); gObjectShinyProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectShinyProgram, gSkinnedObjectShinyProgram); success = success && gObjectShinyProgram.createShader(NULL, NULL); @@ -3400,8 +3400,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectShinyWaterProgram.mFeatures.hasAtmospherics = true; gObjectShinyWaterProgram.mFeatures.mIndexedTextureChannels = 0; gObjectShinyWaterProgram.mShaderFiles.clear(); - gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); - gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER_ARB)); + gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyWaterF.glsl", GL_FRAGMENT_SHADER)); + gObjectShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/shinyV.glsl", GL_VERTEX_SHADER)); gObjectShinyWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectShinyWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = make_rigged_variant(gObjectShinyWaterProgram, gSkinnedObjectShinyWaterProgram); @@ -3418,8 +3418,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightShinyProgram.mFeatures.hasTransport = true; gObjectFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = 0; gObjectFullbrightShinyProgram.mShaderFiles.clear(); - gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightShinyProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; success = make_rigged_variant(gObjectFullbrightShinyProgram, gSkinnedObjectFullbrightShinyProgram); success = success && gObjectFullbrightShinyProgram.createShader(NULL, NULL); @@ -3436,8 +3436,8 @@ BOOL LLViewerShaderMgr::loadShadersObject() gObjectFullbrightShinyWaterProgram.mFeatures.hasWaterFog = true; gObjectFullbrightShinyWaterProgram.mFeatures.mIndexedTextureChannels = 0; gObjectFullbrightShinyWaterProgram.mShaderFiles.clear(); - gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyV.glsl", GL_VERTEX_SHADER)); + gObjectFullbrightShinyWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyWaterF.glsl", GL_FRAGMENT_SHADER)); gObjectFullbrightShinyWaterProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; gObjectFullbrightShinyWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; success = make_rigged_variant(gObjectFullbrightShinyWaterProgram, gSkinnedObjectFullbrightShinyWaterProgram); @@ -3478,8 +3478,8 @@ BOOL LLViewerShaderMgr::loadShadersAvatar() gAvatarProgram.mFeatures.hasAlphaMask = true; gAvatarProgram.mFeatures.disableTextureIndex = true; gAvatarProgram.mShaderFiles.clear(); - gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB)); - gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarF.glsl", GL_FRAGMENT_SHADER_ARB)); + gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER)); + gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarF.glsl", GL_FRAGMENT_SHADER)); gAvatarProgram.mShaderLevel = mShaderLevel[SHADER_AVATAR]; success = gAvatarProgram.createShader(NULL, NULL); @@ -3495,8 +3495,8 @@ BOOL LLViewerShaderMgr::loadShadersAvatar() gAvatarWaterProgram.mFeatures.hasAlphaMask = true; gAvatarWaterProgram.mFeatures.disableTextureIndex = true; gAvatarWaterProgram.mShaderFiles.clear(); - gAvatarWaterProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB)); - gAvatarWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gAvatarWaterProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER)); + gAvatarWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER)); // Note: no cloth under water: gAvatarWaterProgram.mShaderLevel = llmin(mShaderLevel[SHADER_AVATAR], 1); gAvatarWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; @@ -3516,8 +3516,8 @@ BOOL LLViewerShaderMgr::loadShadersAvatar() gAvatarPickProgram.mFeatures.hasSkinning = true; gAvatarPickProgram.mFeatures.disableTextureIndex = true; gAvatarPickProgram.mShaderFiles.clear(); - gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarV.glsl", GL_VERTEX_SHADER_ARB)); - gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarF.glsl", GL_FRAGMENT_SHADER_ARB)); + gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarV.glsl", GL_VERTEX_SHADER)); + gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarF.glsl", GL_FRAGMENT_SHADER)); gAvatarPickProgram.mShaderLevel = mShaderLevel[SHADER_AVATAR]; success = gAvatarPickProgram.createShader(NULL, NULL); } @@ -3534,8 +3534,8 @@ BOOL LLViewerShaderMgr::loadShadersAvatar() gAvatarEyeballProgram.mFeatures.hasAlphaMask = true; gAvatarEyeballProgram.mFeatures.disableTextureIndex = true; gAvatarEyeballProgram.mShaderFiles.clear(); - gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballV.glsl", GL_VERTEX_SHADER_ARB)); - gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballF.glsl", GL_FRAGMENT_SHADER_ARB)); + gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballV.glsl", GL_VERTEX_SHADER)); + gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballF.glsl", GL_FRAGMENT_SHADER)); gAvatarEyeballProgram.mShaderLevel = mShaderLevel[SHADER_AVATAR]; success = gAvatarEyeballProgram.createShader(NULL, NULL); } @@ -3558,8 +3558,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gHighlightProgram.mName = "Highlight Shader"; gHighlightProgram.mShaderFiles.clear(); - gHighlightProgram.mShaderFiles.push_back(make_pair("interface/highlightV.glsl", GL_VERTEX_SHADER_ARB)); - gHighlightProgram.mShaderFiles.push_back(make_pair("interface/highlightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gHighlightProgram.mShaderFiles.push_back(make_pair("interface/highlightV.glsl", GL_VERTEX_SHADER)); + gHighlightProgram.mShaderFiles.push_back(make_pair("interface/highlightF.glsl", GL_FRAGMENT_SHADER)); gHighlightProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = make_rigged_variant(gHighlightProgram, gSkinnedHighlightProgram); success = success && gHighlightProgram.createShader(NULL, NULL); @@ -3569,8 +3569,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gHighlightNormalProgram.mName = "Highlight Normals Shader"; gHighlightNormalProgram.mShaderFiles.clear(); - gHighlightNormalProgram.mShaderFiles.push_back(make_pair("interface/highlightNormV.glsl", GL_VERTEX_SHADER_ARB)); - gHighlightNormalProgram.mShaderFiles.push_back(make_pair("interface/highlightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gHighlightNormalProgram.mShaderFiles.push_back(make_pair("interface/highlightNormV.glsl", GL_VERTEX_SHADER)); + gHighlightNormalProgram.mShaderFiles.push_back(make_pair("interface/highlightF.glsl", GL_FRAGMENT_SHADER)); gHighlightNormalProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gHighlightNormalProgram.createShader(NULL, NULL); } @@ -3579,8 +3579,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gHighlightSpecularProgram.mName = "Highlight Spec Shader"; gHighlightSpecularProgram.mShaderFiles.clear(); - gHighlightSpecularProgram.mShaderFiles.push_back(make_pair("interface/highlightSpecV.glsl", GL_VERTEX_SHADER_ARB)); - gHighlightSpecularProgram.mShaderFiles.push_back(make_pair("interface/highlightF.glsl", GL_FRAGMENT_SHADER_ARB)); + gHighlightSpecularProgram.mShaderFiles.push_back(make_pair("interface/highlightSpecV.glsl", GL_VERTEX_SHADER)); + gHighlightSpecularProgram.mShaderFiles.push_back(make_pair("interface/highlightF.glsl", GL_FRAGMENT_SHADER)); gHighlightSpecularProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gHighlightSpecularProgram.createShader(NULL, NULL); } @@ -3589,8 +3589,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gUIProgram.mName = "UI Shader"; gUIProgram.mShaderFiles.clear(); - gUIProgram.mShaderFiles.push_back(make_pair("interface/uiV.glsl", GL_VERTEX_SHADER_ARB)); - gUIProgram.mShaderFiles.push_back(make_pair("interface/uiF.glsl", GL_FRAGMENT_SHADER_ARB)); + gUIProgram.mShaderFiles.push_back(make_pair("interface/uiV.glsl", GL_VERTEX_SHADER)); + gUIProgram.mShaderFiles.push_back(make_pair("interface/uiF.glsl", GL_FRAGMENT_SHADER)); gUIProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gUIProgram.createShader(NULL, NULL); } @@ -3599,8 +3599,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gPathfindingProgram.mName = "Pathfinding Shader"; gPathfindingProgram.mShaderFiles.clear(); - gPathfindingProgram.mShaderFiles.push_back(make_pair("interface/pathfindingV.glsl", GL_VERTEX_SHADER_ARB)); - gPathfindingProgram.mShaderFiles.push_back(make_pair("interface/pathfindingF.glsl", GL_FRAGMENT_SHADER_ARB)); + gPathfindingProgram.mShaderFiles.push_back(make_pair("interface/pathfindingV.glsl", GL_VERTEX_SHADER)); + gPathfindingProgram.mShaderFiles.push_back(make_pair("interface/pathfindingF.glsl", GL_FRAGMENT_SHADER)); gPathfindingProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gPathfindingProgram.createShader(NULL, NULL); } @@ -3609,8 +3609,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gPathfindingNoNormalsProgram.mName = "PathfindingNoNormals Shader"; gPathfindingNoNormalsProgram.mShaderFiles.clear(); - gPathfindingNoNormalsProgram.mShaderFiles.push_back(make_pair("interface/pathfindingNoNormalV.glsl", GL_VERTEX_SHADER_ARB)); - gPathfindingNoNormalsProgram.mShaderFiles.push_back(make_pair("interface/pathfindingF.glsl", GL_FRAGMENT_SHADER_ARB)); + gPathfindingNoNormalsProgram.mShaderFiles.push_back(make_pair("interface/pathfindingNoNormalV.glsl", GL_VERTEX_SHADER)); + gPathfindingNoNormalsProgram.mShaderFiles.push_back(make_pair("interface/pathfindingF.glsl", GL_FRAGMENT_SHADER)); gPathfindingNoNormalsProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gPathfindingNoNormalsProgram.createShader(NULL, NULL); } @@ -3619,8 +3619,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gCustomAlphaProgram.mName = "Custom Alpha Shader"; gCustomAlphaProgram.mShaderFiles.clear(); - gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaV.glsl", GL_VERTEX_SHADER_ARB)); - gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaF.glsl", GL_FRAGMENT_SHADER_ARB)); + gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaV.glsl", GL_VERTEX_SHADER)); + gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaF.glsl", GL_FRAGMENT_SHADER)); gCustomAlphaProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gCustomAlphaProgram.createShader(NULL, NULL); } @@ -3629,8 +3629,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gSplatTextureRectProgram.mName = "Splat Texture Rect Shader"; gSplatTextureRectProgram.mShaderFiles.clear(); - gSplatTextureRectProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER_ARB)); - gSplatTextureRectProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectF.glsl", GL_FRAGMENT_SHADER_ARB)); + gSplatTextureRectProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER)); + gSplatTextureRectProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectF.glsl", GL_FRAGMENT_SHADER)); gSplatTextureRectProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gSplatTextureRectProgram.createShader(NULL, NULL); if (success) @@ -3645,8 +3645,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gGlowCombineProgram.mName = "Glow Combine Shader"; gGlowCombineProgram.mShaderFiles.clear(); - gGlowCombineProgram.mShaderFiles.push_back(make_pair("interface/glowcombineV.glsl", GL_VERTEX_SHADER_ARB)); - gGlowCombineProgram.mShaderFiles.push_back(make_pair("interface/glowcombineF.glsl", GL_FRAGMENT_SHADER_ARB)); + gGlowCombineProgram.mShaderFiles.push_back(make_pair("interface/glowcombineV.glsl", GL_VERTEX_SHADER)); + gGlowCombineProgram.mShaderFiles.push_back(make_pair("interface/glowcombineF.glsl", GL_FRAGMENT_SHADER)); gGlowCombineProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gGlowCombineProgram.createShader(NULL, NULL); if (success) @@ -3662,8 +3662,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gGlowCombineFXAAProgram.mName = "Glow CombineFXAA Shader"; gGlowCombineFXAAProgram.mShaderFiles.clear(); - gGlowCombineFXAAProgram.mShaderFiles.push_back(make_pair("interface/glowcombineFXAAV.glsl", GL_VERTEX_SHADER_ARB)); - gGlowCombineFXAAProgram.mShaderFiles.push_back(make_pair("interface/glowcombineFXAAF.glsl", GL_FRAGMENT_SHADER_ARB)); + gGlowCombineFXAAProgram.mShaderFiles.push_back(make_pair("interface/glowcombineFXAAV.glsl", GL_VERTEX_SHADER)); + gGlowCombineFXAAProgram.mShaderFiles.push_back(make_pair("interface/glowcombineFXAAF.glsl", GL_FRAGMENT_SHADER)); gGlowCombineFXAAProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gGlowCombineFXAAProgram.createShader(NULL, NULL); if (success) @@ -3679,8 +3679,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gTwoTextureAddProgram.mName = "Two Texture Add Shader"; gTwoTextureAddProgram.mShaderFiles.clear(); - gTwoTextureAddProgram.mShaderFiles.push_back(make_pair("interface/twotextureaddV.glsl", GL_VERTEX_SHADER_ARB)); - gTwoTextureAddProgram.mShaderFiles.push_back(make_pair("interface/twotextureaddF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTwoTextureAddProgram.mShaderFiles.push_back(make_pair("interface/twotextureaddV.glsl", GL_VERTEX_SHADER)); + gTwoTextureAddProgram.mShaderFiles.push_back(make_pair("interface/twotextureaddF.glsl", GL_FRAGMENT_SHADER)); gTwoTextureAddProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gTwoTextureAddProgram.createShader(NULL, NULL); if (success) @@ -3696,8 +3696,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gTwoTextureCompareProgram.mName = "Two Texture Compare Shader"; gTwoTextureCompareProgram.mShaderFiles.clear(); - gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareV.glsl", GL_VERTEX_SHADER_ARB)); - gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareF.glsl", GL_FRAGMENT_SHADER_ARB)); + gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareV.glsl", GL_VERTEX_SHADER)); + gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareF.glsl", GL_FRAGMENT_SHADER)); gTwoTextureCompareProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gTwoTextureCompareProgram.createShader(NULL, NULL); if (success) @@ -3713,8 +3713,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gOneTextureFilterProgram.mName = "One Texture Filter Shader"; gOneTextureFilterProgram.mShaderFiles.clear(); - gOneTextureFilterProgram.mShaderFiles.push_back(make_pair("interface/onetexturefilterV.glsl", GL_VERTEX_SHADER_ARB)); - gOneTextureFilterProgram.mShaderFiles.push_back(make_pair("interface/onetexturefilterF.glsl", GL_FRAGMENT_SHADER_ARB)); + gOneTextureFilterProgram.mShaderFiles.push_back(make_pair("interface/onetexturefilterV.glsl", GL_VERTEX_SHADER)); + gOneTextureFilterProgram.mShaderFiles.push_back(make_pair("interface/onetexturefilterF.glsl", GL_FRAGMENT_SHADER)); gOneTextureFilterProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gOneTextureFilterProgram.createShader(NULL, NULL); if (success) @@ -3729,8 +3729,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gOneTextureNoColorProgram.mName = "One Texture No Color Shader"; gOneTextureNoColorProgram.mShaderFiles.clear(); - gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER_ARB)); - gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorF.glsl", GL_FRAGMENT_SHADER_ARB)); + gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER)); + gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorF.glsl", GL_FRAGMENT_SHADER)); gOneTextureNoColorProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gOneTextureNoColorProgram.createShader(NULL, NULL); if (success) @@ -3744,8 +3744,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gSolidColorProgram.mName = "Solid Color Shader"; gSolidColorProgram.mShaderFiles.clear(); - gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorV.glsl", GL_VERTEX_SHADER_ARB)); - gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorF.glsl", GL_FRAGMENT_SHADER_ARB)); + gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorV.glsl", GL_VERTEX_SHADER)); + gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorF.glsl", GL_FRAGMENT_SHADER)); gSolidColorProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gSolidColorProgram.createShader(NULL, NULL); if (success) @@ -3760,8 +3760,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gOcclusionProgram.mName = "Occlusion Shader"; gOcclusionProgram.mShaderFiles.clear(); - gOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionV.glsl", GL_VERTEX_SHADER_ARB)); - gOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER_ARB)); + gOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionV.glsl", GL_VERTEX_SHADER)); + gOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER)); gOcclusionProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; gOcclusionProgram.mRiggedVariant = &gSkinnedOcclusionProgram; success = gOcclusionProgram.createShader(NULL, NULL); @@ -3772,8 +3772,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() gSkinnedOcclusionProgram.mName = "Skinned Occlusion Shader"; gSkinnedOcclusionProgram.mFeatures.hasObjectSkinning = true; gSkinnedOcclusionProgram.mShaderFiles.clear(); - gSkinnedOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionSkinnedV.glsl", GL_VERTEX_SHADER_ARB)); - gSkinnedOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER_ARB)); + gSkinnedOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionSkinnedV.glsl", GL_VERTEX_SHADER)); + gSkinnedOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER)); gSkinnedOcclusionProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gSkinnedOcclusionProgram.createShader(NULL, NULL); } @@ -3782,8 +3782,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gOcclusionCubeProgram.mName = "Occlusion Cube Shader"; gOcclusionCubeProgram.mShaderFiles.clear(); - gOcclusionCubeProgram.mShaderFiles.push_back(make_pair("interface/occlusionCubeV.glsl", GL_VERTEX_SHADER_ARB)); - gOcclusionCubeProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER_ARB)); + gOcclusionCubeProgram.mShaderFiles.push_back(make_pair("interface/occlusionCubeV.glsl", GL_VERTEX_SHADER)); + gOcclusionCubeProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER)); gOcclusionCubeProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gOcclusionCubeProgram.createShader(NULL, NULL); } @@ -3792,8 +3792,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gDebugProgram.mName = "Debug Shader"; gDebugProgram.mShaderFiles.clear(); - gDebugProgram.mShaderFiles.push_back(make_pair("interface/debugV.glsl", GL_VERTEX_SHADER_ARB)); - gDebugProgram.mShaderFiles.push_back(make_pair("interface/debugF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDebugProgram.mShaderFiles.push_back(make_pair("interface/debugV.glsl", GL_VERTEX_SHADER)); + gDebugProgram.mShaderFiles.push_back(make_pair("interface/debugF.glsl", GL_FRAGMENT_SHADER)); gDebugProgram.mRiggedVariant = &gSkinnedDebugProgram; gDebugProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = make_rigged_variant(gDebugProgram, gSkinnedDebugProgram); @@ -3804,8 +3804,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gClipProgram.mName = "Clip Shader"; gClipProgram.mShaderFiles.clear(); - gClipProgram.mShaderFiles.push_back(make_pair("interface/clipV.glsl", GL_VERTEX_SHADER_ARB)); - gClipProgram.mShaderFiles.push_back(make_pair("interface/clipF.glsl", GL_FRAGMENT_SHADER_ARB)); + gClipProgram.mShaderFiles.push_back(make_pair("interface/clipV.glsl", GL_VERTEX_SHADER)); + gClipProgram.mShaderFiles.push_back(make_pair("interface/clipF.glsl", GL_FRAGMENT_SHADER)); gClipProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gClipProgram.createShader(NULL, NULL); } @@ -3814,8 +3814,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gDownsampleDepthProgram.mName = "DownsampleDepth Shader"; gDownsampleDepthProgram.mShaderFiles.clear(); - gDownsampleDepthProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthV.glsl", GL_VERTEX_SHADER_ARB)); - gDownsampleDepthProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDownsampleDepthProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthV.glsl", GL_VERTEX_SHADER)); + gDownsampleDepthProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthF.glsl", GL_FRAGMENT_SHADER)); gDownsampleDepthProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gDownsampleDepthProgram.createShader(NULL, NULL); } @@ -3824,8 +3824,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gBenchmarkProgram.mName = "Benchmark Shader"; gBenchmarkProgram.mShaderFiles.clear(); - gBenchmarkProgram.mShaderFiles.push_back(make_pair("interface/benchmarkV.glsl", GL_VERTEX_SHADER_ARB)); - gBenchmarkProgram.mShaderFiles.push_back(make_pair("interface/benchmarkF.glsl", GL_FRAGMENT_SHADER_ARB)); + gBenchmarkProgram.mShaderFiles.push_back(make_pair("interface/benchmarkV.glsl", GL_VERTEX_SHADER)); + gBenchmarkProgram.mShaderFiles.push_back(make_pair("interface/benchmarkF.glsl", GL_FRAGMENT_SHADER)); gBenchmarkProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gBenchmarkProgram.createShader(NULL, NULL); } @@ -3834,8 +3834,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gDownsampleDepthRectProgram.mName = "DownsampleDepthRect Shader"; gDownsampleDepthRectProgram.mShaderFiles.clear(); - gDownsampleDepthRectProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthV.glsl", GL_VERTEX_SHADER_ARB)); - gDownsampleDepthRectProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthRectF.glsl", GL_FRAGMENT_SHADER_ARB)); + gDownsampleDepthRectProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthV.glsl", GL_VERTEX_SHADER)); + gDownsampleDepthRectProgram.mShaderFiles.push_back(make_pair("interface/downsampleDepthRectF.glsl", GL_FRAGMENT_SHADER)); gDownsampleDepthRectProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gDownsampleDepthRectProgram.createShader(NULL, NULL); } @@ -3844,8 +3844,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gAlphaMaskProgram.mName = "Alpha Mask Shader"; gAlphaMaskProgram.mShaderFiles.clear(); - gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskV.glsl", GL_VERTEX_SHADER_ARB)); - gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskF.glsl", GL_FRAGMENT_SHADER_ARB)); + gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskV.glsl", GL_VERTEX_SHADER)); + gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskF.glsl", GL_FRAGMENT_SHADER)); gAlphaMaskProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gAlphaMaskProgram.createShader(NULL, NULL); } @@ -3854,8 +3854,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gReflectionMipProgram.mName = "Reflection Mip Shader"; gReflectionMipProgram.mShaderFiles.clear(); - gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER_ARB)); - gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/reflectionmipF.glsl", GL_FRAGMENT_SHADER_ARB)); + gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER)); + gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/reflectionmipF.glsl", GL_FRAGMENT_SHADER)); gReflectionMipProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gReflectionMipProgram.createShader(NULL, NULL); if (success) @@ -3866,22 +3866,22 @@ BOOL LLViewerShaderMgr::loadShadersInterface() } } - if (success) + if (success && gGLManager.mHasCubeMapArray) { gRadianceGenProgram.mName = "Radiance Gen Shader"; gRadianceGenProgram.mShaderFiles.clear(); - gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenV.glsl", GL_VERTEX_SHADER_ARB)); - gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenF.glsl", GL_FRAGMENT_SHADER_ARB)); + gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenV.glsl", GL_VERTEX_SHADER)); + gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenF.glsl", GL_FRAGMENT_SHADER)); gRadianceGenProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gRadianceGenProgram.createShader(NULL, NULL); } - if (success) + if (success && gGLManager.mHasCubeMapArray) { gIrradianceGenProgram.mName = "Irradiance Gen Shader"; gIrradianceGenProgram.mShaderFiles.clear(); - gIrradianceGenProgram.mShaderFiles.push_back(make_pair("interface/irradianceGenV.glsl", GL_VERTEX_SHADER_ARB)); - gIrradianceGenProgram.mShaderFiles.push_back(make_pair("interface/irradianceGenF.glsl", GL_FRAGMENT_SHADER_ARB)); + gIrradianceGenProgram.mShaderFiles.push_back(make_pair("interface/irradianceGenV.glsl", GL_VERTEX_SHADER)); + gIrradianceGenProgram.mShaderFiles.push_back(make_pair("interface/irradianceGenF.glsl", GL_FRAGMENT_SHADER)); gIrradianceGenProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gIrradianceGenProgram.createShader(NULL, NULL); } @@ -3916,8 +3916,8 @@ BOOL LLViewerShaderMgr::loadShadersWindLight() gWLSkyProgram.mFeatures.hasTransport = true; gWLSkyProgram.mFeatures.hasGamma = true; gWLSkyProgram.mFeatures.hasSrgb = true; - gWLSkyProgram.mShaderFiles.push_back(make_pair("windlight/skyV.glsl", GL_VERTEX_SHADER_ARB)); - gWLSkyProgram.mShaderFiles.push_back(make_pair("windlight/skyF.glsl", GL_FRAGMENT_SHADER_ARB)); + gWLSkyProgram.mShaderFiles.push_back(make_pair("windlight/skyV.glsl", GL_VERTEX_SHADER)); + gWLSkyProgram.mShaderFiles.push_back(make_pair("windlight/skyF.glsl", GL_FRAGMENT_SHADER)); gWLSkyProgram.mShaderLevel = mShaderLevel[SHADER_WINDLIGHT]; gWLSkyProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gWLSkyProgram.createShader(NULL, NULL); @@ -3931,8 +3931,8 @@ BOOL LLViewerShaderMgr::loadShadersWindLight() gWLCloudProgram.mFeatures.hasTransport = true; gWLCloudProgram.mFeatures.hasGamma = true; gWLCloudProgram.mFeatures.hasSrgb = true; - gWLCloudProgram.mShaderFiles.push_back(make_pair("windlight/cloudsV.glsl", GL_VERTEX_SHADER_ARB)); - gWLCloudProgram.mShaderFiles.push_back(make_pair("windlight/cloudsF.glsl", GL_FRAGMENT_SHADER_ARB)); + gWLCloudProgram.mShaderFiles.push_back(make_pair("windlight/cloudsV.glsl", GL_VERTEX_SHADER)); + gWLCloudProgram.mShaderFiles.push_back(make_pair("windlight/cloudsF.glsl", GL_FRAGMENT_SHADER)); gWLCloudProgram.mShaderLevel = mShaderLevel[SHADER_WINDLIGHT]; gWLCloudProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gWLCloudProgram.createShader(NULL, NULL); @@ -3949,8 +3949,8 @@ BOOL LLViewerShaderMgr::loadShadersWindLight() gWLSunProgram.mFeatures.isFullbright = true; gWLSunProgram.mFeatures.disableTextureIndex = true; gWLSunProgram.mShaderGroup = LLGLSLShader::SG_SKY; - gWLSunProgram.mShaderFiles.push_back(make_pair("windlight/sunDiscV.glsl", GL_VERTEX_SHADER_ARB)); - gWLSunProgram.mShaderFiles.push_back(make_pair("windlight/sunDiscF.glsl", GL_FRAGMENT_SHADER_ARB)); + gWLSunProgram.mShaderFiles.push_back(make_pair("windlight/sunDiscV.glsl", GL_VERTEX_SHADER)); + gWLSunProgram.mShaderFiles.push_back(make_pair("windlight/sunDiscF.glsl", GL_FRAGMENT_SHADER)); gWLSunProgram.mShaderLevel = mShaderLevel[SHADER_WINDLIGHT]; gWLSunProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gWLSunProgram.createShader(NULL, NULL); @@ -3967,8 +3967,8 @@ BOOL LLViewerShaderMgr::loadShadersWindLight() gWLMoonProgram.mFeatures.isFullbright = true; gWLMoonProgram.mFeatures.disableTextureIndex = true; gWLMoonProgram.mShaderGroup = LLGLSLShader::SG_SKY; - gWLMoonProgram.mShaderFiles.push_back(make_pair("windlight/moonV.glsl", GL_VERTEX_SHADER_ARB)); - gWLMoonProgram.mShaderFiles.push_back(make_pair("windlight/moonF.glsl", GL_FRAGMENT_SHADER_ARB)); + gWLMoonProgram.mShaderFiles.push_back(make_pair("windlight/moonV.glsl", GL_VERTEX_SHADER)); + gWLMoonProgram.mShaderFiles.push_back(make_pair("windlight/moonF.glsl", GL_FRAGMENT_SHADER)); gWLMoonProgram.mShaderLevel = mShaderLevel[SHADER_WINDLIGHT]; gWLMoonProgram.mShaderGroup = LLGLSLShader::SG_SKY; success = gWLMoonProgram.createShader(NULL, NULL); @@ -3995,7 +3995,7 @@ BOOL LLViewerShaderMgr::loadTransformShaders() { gTransformPositionProgram.mName = "Position Transform Shader"; gTransformPositionProgram.mShaderFiles.clear(); - gTransformPositionProgram.mShaderFiles.push_back(make_pair("transform/positionV.glsl", GL_VERTEX_SHADER_ARB)); + gTransformPositionProgram.mShaderFiles.push_back(make_pair("transform/positionV.glsl", GL_VERTEX_SHADER)); gTransformPositionProgram.mShaderLevel = mShaderLevel[SHADER_TRANSFORM]; const char* varyings[] = { @@ -4010,7 +4010,7 @@ BOOL LLViewerShaderMgr::loadTransformShaders() { gTransformTexCoordProgram.mName = "TexCoord Transform Shader"; gTransformTexCoordProgram.mShaderFiles.clear(); - gTransformTexCoordProgram.mShaderFiles.push_back(make_pair("transform/texcoordV.glsl", GL_VERTEX_SHADER_ARB)); + gTransformTexCoordProgram.mShaderFiles.push_back(make_pair("transform/texcoordV.glsl", GL_VERTEX_SHADER)); gTransformTexCoordProgram.mShaderLevel = mShaderLevel[SHADER_TRANSFORM]; const char* varyings[] = { @@ -4024,7 +4024,7 @@ BOOL LLViewerShaderMgr::loadTransformShaders() { gTransformNormalProgram.mName = "Normal Transform Shader"; gTransformNormalProgram.mShaderFiles.clear(); - gTransformNormalProgram.mShaderFiles.push_back(make_pair("transform/normalV.glsl", GL_VERTEX_SHADER_ARB)); + gTransformNormalProgram.mShaderFiles.push_back(make_pair("transform/normalV.glsl", GL_VERTEX_SHADER)); gTransformNormalProgram.mShaderLevel = mShaderLevel[SHADER_TRANSFORM]; const char* varyings[] = { @@ -4038,7 +4038,7 @@ BOOL LLViewerShaderMgr::loadTransformShaders() { gTransformColorProgram.mName = "Color Transform Shader"; gTransformColorProgram.mShaderFiles.clear(); - gTransformColorProgram.mShaderFiles.push_back(make_pair("transform/colorV.glsl", GL_VERTEX_SHADER_ARB)); + gTransformColorProgram.mShaderFiles.push_back(make_pair("transform/colorV.glsl", GL_VERTEX_SHADER)); gTransformColorProgram.mShaderLevel = mShaderLevel[SHADER_TRANSFORM]; const char* varyings[] = { @@ -4052,7 +4052,7 @@ BOOL LLViewerShaderMgr::loadTransformShaders() { gTransformTangentProgram.mName = "Binormal Transform Shader"; gTransformTangentProgram.mShaderFiles.clear(); - gTransformTangentProgram.mShaderFiles.push_back(make_pair("transform/binormalV.glsl", GL_VERTEX_SHADER_ARB)); + gTransformTangentProgram.mShaderFiles.push_back(make_pair("transform/binormalV.glsl", GL_VERTEX_SHADER)); gTransformTangentProgram.mShaderLevel = mShaderLevel[SHADER_TRANSFORM]; const char* varyings[] = { diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index d109b7b34f..36d66cccef 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -594,7 +594,7 @@ U32 LLVOGrass::getPartitionType() const } LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_GRASS; mPartitionType = LLViewerRegion::PARTITION_GRASS; @@ -602,7 +602,7 @@ LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp) mDepthMask = TRUE; mSlopRatio = 0.1f; mRenderPass = LLRenderPass::PASS_GRASS; - mBufferUsage = GL_DYNAMIC_DRAW_ARB; + mBufferUsage = GL_DYNAMIC_DRAW; } void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count, U32& index_count) @@ -626,7 +626,7 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count if (drawablep->isAnimating()) { - group->mBufferUsage = GL_STREAM_DRAW_ARB; + group->mBufferUsage = GL_STREAM_DRAW; } U32 count = 0; diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index 52a6395618..28bd5a3c97 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -93,7 +93,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) if (!face->getVertexBuffer()) { face->setSize(5, 12); - LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW); if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE)) { LL_WARNS() << "Failed to allocate Vertex Buffer for VOGround to " diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index cb4315a774..2047e0a726 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -65,7 +65,7 @@ void LLVOPartGroup::restoreGL() { //TODO: optimize out binormal mask here. Specular and normal coords as well. - sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW_ARB); + sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW); U32 count = LL_MAX_PARTICLE_COUNT; if (!sVB->allocateBuffer(count*4, count*6, true)) { @@ -738,7 +738,7 @@ U32 LLVOPartGroup::getPartitionType() const } LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW, regionp) { mRenderPass = LLRenderPass::PASS_ALPHA; mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES; diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 1aa00bc894..b7a5a0667b 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1010,7 +1010,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) face->setSize(4, 6); face->setGeomIndex(0); face->setIndicesIndex(0); - LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW); buff->allocateBuffer(4, 6, TRUE); face->setVertexBuffer(buff); @@ -1139,7 +1139,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const if (!facep->getVertexBuffer()) { facep->setSize(4, 6); - LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW); if (!buff->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE)) { LL_WARNS() << "Failed to allocate Vertex Buffer for vosky to " @@ -1379,7 +1379,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, if (!face->getVertexBuffer() || quads*4 != face->getGeomCount()) { face->setSize(quads * 4, quads * 6); - LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW); if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE)) { LL_WARNS() << "Failed to allocate Vertex Buffer for vosky to " diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 6b56eaeb4a..69ae3cf23b 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -51,7 +51,7 @@ class LLVertexBufferTerrain : public LLVertexBuffer { public: LLVertexBufferTerrain() : - LLVertexBuffer(MAP_VERTEX | MAP_NORMAL | MAP_TEXCOORD0 | MAP_TEXCOORD1 | MAP_COLOR, GL_DYNAMIC_DRAW_ARB) + LLVertexBuffer(MAP_VERTEX | MAP_NORMAL | MAP_TEXCOORD0 | MAP_TEXCOORD1 | MAP_COLOR, GL_DYNAMIC_DRAW) { //texture coordinates 2 and 3 exist, but use the same data as texture coordinate 1 }; @@ -1001,7 +1001,7 @@ U32 LLVOSurfacePatch::getPartitionType() const } LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB, regionp) +: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW, regionp) { mOcclusionEnabled = FALSE; mInfiniteFarClip = TRUE; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index e26791aa29..b6f8d162ba 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -921,7 +921,7 @@ void LLVOTree::updateMesh() LLFace* facep = mDrawable->getFace(0); if (!facep) return; - LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, GL_STATIC_DRAW); if (!buff->allocateBuffer(vert_count, index_count, TRUE)) { LL_WARNS() << "Failed to allocate Vertex Buffer on mesh update to " @@ -1226,7 +1226,7 @@ U32 LLVOTree::getPartitionType() const } LLTreePartition::LLTreePartition(LLViewerRegion* regionp) -: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp) +: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_TREE; mPartitionType = LLViewerRegion::PARTITION_TREE; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index f1e3d27d7c..9d8cc17a7f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5182,7 +5182,7 @@ U32 LLVOVolume::getPartitionType() const } LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB, regionp), +: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW, regionp), LLVolumeGeometryManager() { mLODPeriod = 32; @@ -5190,7 +5190,7 @@ LLVolumeGeometryManager() mDrawableType = LLPipeline::RENDER_TYPE_VOLUME; mPartitionType = LLViewerRegion::PARTITION_VOLUME; mSlopRatio = 0.25f; - mBufferUsage = GL_DYNAMIC_DRAW_ARB; + mBufferUsage = GL_DYNAMIC_DRAW; } LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp) @@ -5202,7 +5202,7 @@ LLVolumeGeometryManager() mDrawableType = LLPipeline::RENDER_TYPE_VOLUME; mPartitionType = LLViewerRegion::PARTITION_BRIDGE; - mBufferUsage = GL_DYNAMIC_DRAW_ARB; + mBufferUsage = GL_DYNAMIC_DRAW; mSlopRatio = 0.25f; } @@ -5788,7 +5788,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (drawablep->isAnimating()) { //fall back to stream draw for animating verts - useage = GL_STREAM_DRAW_ARB; + useage = GL_STREAM_DRAW; } LLVOVolume* vobj = drawablep->getVOVolume(); @@ -6408,10 +6408,10 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (use_transform_feedback && gTransformPositionProgram.mProgramObject && //transform shaders are loaded - buffer_usage == GL_DYNAMIC_DRAW_ARB && //target buffer is in VRAM + buffer_usage == GL_DYNAMIC_DRAW && //target buffer is in VRAM !(mask & LLVertexBuffer::MAP_WEIGHT4)) //TODO: add support for weights { - buffer_usage = GL_DYNAMIC_COPY_ARB; + buffer_usage = GL_DYNAMIC_COPY; } #if LL_DARWIN @@ -6645,9 +6645,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } - if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB) + if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW) { - buffer_usage = GL_STREAM_DRAW_ARB; + buffer_usage = GL_STREAM_DRAW; } //create vertex buffer @@ -7068,7 +7068,7 @@ void LLVolumeGeometryManager::addGeometryCount(LLSpatialGroup* group, U32& verte if (drawablep->isAnimating()) { //fall back to stream draw for animating verts - usage = GL_STREAM_DRAW_ARB; + usage = GL_STREAM_DRAW; } } @@ -7097,7 +7097,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun if (drawablep->isAnimating()) { //fall back to stream draw for animating verts - usage = GL_STREAM_DRAW_ARB; + usage = GL_STREAM_DRAW; } //for each face diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 089a7712c0..6f30092326 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -152,7 +152,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) LLVertexBuffer* buff = face->getVertexBuffer(); if (!buff || !buff->isWriteable()) { - buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); + buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW); if (!buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE)) { LL_WARNS() << "Failed to allocate Vertex Buffer on water update to " @@ -295,7 +295,7 @@ U32 LLVOVoidWater::getPartitionType() const } LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp) -: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp) +: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW, regionp) { mInfiniteFarClip = TRUE; mDrawableType = LLPipeline::RENDER_TYPE_WATER; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index d1f584cbca..c7df343ad0 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -151,7 +151,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) if (mFsSkyVerts.isNull()) { - mFsSkyVerts = new LLVertexBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); + mFsSkyVerts = new LLVertexBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW); if (!mFsSkyVerts->allocateBuffer(4, 6, TRUE)) { @@ -216,7 +216,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) for (U32 i = 0; i < strips_segments ;++i) { - LLVertexBuffer * segment = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); + LLVertexBuffer * segment = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW); mStripsVerts[i] = segment; U32 num_stacks_this_seg = stacks_per_seg; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index abf0d457e2..3538f7e911 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -536,7 +536,7 @@ void LLPipeline::init() if (mCubeVB.isNull()) { - mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB); + mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW); } mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0); @@ -731,7 +731,7 @@ void LLPipeline::destroyGL() if (mMeshDirtyQueryObject) { - glDeleteQueriesARB(1, &mMeshDirtyQueryObject); + glDeleteQueries(1, &mMeshDirtyQueryObject); mMeshDirtyQueryObject = 0; } } @@ -1293,7 +1293,7 @@ void LLPipeline::createGLBuffers() LLImageGL::generateTextures(1, &mNoiseMap); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } @@ -1308,7 +1308,7 @@ void LLPipeline::createGLBuffers() LLImageGL::generateTextures(1, &mTrueNoiseMap); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } @@ -2418,7 +2418,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, LLPlane* pla { if (mCubeVB.isNull()) { //cube VB will be used for issuing occlusion queries - mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB); + mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW); } mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX); } @@ -2677,7 +2677,7 @@ void LLPipeline::doOcclusion(LLCamera& camera) if (mCubeVB.isNull()) { //cube VB will be used for issuing occlusion queries - mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB); + mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW); } mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX); @@ -3918,11 +3918,11 @@ void LLPipeline::postSort(LLCamera& camera) if (!mMeshDirtyQueryObject) { - glGenQueriesARB(1, &mMeshDirtyQueryObject); + glGenQueries(1, &mMeshDirtyQueryObject); } - glBeginQueryARB(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, mMeshDirtyQueryObject); + glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, mMeshDirtyQueryObject); }*/ //pack vertex buffers for groups that chose to delay their updates @@ -3933,7 +3933,7 @@ void LLPipeline::postSort(LLCamera& camera) /*if (use_transform_feedback) { - glEndQueryARB(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN); + glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN); }*/ mMeshDirtyGroup.clear(); @@ -4063,7 +4063,7 @@ void render_hud_elements() if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d() // Draw the tracking overlays @@ -4371,7 +4371,7 @@ void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate) gGL.matrixMode(LLRender::MM_MODELVIEW); LLGLSPipeline gls_pipeline; - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); LLGLState gls_color_material(GL_COLOR_MATERIAL, mLightingDetail < 2); @@ -4592,7 +4592,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) } } - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); LLVertexBuffer::unbind(); @@ -4682,7 +4682,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) LLGLEnable cull(GL_CULL_FACE); - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); calcNearbyLights(camera); setupHWLights(NULL); @@ -8078,7 +8078,7 @@ void LLPipeline::renderFinalize() gGL.getTexUnit(0)->bind(&mGlow[1]); gGL.getTexUnit(1)->bind(&mRT->screen); - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); buff->setBuffer(mask); buff->drawArrays(LLRender::TRIANGLE_STRIP, 0, 3); @@ -8246,8 +8246,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); stop_glerror(); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); stop_glerror(); } } @@ -8268,8 +8268,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); stop_glerror(); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); stop_glerror(); } } @@ -8448,7 +8448,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target) GL_NEAREST); } - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { @@ -8722,7 +8722,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target) if (mCubeVB.isNull()) { - mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB); + mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW); } mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX); @@ -9229,7 +9229,7 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader) { if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); } } @@ -9237,7 +9237,7 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader) { if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); } } @@ -11338,7 +11338,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) if (LLPipeline::sRenderDeferred) { GLuint buff = GL_COLOR_ATTACHMENT0; - glDrawBuffersARB(1, &buff); + glDrawBuffers(1, &buff); } LLGLDisable blend(GL_BLEND); |