summaryrefslogtreecommitdiff
path: root/indra/newview/llvowlsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvowlsky.cpp')
-rw-r--r--indra/newview/llvowlsky.cpp78
1 files changed, 36 insertions, 42 deletions
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 741d0e3992..933bf9bf12 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -160,49 +160,45 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
LLStrider<LLVector2> texCoords;
LLStrider<U16> indices;
- if (gPipeline.useAdvancedAtmospherics())
+ if (mFsSkyVerts.isNull())
{
- if (mFsSkyVerts.isNull())
- {
- mFsSkyVerts = new LLVertexBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
-
- if (!mFsSkyVerts->allocateBuffer(4, 6, TRUE))
- {
- LL_WARNS() << "Failed to allocate Vertex Buffer on full screen sky update" << LL_ENDL;
- }
-
- BOOL success = mFsSkyVerts->getVertexStrider(vertices)
- && mFsSkyVerts->getTexCoord0Strider(texCoords)
- && mFsSkyVerts->getIndexStrider(indices);
-
- if(!success)
- {
- LL_ERRS() << "Failed updating WindLight fullscreen sky geometry." << LL_ENDL;
- }
-
- *vertices++ = LLVector3(-1.0f, -1.0f, 0.0f);
- *vertices++ = LLVector3( 1.0f, -1.0f, 0.0f);
- *vertices++ = LLVector3(-1.0f, 1.0f, 0.0f);
- *vertices++ = LLVector3( 1.0f, 1.0f, 0.0f);
-
- *texCoords++ = LLVector2(0.0f, 0.0f);
- *texCoords++ = LLVector2(1.0f, 0.0f);
- *texCoords++ = LLVector2(0.0f, 1.0f);
- *texCoords++ = LLVector2(1.0f, 1.0f);
-
- *indices++ = 0;
- *indices++ = 1;
- *indices++ = 2;
- *indices++ = 1;
- *indices++ = 3;
- *indices++ = 2;
-
- mFsSkyVerts->flush();
- }
-
- return TRUE;
+ mFsSkyVerts = new LLVertexBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
+
+ if (!mFsSkyVerts->allocateBuffer(4, 6, TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer on full screen sky update" << LL_ENDL;
+ }
+
+ BOOL success = mFsSkyVerts->getVertexStrider(vertices)
+ && mFsSkyVerts->getTexCoord0Strider(texCoords)
+ && mFsSkyVerts->getIndexStrider(indices);
+
+ if(!success)
+ {
+ LL_ERRS() << "Failed updating WindLight fullscreen sky geometry." << LL_ENDL;
+ }
+
+ *vertices++ = LLVector3(-1.0f, -1.0f, 0.0f);
+ *vertices++ = LLVector3( 1.0f, -1.0f, 0.0f);
+ *vertices++ = LLVector3(-1.0f, 1.0f, 0.0f);
+ *vertices++ = LLVector3( 1.0f, 1.0f, 0.0f);
+
+ *texCoords++ = LLVector2(0.0f, 0.0f);
+ *texCoords++ = LLVector2(1.0f, 0.0f);
+ *texCoords++ = LLVector2(0.0f, 1.0f);
+ *texCoords++ = LLVector2(1.0f, 1.0f);
+
+ *indices++ = 0;
+ *indices++ = 1;
+ *indices++ = 2;
+ *indices++ = 1;
+ *indices++ = 3;
+ *indices++ = 2;
+
+ mFsSkyVerts->flush();
}
+ if(mFanVerts.isNull())
{
mFanVerts = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
if (!mFanVerts->allocateBuffer(getFanNumVerts(), getFanNumIndices(), TRUE))
@@ -324,8 +320,6 @@ void LLVOWLSky::drawFsSky(void)
updateGeometry(mDrawable);
}
- //LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
- LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE, GL_ALWAYS);
LLGLDisable disable_blend(GL_BLEND);
mFsSkyVerts->setBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK);