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

@ -295,7 +295,7 @@ public:
virtual void disableHardwareVertexProgram(){}
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 setMode(const GfxMode& mode);

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

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

Loading…
Cancel
Save