- reactivate compatibility profile so that immediate mode drawing can be used on older hardware not supporting persistently mapped buffers.

- reactivate alpha testing per fixed function pipeline
- use the 'modern' way to define clip planes (GL_CLIP_DISTANCE). This is far more portable than the old glClipPlane method and a lot more robust than checking this in the fragment shader.
This commit is contained in:
Christoph Oelckers 2014-07-17 02:37:18 +02:00
commit eb9d2d9917
13 changed files with 110 additions and 48 deletions

View file

@ -149,7 +149,29 @@ bool FRenderState::ApplyShader()
activeShader->muInterpolationFactor.Set(mInterpolationFactor);
activeShader->muClipHeightTop.Set(mClipHeightTop);
activeShader->muClipHeightBottom.Set(mClipHeightBottom);
activeShader->muAlphaThreshold.Set(mAlphaThreshold);
#ifndef CORE_PROFILE
if (!(gl.flags & RFL_COREPROFILE))
{
if (mAlphaThreshold != glAlphaThreshold)
{
glAlphaThreshold = mAlphaThreshold;
if (mAlphaThreshold < 0.f)
{
glDisable(GL_ALPHA_TEST);
}
else
{
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, mAlphaThreshold);
}
}
}
else
#endif
{
activeShader->muAlphaThreshold.Set(mAlphaThreshold);
}
if (mGlowEnabled)
{