From acfdcf2b1deeb04698174c78e8cb22b093445bb1 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:44 -0500 Subject: Second Life viewer sources 1.20.3 --- linden/indra/newview/llvowlsky.cpp | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) (limited to 'linden/indra/newview/llvowlsky.cpp') diff --git a/linden/indra/newview/llvowlsky.cpp b/linden/indra/newview/llvowlsky.cpp index 30d1397..159603e 100644 --- a/linden/indra/newview/llvowlsky.cpp +++ b/linden/indra/newview/llvowlsky.cpp @@ -484,17 +484,12 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) void LLVOWLSky::drawStars(void) { - glEnableClientState(GL_COLOR_ARRAY); - // render the stars as a sphere centered at viewer camera if (mStarsVerts.notNull()) { mStarsVerts->setBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK); - U16* indicesp = (U16*) mStarsVerts->getIndicesPointer(); - glDrawElements(GL_POINTS, getStarsNumIndices(), GL_UNSIGNED_SHORT, indicesp); + mStarsVerts->draw(LLVertexBuffer::POINTS, getStarsNumIndices(), 0); } - - glDisableClientState(GL_COLOR_ARRAY); } void LLVOWLSky::drawDome(void) @@ -507,19 +502,8 @@ void LLVOWLSky::drawDome(void) LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); const U32 data_mask = LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK; - - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - + #if DOME_SLICES - //mFanVerts->setBuffer(data_mask); - //glDrawRangeElements( - // GL_TRIANGLES, - // 0, getFanNumVerts()-1, getFanNumIndices(), - // GL_UNSIGNED_SHORT, - // mFanVerts->getIndicesPointer()); - - //gPipeline.addTrianglesDrawn(getFanNumIndices()/3); - std::vector< LLPointer >::const_iterator strips_vbo_iter, end_strips; end_strips = mStripsVerts.end(); for(strips_vbo_iter = mStripsVerts.begin(); strips_vbo_iter != end_strips; ++strips_vbo_iter) @@ -528,13 +512,10 @@ void LLVOWLSky::drawDome(void) strips_segment->setBuffer(data_mask); - glDrawRangeElements( - //GL_TRIANGLES, - GL_TRIANGLE_STRIP, - 0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(), - GL_UNSIGNED_SHORT, - strips_segment->getIndicesPointer()); - + strips_segment->drawRange( + LLVertexBuffer::TRIANGLE_STRIP, + 0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(), + 0); gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices() - 2); } @@ -547,8 +528,6 @@ void LLVOWLSky::drawDome(void) mStripsVerts->getIndicesPointer()); #endif - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - LLVertexBuffer::unbind(); } -- cgit v1.1