diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-04-15 14:13:57 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-04-15 14:13:57 -0500 |
| commit | af6133dfa5c6f4e3a00752f2885bd2f30c0e1c8c (patch) | |
| tree | 71335616be646d8dd8e793732b508ea77ed197db /indra/llrender/llvertexbuffer.cpp | |
| parent | 7e7ff13b49f6f806a385bd92d675123ff7db7232 (diff) | |
| parent | 6a491424677086a84d180ace0b91f1eefaeb67ba (diff) | |
merge
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 0d3f5b81bc..73efbfc999 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -236,6 +236,22 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) } } +//static +void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm) +{ + U32 count = pos.size(); + llassert(norm.size() >= pos.size()); + + unbind(); + + setupClientArrays(MAP_VERTEX | MAP_NORMAL); + + glVertexPointer(3, GL_FLOAT, 0, pos[0].mV); + glNormalPointer(GL_FLOAT, 0, norm[0].mV); + + glDrawArrays(sGLMode[mode], 0, count); +} + void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_offset) const { if (start >= (U32) mRequestedNumVerts || |
