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/lldrawpoolsky.cpp | |
parent | d4462963c6ba5db2088723bbedc7b60f1184c594 (diff) |
merge release@58699 beta-1-14-0@58707 -> release
Diffstat (limited to 'indra/newview/lldrawpoolsky.cpp')
-rw-r--r-- | indra/newview/lldrawpoolsky.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp index 96eb8ea721..80340f63b9 100644 --- a/indra/newview/lldrawpoolsky.cpp +++ b/indra/newview/lldrawpoolsky.cpp @@ -12,7 +12,6 @@ #include "imageids.h" -#include "llagparray.h" #include "llagent.h" #include "lldrawable.h" #include "llface.h" @@ -26,7 +25,7 @@ #include "pipeline.h" LLDrawPoolSky::LLDrawPoolSky() : - LLDrawPool(POOL_SKY, DATA_SIMPLE_IL_MASK, DATA_SIMPLE_NIL_MASK) + LLFacePool(POOL_SKY) { } @@ -62,15 +61,17 @@ void LLDrawPoolSky::render(S32 pass) glMatrixMode( GL_PROJECTION ); glPushMatrix(); - gViewerWindow->setup3DRender(); + //gViewerWindow->setup3DRender(); + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + LLVector3 origin = gCamera->getOrigin(); + glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); - bindGLVertexPointer(); - bindGLTexCoordPointer(); - S32 face_count = (S32)mDrawFace.size(); for (S32 i = 0; i < llmin(6, face_count); ++i) @@ -78,13 +79,13 @@ void LLDrawPoolSky::render(S32 pass) renderSkyCubeFace(i); } - const LLFace *hbfaces[3]; + LLFace *hbfaces[3]; hbfaces[0] = NULL; hbfaces[1] = NULL; hbfaces[2] = NULL; for (S32 curr_face = 0; curr_face < face_count; curr_face++) { - const LLFace* facep = mDrawFace[curr_face]; + LLFace* facep = mDrawFace[curr_face]; if (voskyp->isSameFace(LLVOSky::FACE_SUN, facep)) { hbfaces[0] = facep; @@ -118,11 +119,12 @@ void LLDrawPoolSky::render(S32 pass) glMatrixMode( GL_PROJECTION ); glPopMatrix(); glMatrixMode( GL_MODELVIEW ); + glPopMatrix(); } void LLDrawPoolSky::renderSkyCubeFace(U8 side) { - const LLFace &face = *mDrawFace[LLVOSky::FACE_SIDE0 + side]; + LLFace &face = *mDrawFace[LLVOSky::FACE_SIDE0 + side]; if (!face.getGeomCount()) { return; @@ -130,20 +132,20 @@ void LLDrawPoolSky::renderSkyCubeFace(U8 side) mSkyTex[side].bindTexture(TRUE); - face.renderIndexed(getRawIndices()); + face.renderIndexed(); if (LLSkyTex::doInterpolate()) { LLGLEnable blend(GL_BLEND); mSkyTex[side].bindTexture(FALSE); glColor4f(1, 1, 1, LLSkyTex::getInterpVal()); // lighting is disabled - face.renderIndexed(getRawIndices()); + face.renderIndexed(); } mIndicesDrawn += face.getIndicesCount(); } -void LLDrawPoolSky::renderHeavenlyBody(U8 hb, const LLFace* face) +void LLDrawPoolSky::renderHeavenlyBody(U8 hb, LLFace* face) { if ( !mHB[hb]->getDraw() ) return; if (! face->getGeomCount()) return; @@ -152,13 +154,13 @@ void LLDrawPoolSky::renderHeavenlyBody(U8 hb, const LLFace* face) tex->bind(); LLColor4 color(mHB[hb]->getInterpColor()); LLOverrideFaceColor override(this, color); - face->renderIndexed(getRawIndices()); + face->renderIndexed(); mIndicesDrawn += face->getIndicesCount(); } -void LLDrawPoolSky::renderSunHalo(const LLFace* face) +void LLDrawPoolSky::renderSunHalo(LLFace* face) { if (! mHB[0]->getDraw()) return; if (! face->getGeomCount()) return; @@ -169,7 +171,7 @@ void LLDrawPoolSky::renderSunHalo(const LLFace* face) color.mV[3] = llclamp(mHB[0]->getHaloBrighness(), 0.f, 1.f); LLOverrideFaceColor override(this, color); - face->renderIndexed(getRawIndices()); + face->renderIndexed(); mIndicesDrawn += face->getIndicesCount(); } |