summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsky.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-29 10:45:43 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-29 10:45:43 +0200
commitd1c0a5b840e9ec2d3a468216339ae5367aed4bf5 (patch)
tree30a47a8bf5ba4561c0f6d3839afd1a9f35dac873 /indra/newview/lldrawpoolsky.cpp
parent6f99a844efe4e7809ed0a995b0118851e6f0d8d5 (diff)
parent53e958a2638705572ed7dbf61369d92b332c4b60 (diff)
Merge branch 'DRTVWR-559' into marchcat/587-v-pbr-merge
# Conflicts: # indra/llcommon/CMakeLists.txt # indra/newview/llspatialpartition.cpp # indra/newview/llviewergenericmessage.cpp # indra/newview/llvoavatar.cpp
Diffstat (limited to 'indra/newview/lldrawpoolsky.cpp')
-rw-r--r--indra/newview/lldrawpoolsky.cpp80
1 files changed, 1 insertions, 79 deletions
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index 3a1efec91b..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,83 +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);
-
- LLGLEnable fog_enable( (mShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater()) ? GL_FOG : 0);
-
- 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 )