Removed checks for ARB fragment shader, as it's part of OpenGL as of 3.0+, also fragment shaders cannot be disabled as of the same version.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 12 years ago
parent dd0a691fb8
commit 10aad932db

@ -567,13 +567,6 @@ bool CDriverGL3::activeFrameBufferObject(ITexture * tex)
return false; return false;
} }
// ***************************************************************************
void CDriverGL3::disableHardwareTextureShader()
{
H_AUTO_OGL(CDriverGL3_disableHardwareTextureShader)
_Extensions.DisableHardwareTextureShader= true;
}
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL3::isTextureExist(const ITexture&tex) bool CDriverGL3::isTextureExist(const ITexture&tex)
{ {
@ -1198,9 +1191,9 @@ bool CDriverGL3::isWaterShaderSupported() const
{ {
H_AUTO_OGL(CDriverGL3_isWaterShaderSupported); H_AUTO_OGL(CDriverGL3_isWaterShaderSupported);
if(_Extensions.ARBFragmentProgram && ARBWaterShader[0] != 0) return true; if(ARBWaterShader[0] != 0) return true;
if ( !_Extensions.ATIFragmentShader && !_Extensions.ARBFragmentProgram) return false; if ( !_Extensions.ATIFragmentShader ) return false;
return true; return true;
} }
@ -1593,7 +1586,6 @@ void CDriverGL3::initFragmentShaders()
/////////////////// ///////////////////
// the ARB_fragment_program is prioritary over other extensions when present // the ARB_fragment_program is prioritary over other extensions when present
if (_Extensions.ARBFragmentProgram)
{ {
nlinfo("WATER: Try ARB_fragment_program"); nlinfo("WATER: Try ARB_fragment_program");
ARBWaterShader[0] = loadARBFragmentProgramStringNative(WaterCodeNoDiffuseForARBFragmentProgram, _ForceNativeFragmentPrograms); ARBWaterShader[0] = loadARBFragmentProgramStringNative(WaterCodeNoDiffuseForARBFragmentProgram, _ForceNativeFragmentPrograms);

@ -295,7 +295,7 @@ public:
virtual void disableHardwareVertexProgram(){} virtual void disableHardwareVertexProgram(){}
virtual void disableHardwareVertexArrayAGP(){} virtual void disableHardwareVertexArrayAGP(){}
virtual void disableHardwareTextureShader(); virtual void disableHardwareTextureShader(){};
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay); virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay);
virtual bool setMode(const GfxMode& mode); virtual bool setMode(const GfxMode& mode);

@ -936,20 +936,9 @@ void registerGlExtensions(CGlExtensions &ext)
setupARBVertexProgram(glext); setupARBVertexProgram(glext);
// Check texture shaders ext.ATIEnvMapBumpMap = setupATIEnvMapBumpMap(glext);
// Disable feature ??? ext.ATIFragmentShader = setupATIFragmentShader(glext);
if(!ext.DisableHardwareTextureShader) setupARBFragmentProgram(glext);
{
ext.ATIEnvMapBumpMap = setupATIEnvMapBumpMap(glext);
ext.ATIFragmentShader = setupATIFragmentShader(glext);
ext.ARBFragmentProgram = setupARBFragmentProgram(glext);
}
else
{
ext.ATIEnvMapBumpMap = false;
ext.ATIFragmentShader = false;
ext.ARBFragmentProgram = false;
}
// Check EXTSecondaryColor // Check EXTSecondaryColor
ext.EXTSecondaryColor= setupEXTSecondaryColor(glext); ext.EXTSecondaryColor= setupEXTSecondaryColor(glext);

@ -79,17 +79,9 @@ struct CGlExtensions
// ARB Extensions // ARB Extensions
bool ARBTextureCompression; bool ARBTextureCompression;
bool ARBFragmentProgram;
bool ARBTextureNonPowerOfTwo; bool ARBTextureNonPowerOfTwo;
bool ARBMultisample; bool ARBMultisample;
public:
/// \name Disable Hardware feature. False by default. setuped by IDriver
// @{
bool DisableHardwareTextureShader;
// @}
public: public:
CGlExtensions() CGlExtensions()
{ {
@ -114,7 +106,6 @@ public:
EXTBlendColor= false; EXTBlendColor= false;
ATIEnvMapBumpMap = false; ATIEnvMapBumpMap = false;
ATIFragmentShader = false; ATIFragmentShader = false;
ARBFragmentProgram = false;
NVTextureRectangle = false; NVTextureRectangle = false;
EXTTextureRectangle = false; EXTTextureRectangle = false;
EXTTextureFilterAnisotropic = false; EXTTextureFilterAnisotropic = false;
@ -128,9 +119,6 @@ public:
FrameBufferMultisample = false; FrameBufferMultisample = false;
PackedDepthStencil = false; PackedDepthStencil = false;
NVStateVARWithoutFlush = 0; NVStateVARWithoutFlush = 0;
/// \name Disable Hardware feature. False by default. setuped by IDriver
DisableHardwareTextureShader= false;
} }
std::string toString() std::string toString()
@ -158,7 +146,7 @@ public:
result += "\n Programs: "; result += "\n Programs: ";
result += ATIFragmentShader ? "ATIFragmentShader " : ""; result += ATIFragmentShader ? "ATIFragmentShader " : "";
result += ARBFragmentProgram ? "ARBFragmentProgram " : ""; result += "ARBFragmentProgram ";
result += "ARBVertexProgram"; result += "ARBVertexProgram";
result += "\n Misc: "; result += "\n Misc: ";

Loading…
Cancel
Save