diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-22 00:10:57 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-22 00:10:57 -0500 |
commit | a2d08a6d80c4be7456d30f728da1838e63eb397f (patch) | |
tree | 29736b2700fddedfe453b2eb35808376de16c8dd /indra/newview/llvowlsky.cpp | |
parent | 66acb932ba7bbd7fecbe78a34e753b5aab2d2104 (diff) |
SH-2244 Fix "RenderGLCoreProfile" actually make a core profile context and modify viewer to run under said context without generating errors.
Diffstat (limited to 'indra/newview/llvowlsky.cpp')
-rw-r--r-- | indra/newview/llvowlsky.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 39c9945fb4..824cb8a15f 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -485,7 +485,7 @@ void LLVOWLSky::drawStars(void) if (mStarsVerts.notNull()) { mStarsVerts->setBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK); - mStarsVerts->drawArrays(LLRender::QUADS, 0, getStarsNumVerts()*4); + mStarsVerts->drawArrays(LLRender::TRIANGLES, 0, getStarsNumVerts()*4); } } @@ -772,7 +772,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) if (mStarsVerts.isNull()) { mStarsVerts = new LLVertexBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK, GL_DYNAMIC_DRAW); - mStarsVerts->allocateBuffer(getStarsNumVerts()*4, 0, TRUE); + mStarsVerts->allocateBuffer(getStarsNumVerts()*6, 0, TRUE); } BOOL success = mStarsVerts->getVertexStrider(verticesp) @@ -807,17 +807,23 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) *(verticesp++) = mStarVertices[vtx]; *(verticesp++) = mStarVertices[vtx]+left; *(verticesp++) = mStarVertices[vtx]+left+up; + *(verticesp++) = mStarVertices[vtx]+left; + *(verticesp++) = mStarVertices[vtx]+left+up; *(verticesp++) = mStarVertices[vtx]+up; *(texcoordsp++) = LLVector2(0,0); *(texcoordsp++) = LLVector2(0,1); *(texcoordsp++) = LLVector2(1,1); + *(texcoordsp++) = LLVector2(0,1); + *(texcoordsp++) = LLVector2(1,1); *(texcoordsp++) = LLVector2(1,0); *(colorsp++) = LLColor4U(mStarColors[vtx]); *(colorsp++) = LLColor4U(mStarColors[vtx]); *(colorsp++) = LLColor4U(mStarColors[vtx]); *(colorsp++) = LLColor4U(mStarColors[vtx]); + *(colorsp++) = LLColor4U(mStarColors[vtx]); + *(colorsp++) = LLColor4U(mStarColors[vtx]); } mStarsVerts->setBuffer(0); |