lldrawpoolground.cpp

Go to the documentation of this file.
00001 
00032 #include "llviewerprecompiledheaders.h"
00033 
00034 #include "lldrawpoolground.h"
00035 
00036 #include "llviewercontrol.h"
00037 
00038 #include "lldrawable.h"
00039 #include "llface.h"
00040 #include "llsky.h"
00041 #include "llviewercamera.h"
00042 #include "llviewerwindow.h"
00043 #include "llworld.h"
00044 #include "pipeline.h"
00045 #include "llagent.h"
00046 #include "llviewerregion.h"
00047 #include "llglslshader.h"
00048 
00049 LLDrawPoolGround::LLDrawPoolGround() :
00050         LLFacePool(POOL_GROUND)
00051 {
00052 }
00053 
00054 LLDrawPool *LLDrawPoolGround::instancePool()
00055 {
00056         return new LLDrawPoolGround();
00057 }
00058 
00059 void LLDrawPoolGround::prerender()
00060 {
00061         mVertexShaderLevel = LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT);
00062 }
00063 
00064 void LLDrawPoolGround::render(S32 pass)
00065 {
00066         if (mDrawFace.empty())
00067         {
00068                 return;
00069         }       
00070         
00071         LLGLSPipelineSkyBox gls_skybox;
00072         LLImageGL::unbindTexture(0, GL_TEXTURE_2D);
00073         LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
00074 
00075         LLGLClampToFarClip far_clip(glh_get_current_projection());
00076 
00077         F32 water_height = gAgent.getRegion()->getWaterHeight();
00078         glPushMatrix();
00079         LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
00080         glTranslatef(origin.mV[0], origin.mV[1], llmax(origin.mV[2], water_height));
00081 
00082         LLFace *facep = mDrawFace[0];
00083 
00084         gPipeline.disableLights();
00085 
00086         LLOverrideFaceColor col(this, gSky.mVOSkyp->getGLFogColor());
00087         facep->renderIndexed();
00088         
00089         glPopMatrix();
00090 }
00091 
00092 void LLDrawPoolGround::renderForSelect()
00093 {
00094 }
00095 

Generated on Fri May 16 08:33:19 2008 for SecondLife by  doxygen 1.5.5