summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolsky.cpp')
-rw-r--r--indra/newview/lldrawpoolsky.cpp82
1 files changed, 1 insertions, 81 deletions
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index ffcd7835ee..3c5bfe4a1c 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -28,21 +28,10 @@
#include "lldrawpoolsky.h"
-#include "llagent.h"
-#include "lldrawable.h"
-#include "llface.h"
-#include "llsky.h"
-#include "llviewercamera.h"
-#include "llviewertexturelist.h"
-#include "llviewerregion.h"
-#include "llvosky.h"
-#include "llworld.h" // To get water height
-#include "pipeline.h"
-#include "llviewershadermgr.h"
+// DEPRECATED
LLDrawPoolSky::LLDrawPoolSky()
: LLFacePool(POOL_SKY),
-
mSkyTex(NULL),
mShader(NULL)
{
@@ -50,85 +39,16 @@ LLDrawPoolSky::LLDrawPoolSky()
void LLDrawPoolSky::prerender()
{
- mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
- gSky.mVOSkyp->updateGeometry(gSky.mVOSkyp->mDrawable);
}
void LLDrawPoolSky::render(S32 pass)
{
- gGL.flush();
- if (mDrawFace.empty())
- {
- return;
- }
-
- // Don't draw the sky box if we can and are rendering the WL sky dome.
- if (gPipeline.canUseWindLightShaders())
- {
- return;
- }
-
- // don't render sky under water (background just gets cleared to fog color)
- if(mShaderLevel > 0 && LLPipeline::sUnderWaterRender)
- {
- return;
- }
-
-
- //just use the UI shader (generic single texture no lighting)
- gOneTextureNoColorProgram.bind();
-
- LLGLSPipelineDepthTestSkyBox gls_skybox(true, false);
-
-#if GL_VERSION_1_1
- LLGLEnable fog_enable( (mShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater()) ? GL_FOG : 0);
-#endif
-
- gGL.pushMatrix();
- LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
- gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
-
- S32 face_count = (S32)mDrawFace.size();
-
- LLVertexBuffer::unbind();
- gGL.diffuseColor4f(1,1,1,1);
-
- for (S32 i = 0; i < face_count; ++i)
- {
- renderSkyFace(i);
- }
-
- gGL.popMatrix();
}
void LLDrawPoolSky::renderSkyFace(U8 index)
{
- LLFace* face = mDrawFace[index];
-
- if (!face || !face->getGeomCount())
- {
- return;
- }
-
- if (index < 6) // sky tex...interp
- {
- llassert(mSkyTex);
- mSkyTex[index].bindTexture(true); // bind the current tex
-
- face->renderIndexed();
- }
- else // heavenly body faces, no interp...
- {
- LLGLEnable blend(GL_BLEND);
- LLViewerTexture* tex = face->getTexture(LLRender::DIFFUSE_MAP);
- if (tex)
- {
- gGL.getTexUnit(0)->bind(tex, true);
- face->renderIndexed();
- }
- }
}
void LLDrawPoolSky::endRenderPass( S32 pass )