summaryrefslogtreecommitdiff
path: root/indra/newview/llvosurfacepatch.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-25 14:39:05 -0500
committerDave Parks <davep@lindenlab.com>2011-10-25 14:39:05 -0500
commit30d1a2d053fe7d6e0c88928cf51aa73865ee21e8 (patch)
tree1a878cdf561ed5e2f4ce0edca2986239b9724b18 /indra/newview/llvosurfacepatch.cpp
parentb7a349f231977d5917b29faacca143a85d925576 (diff)
parentc54f6cfdc3f44ccb6fee3acd5fa40bd177c67639 (diff)
merge
Diffstat (limited to 'indra/newview/llvosurfacepatch.cpp')
-rw-r--r--indra/newview/llvosurfacepatch.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 510525259f..bc82b0df13 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -57,8 +57,14 @@ public:
};
// virtual
- void setupVertexBuffer(U32 data_mask) const
+ void setupVertexBuffer(U32 data_mask)
{
+ if (LLGLSLShader::sNoFixedFunction)
+ { //just use default if shaders are in play
+ LLVertexBuffer::setupVertexBuffer(data_mask & ~(MAP_TEXCOORD2 | MAP_TEXCOORD3));
+ return;
+ }
+
U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;
//assume tex coords 2 and 3 are present
@@ -106,20 +112,6 @@ public:
glColorPointer(4, GL_UNSIGNED_BYTE, LLVertexBuffer::sTypeSize[TYPE_COLOR], (void*)(base + mOffsets[TYPE_COLOR]));
}
- if (data_mask & MAP_WEIGHT)
- {
- glVertexAttribPointerARB(1, 1, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], (void*)(base + mOffsets[TYPE_WEIGHT]));
- }
-
- if (data_mask & MAP_WEIGHT4 && sWeight4Loc != -1)
- {
- glVertexAttribPointerARB(sWeight4Loc, 4, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], (void*)(base+mOffsets[TYPE_WEIGHT4]));
- }
-
- if (data_mask & MAP_CLOTHWEIGHT)
- {
- glVertexAttribPointerARB(4, 4, GL_FLOAT, TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]));
- }
if (data_mask & MAP_VERTEX)
{
glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
@@ -1130,7 +1122,7 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
index_offset += facep->getGeomCount();
}
- buffer->setBuffer(0);
+ buffer->flush();
mFaceList.clear();
}