diff options
author | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
commit | 4dabd9c0472deb49573fdafef2fa413e59703f19 (patch) | |
tree | 06c680d6a2047e03838d6548bccd26c7baf9d652 /indra/newview/lldrawpoolground.cpp | |
parent | d4462963c6ba5db2088723bbedc7b60f1184c594 (diff) |
merge release@58699 beta-1-14-0@58707 -> release
Diffstat (limited to 'indra/newview/lldrawpoolground.cpp')
-rw-r--r-- | indra/newview/lldrawpoolground.cpp | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp index 91e92bab6e..edbb11ad79 100644 --- a/indra/newview/lldrawpoolground.cpp +++ b/indra/newview/lldrawpoolground.cpp @@ -12,7 +12,6 @@ #include "llviewercontrol.h" -#include "llagparray.h" #include "lldrawable.h" #include "llface.h" #include "llsky.h" @@ -20,9 +19,11 @@ #include "llviewerwindow.h" #include "llworld.h" #include "pipeline.h" +#include "llagent.h" +#include "llviewerregion.h" LLDrawPoolGround::LLDrawPoolGround() : - LLDrawPool(POOL_GROUND, DATA_SIMPLE_IL_MASK, DATA_SIMPLE_NIL_MASK) + LLFacePool(POOL_GROUND) { } @@ -41,42 +42,38 @@ void LLDrawPoolGround::render(S32 pass) if (mDrawFace.empty()) { return; - } - + } + glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - - bindGLVertexPointer(); - bindGLTexCoordPointer(); LLGLSPipelineSkyBox gls_skybox; + LLGLDisable tex(GL_TEXTURE_2D); LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); glMatrixMode( GL_PROJECTION ); - + glPushMatrix(); - gViewerWindow->setup3DRender(); + //gViewerWindow->setup3DRender(); glMatrixMode(GL_MODELVIEW); - LLGLState tex2d(GL_TEXTURE_2D, (mVertexShaderLevel > 0) ? TRUE : FALSE); - LLViewerImage::bindTexture(gSky.mVOSkyp->getScatterMap(), 0); + F32 water_height = gAgent.getRegion()->getWaterHeight(); + glPushMatrix(); + LLVector3 origin = gCamera->getOrigin(); + glTranslatef(origin.mV[0], origin.mV[1], llmax(origin.mV[2], water_height)); LLFace *facep = mDrawFace[0]; - if (!(mVertexShaderLevel > 0)) - { - gPipeline.disableLights(); - } - - glColor4fv(facep->getFaceColor().mV); + gPipeline.disableLights(); - facep->renderIndexed(getRawIndices()); + LLOverrideFaceColor col(this, gSky.mVOSkyp->getGLFogColor()); + facep->renderIndexed(); glMatrixMode( GL_PROJECTION ); glPopMatrix(); glMatrixMode( GL_MODELVIEW ); + glPopMatrix(); } void LLDrawPoolGround::renderForSelect() |