From 89c83f86e50da24e2a89adc558b63bb375dab1b6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 30 Mar 2014 16:00:17 +0200 Subject: [PATCH] GL3: Remove GL_EXT_blend_color and GL_EXT_secondary_color --HG-- branch : opengl3 --- .../src/3d/driver/opengl3/driver_opengl.cpp | 12 +- .../opengl3/driver_opengl_extension.cpp | 180 +----------------- .../driver/opengl3/driver_opengl_extension.h | 152 +-------------- .../opengl3/driver_opengl_extension_def.h | 86 --------- 4 files changed, 12 insertions(+), 418 deletions(-) diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl.cpp b/code/nel/src/3d/driver/opengl3/driver_opengl.cpp index 0179fa90f..31d4a7281 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl3/driver_opengl.cpp @@ -1185,7 +1185,7 @@ void CDriverGL3::setPerPixelLightingLight(CRGBA diffuse, CRGBA specular, float s bool CDriverGL3::supportBlendConstantColor() const { H_AUTO_OGL(CDriverGL3_supportBlendConstantColor) - return _Extensions.EXTBlendColor; + return _Extensions.GLCore; } // *************************************************************************** @@ -1194,14 +1194,10 @@ void CDriverGL3::setBlendConstantColor(NLMISC::CRGBA col) H_AUTO_OGL(CDriverGL3_setBlendConstantColor) // bkup - _CurrentBlendConstantColor= col; - - // update GL - if (!_Extensions.EXTBlendColor) - return; + _CurrentBlendConstantColor = col; - static const float OO255= 1.0f/255; - nglBlendColorEXT(col.R*OO255, col.G*OO255, col.B*OO255, col.A*OO255); + static const float OO255 = 1.0f / 255.0f; + nglBlendColor(col.R * OO255, col.G * OO255, col.B * OO255, col.A * OO255); } // *************************************************************************** diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl3/driver_opengl_extension.cpp index 7e01faef4..7a6e5483f 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl3/driver_opengl_extension.cpp @@ -101,137 +101,6 @@ NEL_PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; NEL_PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; NEL_PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; -// SecondaryColor extension -NEL_PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; -NEL_PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; -NEL_PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; -NEL_PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; -NEL_PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; -NEL_PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; -NEL_PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; -NEL_PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; -NEL_PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; -NEL_PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; -NEL_PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; -NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; -NEL_PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; -NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; -NEL_PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; -NEL_PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; -NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; - -// BlendColor extension -NEL_PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; - -// GL_ATI_envmap_bumpmap extension -PFNGLTEXBUMPPARAMETERIVATIPROC nglTexBumpParameterivATI; -PFNGLTEXBUMPPARAMETERFVATIPROC nglTexBumpParameterfvATI; -PFNGLGETTEXBUMPPARAMETERIVATIPROC nglGetTexBumpParameterivATI; -PFNGLGETTEXBUMPPARAMETERFVATIPROC nglGetTexBumpParameterfvATI; - -// GL_ATI_fragment_shader extension -NEL_PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; -NEL_PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; -NEL_PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; -NEL_PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; -NEL_PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; -NEL_PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; -NEL_PFNGLSAMPLEMAPATIPROC nglSampleMapATI; -NEL_PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; -NEL_PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; -NEL_PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; -NEL_PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; -NEL_PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; -NEL_PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; -NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; - -// GL_ARB_fragment_program -// the following functions are the sames than with GL_ARB_vertex_program -//NEL_PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; -//NEL_PFNGLBINDPROGRAMARBPROC nglBindProgramARB; -//NEL_PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; -//NEL_PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; -//NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; -//NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; -//NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; -//NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; -//NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; -//NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; -//NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; -//NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; -//NEL_PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; -//NEL_PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; -//NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB; - - -// GL_ARB_vertex_program -PFNGLVERTEXATTRIB1SARBPROC nglVertexAttrib1sARB; -PFNGLVERTEXATTRIB1FARBPROC nglVertexAttrib1fARB; -PFNGLVERTEXATTRIB1DARBPROC nglVertexAttrib1dARB; -PFNGLVERTEXATTRIB2SARBPROC nglVertexAttrib2sARB; -PFNGLVERTEXATTRIB2FARBPROC nglVertexAttrib2fARB; -PFNGLVERTEXATTRIB2DARBPROC nglVertexAttrib2dARB; -PFNGLVERTEXATTRIB3SARBPROC nglVertexAttrib3sARB; -PFNGLVERTEXATTRIB3FARBPROC nglVertexAttrib3fARB; -PFNGLVERTEXATTRIB3DARBPROC nglVertexAttrib3dARB; -PFNGLVERTEXATTRIB4SARBPROC nglVertexAttrib4sARB; -PFNGLVERTEXATTRIB4FARBPROC nglVertexAttrib4fARB; -PFNGLVERTEXATTRIB4DARBPROC nglVertexAttrib4dARB; -PFNGLVERTEXATTRIB4NUBARBPROC nglVertexAttrib4NubARB; -PFNGLVERTEXATTRIB1SVARBPROC nglVertexAttrib1svARB; -PFNGLVERTEXATTRIB1FVARBPROC nglVertexAttrib1fvARB; -PFNGLVERTEXATTRIB1DVARBPROC nglVertexAttrib1dvARB; -PFNGLVERTEXATTRIB2SVARBPROC nglVertexAttrib2svARB; -PFNGLVERTEXATTRIB2FVARBPROC nglVertexAttrib2fvARB; -PFNGLVERTEXATTRIB2DVARBPROC nglVertexAttrib2dvARB; -PFNGLVERTEXATTRIB3SVARBPROC nglVertexAttrib3svARB; -PFNGLVERTEXATTRIB3FVARBPROC nglVertexAttrib3fvARB; -PFNGLVERTEXATTRIB3DVARBPROC nglVertexAttrib3dvARB; -PFNGLVERTEXATTRIB4BVARBPROC nglVertexAttrib4bvARB; -PFNGLVERTEXATTRIB4SVARBPROC nglVertexAttrib4svARB; -PFNGLVERTEXATTRIB4IVARBPROC nglVertexAttrib4ivARB; -PFNGLVERTEXATTRIB4UBVARBPROC nglVertexAttrib4ubvARB; -PFNGLVERTEXATTRIB4USVARBPROC nglVertexAttrib4usvARB; -PFNGLVERTEXATTRIB4UIVARBPROC nglVertexAttrib4uivARB; -PFNGLVERTEXATTRIB4FVARBPROC nglVertexAttrib4fvARB; -PFNGLVERTEXATTRIB4DVARBPROC nglVertexAttrib4dvARB; -PFNGLVERTEXATTRIB4NBVARBPROC nglVertexAttrib4NbvARB; -PFNGLVERTEXATTRIB4NSVARBPROC nglVertexAttrib4NsvARB; -PFNGLVERTEXATTRIB4NIVARBPROC nglVertexAttrib4NivARB; -PFNGLVERTEXATTRIB4NUBVARBPROC nglVertexAttrib4NubvARB; -PFNGLVERTEXATTRIB4NUSVARBPROC nglVertexAttrib4NusvARB; -PFNGLVERTEXATTRIB4NUIVARBPROC nglVertexAttrib4NuivARB; -PFNGLVERTEXATTRIBPOINTERARBPROC nglVertexAttribPointerARB; -PFNGLENABLEVERTEXATTRIBARRAYARBPROC nglEnableVertexAttribArrayARB; -PFNGLDISABLEVERTEXATTRIBARRAYARBPROC nglDisableVertexAttribArrayARB; -PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; -PFNGLBINDPROGRAMARBPROC nglBindProgramARB; -PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; -PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; -PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; -PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; -PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; -PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; -PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglProgramLocalParameter4fARB; -PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglProgramLocalParameter4dARB; -PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglProgramLocalParameter4fvARB; -PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglProgramLocalParameter4dvARB; -PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; -PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; -PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; -PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; -PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; -PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; -PFNGLGETVERTEXATTRIBDVARBPROC nglGetVertexAttribdvARB; -PFNGLGETVERTEXATTRIBFVARBPROC nglGetVertexAttribfvARB; -PFNGLGETVERTEXATTRIBIVARBPROC nglGetVertexAttribivARB; -PFNGLGETVERTEXATTRIBPOINTERVARBPROC nglGetVertexAttribPointervARB; -PFNGLISPROGRAMARBPROC nglIsProgramARB; - // Core PFNGLATTACHSHADERPROC nglAttachShader; PFNGLCOMPILESHADERPROC nglCompileShader; @@ -333,6 +202,8 @@ PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC nglCompressedTexSubImage2D; PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC nglCompressedTexSubImage1D; PFNGLGETCOMPRESSEDTEXIMAGEPROC nglGetCompressedTexImage; +PFNGLBLENDCOLORPROC nglBlendColor; + // GL_ARB_separate_shader_objects PFNGLUSEPROGRAMSTAGESPROC nglUseProgramStages; PFNGLACTIVESHADERPROGRAMPROC nglActiveShaderProgram; @@ -516,33 +387,6 @@ static bool setupEXTTextureCompressionS3TC(const char *glext) return true; } -// ********************************* -static bool setupEXTSecondaryColor(const char *glext) -{ - H_AUTO_OGL(setupEXTSecondaryColor); - CHECK_EXT("GL_EXT_secondary_color"); - - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3BEXTPROC, glSecondaryColor3bEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3BVEXTPROC, glSecondaryColor3bvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3DEXTPROC, glSecondaryColor3dEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3DVEXTPROC, glSecondaryColor3dvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3FEXTPROC, glSecondaryColor3fEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3FVEXTPROC, glSecondaryColor3fvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3IEXTPROC, glSecondaryColor3iEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3IVEXTPROC, glSecondaryColor3ivEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3SEXTPROC, glSecondaryColor3sEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3SVEXTPROC, glSecondaryColor3svEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UBEXTPROC, glSecondaryColor3ubEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC, glSecondaryColor3ubvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UIEXTPROC, glSecondaryColor3uiEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC, glSecondaryColor3uivEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3USEXTPROC, glSecondaryColor3usEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3USVEXTPROC, glSecondaryColor3usvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC, glSecondaryColorPointerEXT); - - return true; -} - // ********************************* static bool setupWGLARBPBuffer(const char *glext) { @@ -575,17 +419,6 @@ static bool setupWGLARBPixelFormat (const char *glext) } #endif -// ********************************* -static bool setupEXTBlendColor(const char *glext) -{ - H_AUTO_OGL(setupEXTBlendColor); - CHECK_EXT("GL_EXT_blend_color"); - - CHECK_ADDRESS(NEL_PFNGLBLENDCOLOREXTPROC, glBlendColorEXT); - - return true; -} - // *************************************************************************** static bool setupEXTTextureFilterAnisotropic(const char *glext) { @@ -696,6 +529,8 @@ static bool setupGLCore(const char *glext) CHECK_ADDRESS(PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC, glCompressedTexSubImage1D); CHECK_ADDRESS(PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage); + CHECK_ADDRESS(PFNGLBLENDCOLORPROC, glBlendColor); + return true; } @@ -827,11 +662,8 @@ void registerGlExtensions(CGlExtensions &ext) // --- - // Check EXTSecondaryColor - ext.EXTSecondaryColor= setupEXTSecondaryColor(glext); - - // Check EXTBlendColor - ext.EXTBlendColor= setupEXTBlendColor(glext); + // Check ARBMultiTexture + ext.ARBMultiTexture= setupARBMultiTexture(glext); } diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl3/driver_opengl_extension.h index c778670e9..d75656252 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl3/driver_opengl_extension.h @@ -48,10 +48,6 @@ struct CGlExtensions // Required Extensions. (old) bool ARBMultiTexture; - // Optional Extensions. (old) - bool EXTSecondaryColor; - bool EXTBlendColor; - // WGL ARB extensions, true if supported bool WGLARBPBuffer; bool WGLARBPixelFormat; @@ -75,8 +71,6 @@ public: EXTTextureFilterAnisotropicMaximum = 0.f; ARBMultiTexture= false; - EXTSecondaryColor= false; - EXTBlendColor= false; WGLARBPBuffer = false; WGLARBPixelFormat = false; @@ -106,10 +100,6 @@ public: result += "texture stages(*) = "; result += NLMISC::toString(NbFragmentTextureUnits); - result += "\n Misc: "; - result += EXTSecondaryColor ? "EXTSecondaryColor " : ""; - result += EXTBlendColor ? "EXTBlendColor " : ""; - #ifdef NL_OS_WINDOWS result += "\n WindowsGL: "; result += WGLARBPBuffer ? "WGLARBPBuffer " : ""; @@ -197,146 +187,6 @@ extern NEL_PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; extern NEL_PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; extern NEL_PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; - -// ATI_envmap_bumpmap extension - -extern PFNGLTEXBUMPPARAMETERIVATIPROC nglTexBumpParameterivATI; -extern PFNGLTEXBUMPPARAMETERFVATIPROC nglTexBumpParameterfvATI; -extern PFNGLGETTEXBUMPPARAMETERIVATIPROC nglGetTexBumpParameterivATI; -extern PFNGLGETTEXBUMPPARAMETERFVATIPROC nglGetTexBumpParameterfvATI; - - -// SecondaryColor extension -//======================== -extern NEL_PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; -extern NEL_PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; -extern NEL_PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; -extern NEL_PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; -extern NEL_PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; -extern NEL_PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; -extern NEL_PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; -extern NEL_PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; -extern NEL_PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; -extern NEL_PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; -extern NEL_PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; -extern NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; -extern NEL_PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; -extern NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; -extern NEL_PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; -extern NEL_PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; -extern NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; - - -// BlendColor extension -//======================== -extern NEL_PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; - - -// GL_ATI_fragment_shader extension -//=================================== - -extern NEL_PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; -extern NEL_PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; -extern NEL_PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; -extern NEL_PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; -extern NEL_PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; -extern NEL_PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; -extern NEL_PFNGLSAMPLEMAPATIPROC nglSampleMapATI; -extern NEL_PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; -extern NEL_PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; -extern NEL_PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; -extern NEL_PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; -extern NEL_PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; -extern NEL_PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; -extern NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; - -// GL_ARB_fragment_shader_extension -//================================== -extern NEL_PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; -extern NEL_PFNGLBINDPROGRAMARBPROC nglBindProgramARB; -extern NEL_PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; -extern NEL_PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; -extern NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; -extern NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; -extern NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; -extern NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; -extern NEL_PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; -extern NEL_PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; -extern NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB; - -// GL_ARB_vertex_program -//================================== -extern PFNGLVERTEXATTRIB1SARBPROC nglVertexAttrib1sARB; -extern PFNGLVERTEXATTRIB1FARBPROC nglVertexAttrib1fARB; -extern PFNGLVERTEXATTRIB1DARBPROC nglVertexAttrib1dARB; -extern PFNGLVERTEXATTRIB2SARBPROC nglVertexAttrib2sARB; -extern PFNGLVERTEXATTRIB2FARBPROC nglVertexAttrib2fARB; -extern PFNGLVERTEXATTRIB2DARBPROC nglVertexAttrib2dARB; -extern PFNGLVERTEXATTRIB3SARBPROC nglVertexAttrib3sARB; -extern PFNGLVERTEXATTRIB3FARBPROC nglVertexAttrib3fARB; -extern PFNGLVERTEXATTRIB3DARBPROC nglVertexAttrib3dARB; -extern PFNGLVERTEXATTRIB4SARBPROC nglVertexAttrib4sARB; -extern PFNGLVERTEXATTRIB4FARBPROC nglVertexAttrib4fARB; -extern PFNGLVERTEXATTRIB4DARBPROC nglVertexAttrib4dARB; -extern PFNGLVERTEXATTRIB4NUBARBPROC nglVertexAttrib4NubARB; -extern PFNGLVERTEXATTRIB1SVARBPROC nglVertexAttrib1svARB; -extern PFNGLVERTEXATTRIB1FVARBPROC nglVertexAttrib1fvARB; -extern PFNGLVERTEXATTRIB1DVARBPROC nglVertexAttrib1dvARB; -extern PFNGLVERTEXATTRIB2SVARBPROC nglVertexAttrib2svARB; -extern PFNGLVERTEXATTRIB2FVARBPROC nglVertexAttrib2fvARB; -extern PFNGLVERTEXATTRIB2DVARBPROC nglVertexAttrib2dvARB; -extern PFNGLVERTEXATTRIB3SVARBPROC nglVertexAttrib3svARB; -extern PFNGLVERTEXATTRIB3FVARBPROC nglVertexAttrib3fvARB; -extern PFNGLVERTEXATTRIB3DVARBPROC nglVertexAttrib3dvARB; -extern PFNGLVERTEXATTRIB4BVARBPROC nglVertexAttrib4bvARB; -extern PFNGLVERTEXATTRIB4SVARBPROC nglVertexAttrib4svARB; -extern PFNGLVERTEXATTRIB4IVARBPROC nglVertexAttrib4ivARB; -extern PFNGLVERTEXATTRIB4UBVARBPROC nglVertexAttrib4ubvARB; -extern PFNGLVERTEXATTRIB4USVARBPROC nglVertexAttrib4usvARB; -extern PFNGLVERTEXATTRIB4UIVARBPROC nglVertexAttrib4uivARB; -extern PFNGLVERTEXATTRIB4FVARBPROC nglVertexAttrib4fvARB; -extern PFNGLVERTEXATTRIB4DVARBPROC nglVertexAttrib4dvARB; -extern PFNGLVERTEXATTRIB4NBVARBPROC nglVertexAttrib4NbvARB; -extern PFNGLVERTEXATTRIB4NSVARBPROC nglVertexAttrib4NsvARB; -extern PFNGLVERTEXATTRIB4NIVARBPROC nglVertexAttrib4NivARB; -extern PFNGLVERTEXATTRIB4NUBVARBPROC nglVertexAttrib4NubvARB; -extern PFNGLVERTEXATTRIB4NUSVARBPROC nglVertexAttrib4NusvARB; -extern PFNGLVERTEXATTRIB4NUIVARBPROC nglVertexAttrib4NuivARB; -extern PFNGLVERTEXATTRIBPOINTERARBPROC nglVertexAttribPointerARB; -extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC nglEnableVertexAttribArrayARB; -extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC nglDisableVertexAttribArrayARB; -extern PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; -extern PFNGLBINDPROGRAMARBPROC nglBindProgramARB; -extern PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; -extern PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; -extern PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; -extern PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; -extern PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; -extern PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; -extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglProgramLocalParameter4fARB; -extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglProgramLocalParameter4dARB; -extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglProgramLocalParameter4fvARB; -extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglProgramLocalParameter4dvARB; -extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; -extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; -extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; -extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; -extern PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; -extern PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; -extern PFNGLGETVERTEXATTRIBDVARBPROC nglGetVertexAttribdvARB; -extern PFNGLGETVERTEXATTRIBFVARBPROC nglGetVertexAttribfvARB; -extern PFNGLGETVERTEXATTRIBIVARBPROC nglGetVertexAttribivARB; -extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC nglGetVertexAttribPointervARB; -extern PFNGLISPROGRAMARBPROC nglIsProgramARB; - // Core 3.30 extern PFNGLATTACHSHADERPROC nglAttachShader; extern PFNGLCOMPILESHADERPROC nglCompileShader; @@ -438,6 +288,8 @@ extern PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC nglCompressedTexSubImage2D; extern PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC nglCompressedTexSubImage1D; extern PFNGLGETCOMPRESSEDTEXIMAGEPROC nglGetCompressedTexImage; +extern PFNGLBLENDCOLORPROC nglBlendColor; + // GL_ARB_separate_shader_objects extern PFNGLUSEPROGRAMSTAGESPROC nglUseProgramStages; extern PFNGLACTIVESHADERPROGRAMPROC nglActiveShaderProgram; diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl3/driver_opengl_extension_def.h index 3732d8f69..55b5c7162 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl3/driver_opengl_extension_def.h @@ -72,92 +72,6 @@ typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); - - -// SecondaryColor extension -//======================== -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); - - -// BlendColor extension -//======================== -typedef void (APIENTRY * NEL_PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - - -// GL_ATI_fragment_shader extension -//================================== -typedef GLuint (APIENTRY *NEL_PFNGLGENFRAGMENTSHADERSATIPROC)(GLuint range); -typedef GLvoid (APIENTRY *NEL_PFNGLBINDFRAGMENTSHADERATIPROC)(GLuint id); -typedef GLvoid (APIENTRY *NEL_PFNGLDELETEFRAGMENTSHADERATIPROC)(GLuint id); -typedef GLvoid (APIENTRY *NEL_PFNGLBEGINFRAGMENTSHADERATIPROC)(); -typedef GLvoid (APIENTRY *NEL_PFNGLENDFRAGMENTSHADERATIPROC)(); -typedef GLvoid (APIENTRY *NEL_PFNGLPASSTEXCOORDATIPROC)(GLuint dst, GLuint coord, GLenum swizzle); -typedef GLvoid (APIENTRY *NEL_PFNGLSAMPLEMAPATIPROC)(GLuint dst, GLuint interp, GLenum swizzle); -typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, - GLuint arg2Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, - GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, - GLuint arg3Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, - GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, - GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, - GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)(GLuint dst, const GLfloat *value); - - - -// GL_ARB_fragment_program -//================================== -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMSTRINGARBPROC)(GLenum target, GLenum format, GLsizei len,const GLvoid *string); -typedef GLvoid (APIENTRY *NEL_PFNGLBINDPROGRAMARBPROC)(GLenum target, GLuint program); -typedef GLvoid (APIENTRY *NEL_PFNGLDELETEPROGRAMSARBPROC)(GLsizei n, const GLuint *programs); -typedef GLvoid (APIENTRY *NEL_PFNGLGENPROGRAMSARBPROC)(GLsizei n, GLuint *programs); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC)(GLenum target, GLuint index, const GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC)(GLenum target, GLuint index, const GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)(GLenum target, GLuint index, const GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)(GLenum target, GLuint index, const GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC)(GLenum target, GLuint index, GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC)(GLenum target, GLuint index, GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)(GLenum target, GLuint index, GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)(GLenum target, GLuint index, GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMIVARBPROC)(GLenum target, GLenum pname, int *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMSTRINGARBPROC)(GLenum target, GLenum pname, GLvoid *string); -typedef GLboolean (APIENTRY *NEL_PFNGLISPROGRAMARBPROC)(GLuint program); - -typedef GLvoid (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); - #if defined(NL_OS_MAC) // Mac GL extensions