diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl.cpp b/code/nel/src/3d/driver/OpenGL3/driver_opengl.cpp index 990b8c79a..23556e1f0 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl.cpp @@ -576,20 +576,6 @@ bool CDriverGL3::activeFrameBufferObject(ITexture * tex) return false; } -// -------------------------------------------------- -void CDriverGL3::disableHardwareVertexProgram() -{ - H_AUTO_OGL(CDriverGL3_disableHardwareVertexProgram) - _Extensions.DisableHardwareVertexProgram= true; -} - -// *************************************************************************** -void CDriverGL3::disableHardwareVertexArrayAGP() -{ - H_AUTO_OGL(CDriverGL3_disableHardwareVertexArrayAGP) - _Extensions.DisableHardwareVertexArrayAGP= true; -} - // *************************************************************************** void CDriverGL3::disableHardwareTextureShader() { @@ -1266,7 +1252,6 @@ bool CDriverGL3::isWaterShaderSupported() const if(_Extensions.ARBFragmentProgram && ARBWaterShader[0] != 0) return true; - if (!_Extensions.ARBVertexProgram) return false; // should support vertex programs if (!_Extensions.NVTextureShader && !_Extensions.ATIFragmentShader && !_Extensions.ARBFragmentProgram) return false; return true; } @@ -1331,13 +1316,11 @@ void CDriverGL3::checkForPerPixelLightingSupport() _SupportPerPixelShaderNoSpec = (_Extensions.NVTextureEnvCombine4 || _Extensions.ATITextureEnvCombine3) && _Extensions.ARBTextureCubeMap - && _Extensions.NbTextureStages >= 3 - && ( _Extensions.ARBVertexProgram ); + && _Extensions.NbTextureStages >= 3; _SupportPerPixelShader = (_Extensions.NVTextureEnvCombine4 || _Extensions.ATITextureEnvCombine3) && _Extensions.ARBTextureCubeMap - && _Extensions.NbTextureStages >= 2 - && ( _Extensions.ARBVertexProgram ); + && _Extensions.NbTextureStages >= 2; } // *************************************************************************** diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl.h b/code/nel/src/3d/driver/OpenGL3/driver_opengl.h index b2f298bd4..630348aaf 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl.h +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl.h @@ -293,8 +293,8 @@ public: virtual bool init (uint windowIcon = 0, emptyProc exitFunc = 0); - virtual void disableHardwareVertexProgram(); - virtual void disableHardwareVertexArrayAGP(); + virtual void disableHardwareVertexProgram(){} + virtual void disableHardwareVertexArrayAGP(){} virtual void disableHardwareTextureShader(); virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay); @@ -408,7 +408,7 @@ public: virtual void getNumPerStageConstant(uint &lightedMaterial, uint &unlightedMaterial) const; - virtual bool supportVertexBufferHard() const; + virtual bool supportVertexBufferHard() const{ return true; }; virtual bool supportVolatileVertexBuffer() const; @@ -1267,7 +1267,7 @@ private: /// \name Vertex program interface // @{ - bool isVertexProgramSupported () const; + bool isVertexProgramSupported () const{ return true; } bool isVertexProgramEmulated () const{ return false; } bool activeVertexProgram (CVertexProgram *program); void setConstant (uint index, float, float, float, float); @@ -1279,7 +1279,7 @@ private: void setConstantMatrix (uint index, IDriver::TMatrix matrix, IDriver::TTransform transform); void setConstantFog (uint index); void enableVertexProgramDoubleSidedColor(bool doubleSided); - bool supportVertexProgramDoubleSidedColor() const; + bool supportVertexProgramDoubleSidedColor() const{ return true; }; virtual bool supportMADOperator() const ; 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 af1941843..beffa6f33 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_extension.cpp @@ -439,26 +439,6 @@ static bool setupARBTextureNonPowerOfTwo(const char *glext) return true; } -// *************************************************************************** -static bool setupOESMapBuffer(const char *glext) -{ - H_AUTO_OGL(setupOESMapBuffer); - - CHECK_EXT("OES_mapbuffer"); - - return true; -} - -// *************************************************************************** -static bool setupOESDrawTexture(const char *glext) -{ - H_AUTO_OGL(setupOESDrawTexture); - - CHECK_EXT("OES_draw_texture"); - - return true; -} - // ********************************* static bool setupEXTTextureCompressionS3TC(const char *glext) { @@ -978,19 +958,7 @@ void registerGlExtensions(CGlExtensions &ext) // Check for cube mapping ext.ARBTextureCubeMap = setupARBTextureCubeMap(glext); - // Check vertex program - // Disable feature ??? - if(!ext.DisableHardwareVertexProgram) - { - ext.ARBVertexProgram= setupARBVertexProgram(glext); - } - else - { - ext.ARBVertexProgram = false; - } - - ext.OESDrawTexture = setupOESDrawTexture(glext); - ext.OESMapBuffer = setupOESMapBuffer(glext); + setupARBVertexProgram(glext); // Check texture shaders // Disable feature ??? 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 4614af097..158d2d3f9 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_extension.h @@ -87,15 +87,10 @@ struct CGlExtensions bool ARBTextureNonPowerOfTwo; bool ARBMultisample; - bool OESDrawTexture; - bool OESMapBuffer; - public: /// \name Disable Hardware feature. False by default. setuped by IDriver // @{ - bool DisableHardwareVertexProgram; - bool DisableHardwareVertexArrayAGP; bool DisableHardwareTextureShader; // @} @@ -142,12 +137,7 @@ public: PackedDepthStencil = false; NVStateVARWithoutFlush = 0; - OESDrawTexture = false; - OESMapBuffer = false; - /// \name Disable Hardware feature. False by default. setuped by IDriver - DisableHardwareVertexProgram= false; - DisableHardwareVertexArrayAGP= false; DisableHardwareTextureShader= false; } diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp index fb7f1c390..ef8c5d574 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex.cpp @@ -642,14 +642,6 @@ void CDriverGL3::mapTextureStageToUV(uint stage, uint uv) // *************************************************************************** // *************************************************************************** - -// *************************************************************************** -bool CDriverGL3::supportVertexBufferHard() const -{ - H_AUTO_OGL(CDriverGL3_supportVertexBufferHard) - return true; -} - // *************************************************************************** bool CDriverGL3::supportVolatileVertexBuffer() const { @@ -998,7 +990,6 @@ void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb) { H_AUTO_OGL(CDriverGL3_setupGlArrays) - if (_Extensions.ARBVertexProgram) { toggleGlArraysForARBVertexProgram(); // Use a vertex program ? @@ -1011,11 +1002,6 @@ void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb) setupGlArraysForARBVertexProgram(vb); } } - else - { - // no vertex programs - setupGlArraysStd(vb); - } } @@ -1081,8 +1067,6 @@ void CDriverGL3::resetVertexArrayRange() bool CDriverGL3::initVertexBufferHard(uint agpMem, uint vramMem) { H_AUTO_OGL(CDriverGL3_initVertexBufferHard) - if(!supportVertexBufferHard()) - return false; // must be supported if(!_AGPVertexArrayRange || !_VRAMVertexArrayRange) diff --git a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_program.cpp index 5cb01bfae..fd691034a 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_opengl_vertex_program.cpp @@ -48,14 +48,6 @@ CVertexProgamDrvInfosGL3::CVertexProgamDrvInfosGL3 (CDriverGL3 *drv, ItVtxPrgDrv } - -// *************************************************************************** -bool CDriverGL3::isVertexProgramSupported () const -{ - H_AUTO_OGL(CVertexProgamDrvInfosGL_isVertexProgramSupported) - return _Extensions.ARBVertexProgram; -} - //================================================================================================= static const char *ARBVertexProgramInstrToName[] = { @@ -586,26 +578,14 @@ void CDriverGL3::enableVertexProgramDoubleSidedColor(bool doubleSided) { H_AUTO_OGL(CDriverGL3_enableVertexProgramDoubleSidedColor); - // Vertex program exist ? - if (_Extensions.ARBVertexProgram) - { - // change mode (not cached because supposed to be rare) - if(doubleSided) - glEnable (GL_VERTEX_PROGRAM_TWO_SIDE_ARB); - else - glDisable (GL_VERTEX_PROGRAM_TWO_SIDE_ARB); - } + // change mode (not cached because supposed to be rare) + if(doubleSided) + glEnable (GL_VERTEX_PROGRAM_TWO_SIDE_ARB); + else + glDisable (GL_VERTEX_PROGRAM_TWO_SIDE_ARB); } -// *************************************************************************** -bool CDriverGL3::supportVertexProgramDoubleSidedColor() const -{ - H_AUTO_OGL(CDriverGL3_supportVertexProgramDoubleSidedColor) - // currently only supported by NV_VERTEX_PROGRAM && ARB_VERTEX_PROGRAM - return _Extensions.ARBVertexProgram; -} - #ifdef NL_STATIC } // NLDRIVERGL/ES #endif