Don't enforce native fragment programs on modern hardware. Fixes water for the open source ATI/AMD driver, which reports fragment programs as not native (as they are translated to modern hardware).
This commit is contained in:
parent
9e0b573141
commit
dd52a05d02
3 changed files with 18 additions and 1 deletions
|
@ -483,6 +483,11 @@ bool CDriverGL::setupDisplay()
|
||||||
glLightModeli((GLenum)GL_LIGHT_MODEL_COLOR_CONTROL_EXT, GL_SEPARATE_SPECULAR_COLOR_EXT);
|
glLightModeli((GLenum)GL_LIGHT_MODEL_COLOR_CONTROL_EXT, GL_SEPARATE_SPECULAR_COLOR_EXT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_Extensions.ARBFragmentShader)
|
||||||
|
{
|
||||||
|
_ForceNativeFragmentPrograms = false;
|
||||||
|
}
|
||||||
|
|
||||||
_VertexProgramEnabled= false;
|
_VertexProgramEnabled= false;
|
||||||
_PixelProgramEnabled= false;
|
_PixelProgramEnabled= false;
|
||||||
|
|
|
@ -1249,6 +1249,15 @@ static bool setupNVFragmentProgram2(const char *glext)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// *********************************
|
||||||
|
static bool setupARBFragmentShader(const char *glext)
|
||||||
|
{
|
||||||
|
H_AUTO_OGL(setupNVFragmentProgram2);
|
||||||
|
CHECK_EXT("GL_ARB_fragment_shader");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
static bool setupARBVertexBufferObject(const char *glext)
|
static bool setupARBVertexBufferObject(const char *glext)
|
||||||
{
|
{
|
||||||
|
@ -1627,7 +1636,7 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
{
|
{
|
||||||
ext.NVVertexProgram = setupNVVertexProgram(glext);
|
ext.NVVertexProgram = setupNVVertexProgram(glext);
|
||||||
ext.EXTVertexShader = setupEXTVertexShader(glext);
|
ext.EXTVertexShader = setupEXTVertexShader(glext);
|
||||||
ext.ARBVertexProgram= setupARBVertexProgram(glext);
|
ext.ARBVertexProgram = setupARBVertexProgram(glext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1642,6 +1651,7 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
{
|
{
|
||||||
ext.ARBFragmentProgram = setupARBFragmentProgram(glext);
|
ext.ARBFragmentProgram = setupARBFragmentProgram(glext);
|
||||||
ext.NVFragmentProgram2 = setupNVFragmentProgram2(glext);
|
ext.NVFragmentProgram2 = setupNVFragmentProgram2(glext);
|
||||||
|
ext.ARBFragmentShader = setupARBFragmentShader(glext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,6 +104,7 @@ struct CGlExtensions
|
||||||
bool ARBVertexProgram;
|
bool ARBVertexProgram;
|
||||||
bool ARBTextureNonPowerOfTwo;
|
bool ARBTextureNonPowerOfTwo;
|
||||||
bool ARBMultisample;
|
bool ARBMultisample;
|
||||||
|
bool ARBFragmentShader;
|
||||||
|
|
||||||
// NV Pixel Programs
|
// NV Pixel Programs
|
||||||
bool NVFragmentProgram2;
|
bool NVFragmentProgram2;
|
||||||
|
@ -178,6 +179,7 @@ public:
|
||||||
ARBTextureRectangle = false;
|
ARBTextureRectangle = false;
|
||||||
ARBTextureNonPowerOfTwo = false;
|
ARBTextureNonPowerOfTwo = false;
|
||||||
ARBMultisample = false;
|
ARBMultisample = false;
|
||||||
|
ARBFragmentShader = false;
|
||||||
NVOcclusionQuery = false;
|
NVOcclusionQuery = false;
|
||||||
ARBOcclusionQuery = false;
|
ARBOcclusionQuery = false;
|
||||||
FrameBufferObject = false;
|
FrameBufferObject = false;
|
||||||
|
|
Loading…
Reference in a new issue