Commit 4ab18181 authored by hybrid's avatar hybrid

Disable anti-aliasing for the GUI. Fixed lod bias and quality multi-sampling under OpenGL.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2619 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 7bcfbd16
...@@ -1730,9 +1730,7 @@ void CD3D8Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChan ...@@ -1730,9 +1730,7 @@ void CD3D8Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChan
SMaterial mat; SMaterial mat;
mat.ZBuffer=ECFN_NEVER; mat.ZBuffer=ECFN_NEVER;
mat.Lighting=false; mat.Lighting=false;
mat.FrontfaceCulling=false; mat.AntiAliasing=video::EAAM_OFF;
mat.BackfaceCulling=true;
mat.TextureLayer[0].TextureWrap=ETC_REPEAT;
mat.TextureLayer[0].BilinearFilter=false; mat.TextureLayer[0].BilinearFilter=false;
setBasicRenderStates(mat, mat, true); setBasicRenderStates(mat, mat, true);
// fix everything that is wrongly set by SMaterial default // fix everything that is wrongly set by SMaterial default
......
...@@ -2207,9 +2207,7 @@ void CD3D9Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChan ...@@ -2207,9 +2207,7 @@ void CD3D9Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChan
SMaterial mat; SMaterial mat;
mat.ZBuffer=ECFN_NEVER; mat.ZBuffer=ECFN_NEVER;
mat.Lighting=false; mat.Lighting=false;
mat.FrontfaceCulling=false; mat.AntiAliasing=video::EAAM_OFF;
mat.BackfaceCulling=true;
mat.TextureLayer[0].TextureWrap=ETC_REPEAT;
mat.TextureLayer[0].BilinearFilter=false; mat.TextureLayer[0].BilinearFilter=false;
setBasicRenderStates(mat, mat, true); setBasicRenderStates(mat, mat, true);
// fix everything that is wrongly set by SMaterial default // fix everything that is wrongly set by SMaterial default
......
...@@ -2273,7 +2273,7 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater ...@@ -2273,7 +2273,7 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
else if (i>0) else if (i>0)
break; break;
#ifdef EXT_texture_lod_bias #ifdef GL_EXT_texture_lod_bias
if (FeatureAvailable[IRR_EXT_texture_lod_bias]) if (FeatureAvailable[IRR_EXT_texture_lod_bias])
{ {
if (material.TextureLayer[i].LODBias) if (material.TextureLayer[i].LODBias)
...@@ -2461,7 +2461,12 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater ...@@ -2461,7 +2461,12 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
glEnable(GL_MULTISAMPLE_ARB); glEnable(GL_MULTISAMPLE_ARB);
#ifdef GL_NV_multisample_filter_hint #ifdef GL_NV_multisample_filter_hint
if (FeatureAvailable[IRR_NV_multisample_filter_hint]) if (FeatureAvailable[IRR_NV_multisample_filter_hint])
glHint(GL_MULTISAMPLE_FILTER_HINT_NV, (material.AntiAliasing & EAAM_QUALITY)?GL_NICEST:GL_FASTEST); {
if ((material.AntiAliasing & EAAM_QUALITY) == EAAM_QUALITY)
glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
else
glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
}
#endif #endif
} }
else else
...@@ -2505,6 +2510,7 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh ...@@ -2505,6 +2510,7 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh
SMaterial mat; SMaterial mat;
mat.ZBuffer=ECFN_NEVER; mat.ZBuffer=ECFN_NEVER;
mat.Lighting=false; mat.Lighting=false;
mat.AntiAliasing=video::EAAM_OFF;
mat.TextureLayer[0].BilinearFilter=false; mat.TextureLayer[0].BilinearFilter=false;
setBasicRenderStates(mat, mat, true); setBasicRenderStates(mat, mat, true);
LastMaterial = mat; LastMaterial = mat;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment