diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-23 02:29:53 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-23 02:29:53 -0500 |
commit | b9926e8f57787eb146b06260cc3d0260e34330ce (patch) | |
tree | 2f646a86a6e1b074a07ae97284c9f164d824d80f /indra/newview | |
parent | d3f614e2e971fd442660ba6c1645830d3bf0b6cf (diff) |
SH-2244 Better VAO support -- still slower than non-VAO implementation for some reason
Diffstat (limited to 'indra/newview')
28 files changed, 70 insertions, 59 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a8a7b165a3..32d4097ff3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7681,7 +7681,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>RenderDebugNormalScale</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 9920caf7f6..74ee082bed 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -28,7 +28,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; @@ -97,7 +98,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz, 1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl index 36000b86d6..908f3abcd0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl @@ -27,7 +27,8 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec3 normal; ATTRIBUTE vec2 texcoord0; @@ -43,7 +44,7 @@ void main() gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texture_index = position.w; + vary_texture_index = texture_index; vary_normal = normalize(normal_matrix * normal); vertex_color = diffuse_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl index b3558be678..50e92c191b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl @@ -27,7 +27,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE float emissive; ATTRIBUTE vec2 texcoord0; @@ -48,7 +49,7 @@ void main() //transform vertex vec4 vert = vec4(position.xyz, 1.0); vec4 pos = (modelview_matrix * vert); - vary_texture_index = position.w; + vary_texture_index = texture_index; gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index ef9f62da84..ab638991f7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -28,7 +28,8 @@ uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; @@ -49,7 +50,7 @@ void main() //transform vertex vec4 vert = vec4(position.xyz, 1.0); vec4 pos = (modelview_matrix * vert); - vary_texture_index = position.w; + vary_texture_index = texture_index; gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl index 0e05beac67..77b0806bfc 100644 --- a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl @@ -27,7 +27,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE float emissive; ATTRIBUTE vec2 texcoord0; @@ -42,7 +43,7 @@ VARYING float fog_depth; void main() { //transform vertex - vary_texture_index = position.w; + vary_texture_index = texture_index; gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl index 268e4127a2..6a3777c7c8 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl @@ -28,7 +28,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; @@ -96,7 +97,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz, 1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl index ef97e4f781..580ef2694f 100644 --- a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl @@ -36,7 +36,8 @@ uniform vec4 origin; VARYING float vary_texture_index; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; @@ -50,7 +51,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl index 2fd22cee9d..09dbd0b6cd 100644 --- a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl @@ -27,7 +27,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; @@ -44,7 +45,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl index 472ff219e5..86c592ea57 100644 --- a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl @@ -29,7 +29,8 @@ uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; @@ -51,7 +52,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl index 144336417e..8e8f0664b0 100644 --- a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl @@ -28,7 +28,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; @@ -45,7 +46,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 7ae11bff94..d36379b0e7 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1216,7 +1216,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } @@ -1441,7 +1441,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } else @@ -1588,7 +1588,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } if (do_bump) @@ -1625,7 +1625,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } } @@ -1675,7 +1675,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } @@ -1695,7 +1695,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } @@ -1715,7 +1715,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } @@ -1727,7 +1727,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLVector4a::memcpyNonAliased16((F32*) weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32)); if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } @@ -1757,7 +1757,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } @@ -1796,7 +1796,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (map_range) { - mVertexBuffer->setBuffer(0); + mVertexBuffer->flush(); } } if (rebuild_tcoord) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index db5e4a2fb5..cc92ab4539 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -320,7 +320,7 @@ void LLSpatialGroup::buildOcclusion() } { - mOcclusionVerts->setBuffer(0); + mOcclusionVerts->flush(); } clearState(LLSpatialGroup::OCCLUSION_DIRTY); diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp index 4bde2dfcab..c3eb70f850 100644 --- a/indra/newview/llsprite.cpp +++ b/indra/newview/llsprite.cpp @@ -243,7 +243,7 @@ void LLSprite::updateFace(LLFace &face) *indicesp++ = 3 + index_offset; } - face.getVertexBuffer()->setBuffer(0); + face.getVertexBuffer()->flush(); face.mCenterAgent = mPosition; } diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 59835028a1..331eb8b8f4 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -817,7 +817,7 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh) } } - buffer->setBuffer(0); + buffer->flush(); } const U32 UPDATE_GEOMETRY_CALL_MASK = 0x1FFF; // 8K samples before overflow diff --git a/indra/newview/llviewerjointmesh_sse.cpp b/indra/newview/llviewerjointmesh_sse.cpp index 400b49d046..00ed47e091 100644 --- a/indra/newview/llviewerjointmesh_sse.cpp +++ b/indra/newview/llviewerjointmesh_sse.cpp @@ -101,7 +101,7 @@ void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh) ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]); } - buffer->setBuffer(0); + buffer->flush(); } #else diff --git a/indra/newview/llviewerjointmesh_vec.cpp b/indra/newview/llviewerjointmesh_vec.cpp index 6600d01d17..a8713b6f05 100644 --- a/indra/newview/llviewerjointmesh_vec.cpp +++ b/indra/newview/llviewerjointmesh_vec.cpp @@ -92,6 +92,6 @@ void LLViewerJointMesh::updateGeometryVectorized(LLFace *face, LLPolyMesh *mesh) ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]); } - buffer->setBuffer(0); + buffer->flush(); #endif } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index d1d3334fed..b0d97ee5f6 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -317,6 +317,7 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void) mReservedAttribs.push_back("weight"); mReservedAttribs.push_back("weight4"); mReservedAttribs.push_back("clothing"); + mReservedAttribs.push_back("texture_index"); mAvatarUniforms.push_back("matrixPalette"); mAvatarUniforms.push_back("gWindDir"); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7c6a815def..2a670275a3 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2142,7 +2142,7 @@ void LLVOAvatar::updateMeshData() } stop_glerror(); - buff->setBuffer(0); + buff->flush(); if(!f_num) { @@ -4132,7 +4132,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) LLVertexBuffer* vb = mDrawable->getFace(0)->getVertexBuffer(); if (vb) { - vb->setBuffer(0); + vb->flush(); } } } diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index ce256fdedf..0060f81ab5 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -162,7 +162,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) *(texCoordsp++) = LLVector2(0.f, 1.f); *(texCoordsp++) = LLVector2(0.5f, 0.5f); - face->getVertexBuffer()->setBuffer(0); + face->getVertexBuffer()->flush(); LLPipeline::sCompiles++; return TRUE; } diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index a4b0910c92..d7edc94c2f 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -513,7 +513,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) } } - buffer->setBuffer(0); + buffer->flush(); mFaceList.clear(); } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 29ca16ede6..d90c3be6c7 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1267,7 +1267,7 @@ void LLVOSky::updateDummyVertexBuffer() LLStrider<LLVector3> vertices ; mFace[FACE_DUMMY]->getVertexBuffer()->getVertexStrider(vertices, 0); *vertices = mCameraPosAgent ; - mFace[FACE_DUMMY]->getVertexBuffer()->setBuffer(0) ; + mFace[FACE_DUMMY]->getVertexBuffer()->flush(); } //---------------------------------- //end of fake vertex buffer updating @@ -1351,7 +1351,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) *indicesp++ = index_offset + 3; *indicesp++ = index_offset + 2; - buff->setBuffer(0); + buff->flush(); } } @@ -1516,7 +1516,7 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons *indicesp++ = index_offset + 2; *indicesp++ = index_offset + 3; - facep->getVertexBuffer()->setBuffer(0); + facep->getVertexBuffer()->flush(); if (is_sun) { @@ -2030,7 +2030,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, } } - face->getVertexBuffer()->setBuffer(0); + face->getVertexBuffer()->flush(); } diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 7e00350926..bc82b0df13 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -57,7 +57,7 @@ public: }; // virtual - void setupVertexBuffer(U32 data_mask) const + void setupVertexBuffer(U32 data_mask) { if (LLGLSLShader::sNoFixedFunction) { //just use default if shaders are in play @@ -1122,7 +1122,7 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group) index_offset += facep->getGeomCount(); } - buffer->setBuffer(0); + buffer->flush(); mFaceList.clear(); } diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 4cef0f5b5b..6486fd24ea 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -858,7 +858,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) slices /= 2; } - mReferenceBuffer->setBuffer(0); + mReferenceBuffer->flush(); llassert(vertex_count == max_vertices); llassert(index_count == max_indices); } @@ -940,8 +940,8 @@ void LLVOTree::updateMesh() genBranchPipeline(vertices, normals, tex_coords, indices, idx_offset, scale_mat, mTrunkLOD, stop_depth, mDepth, mTrunkDepth, 1.0, mTwist, droop, mBranches, alpha); - mReferenceBuffer->setBuffer(0); - buff->setBuffer(0); + mReferenceBuffer->flush(); + buff->flush(); } void LLVOTree::appendMesh(LLStrider<LLVector3>& vertices, diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 3b31100305..c56a62a41b 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4422,7 +4422,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) for (std::set<LLVertexBuffer*>::iterator iter = mapped_buffers.begin(); iter != mapped_buffers.end(); ++iter) { - (*iter)->setBuffer(0); + (*iter)->flush(); } // don't forget alpha @@ -4430,7 +4430,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) !group->mVertexBuffer.isNull() && group->mVertexBuffer->isLocked()) { - group->mVertexBuffer->setBuffer(0); + group->mVertexBuffer->flush(); } //if not all buffers are unmapped @@ -4446,7 +4446,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) LLVertexBuffer* buff = face->getVertexBuffer(); if (face && buff && buff->isLocked()) { - buff->setBuffer(0) ; + buff->flush(); } } } @@ -4852,7 +4852,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: ++face_iter; } - buffer->setBuffer(0); + buffer->flush(); } group->mBufferMap[mask].clear(); diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index e70ac0a2e7..75198c465b 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -231,7 +231,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) } } - buff->setBuffer(0); + buff->flush(); mDrawable->movePartition(); LLPipeline::sCompiles++; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 824cb8a15f..c26aefb28f 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -326,7 +326,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) buildFanBuffer(vertices, texCoords, indices); - mFanVerts->setBuffer(0); + mFanVerts->flush(); } { @@ -388,7 +388,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) buildStripsBuffer(begin_stack, end_stack, vertices, texCoords, indices); // and unlock the buffer - segment->setBuffer(0); + segment->flush(); } } #else @@ -468,7 +468,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) } } - mStripsVerts->setBuffer(0); + mStripsVerts->flush(); #endif updateStarColors(); @@ -826,6 +826,6 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) *(colorsp++) = LLColor4U(mStarColors[vtx]); } - mStarsVerts->setBuffer(0); + mStarsVerts->flush(); return TRUE; } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0fbe030832..28391bf423 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6553,7 +6553,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) v[1] = LLVector3(-1,3,0); v[2] = LLVector3(3,-1,0); - buff->setBuffer(0); + buff->flush(); LLGLDisable blend(GL_BLEND); |