diff options
Diffstat (limited to 'indra/newview/lldrawpoolterrain.cpp')
-rw-r--r-- | indra/newview/lldrawpoolterrain.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 5e676bc5b3..2f4f47df6f 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -666,6 +666,7 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->bind(detail_texture0p); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -673,6 +674,7 @@ void LLDrawPoolTerrain::renderFull4TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 1: Generate alpha ramp for detail0/detail1 transition @@ -689,12 +691,14 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(2)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(2)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 3: Modulate with primary (vertex) color for lighting @@ -716,12 +720,14 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->bind(detail_texture3p); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 1: Generate alpha ramp for detail2/detail3 transition @@ -742,12 +748,14 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(2)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(2)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 3: Generate alpha ramp for detail1/detail2 transition @@ -782,8 +790,10 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(2)->disable(); gGL.getTexUnit(2)->activate(); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -806,8 +816,10 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -841,6 +853,7 @@ void LLDrawPoolTerrain::renderFull2TU() // Stage 0: Render detail 0 into base // gGL.getTexUnit(0)->bind(detail_texture0p); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -848,6 +861,7 @@ void LLDrawPoolTerrain::renderFull2TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif drawLoop(); @@ -859,8 +873,10 @@ void LLDrawPoolTerrain::renderFull2TU() // gGL.getTexUnit(0)->bind(m2DAlphaRampImagep); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif // // Stage 1: Write detail1 @@ -869,12 +885,14 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif gGL.getTexUnit(0)->activate(); { @@ -902,12 +920,14 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif { LLGLEnable blend(GL_BLEND); @@ -933,12 +953,14 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif gGL.getTexUnit(0)->activate(); { @@ -955,8 +977,10 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->disable(); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -967,8 +991,10 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); |