summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp114
1 files changed, 0 insertions, 114 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index b906563b08..a40a668a70 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1592,50 +1592,6 @@ void LLRender::end()
}
}
-LLVertexBuffer* LLRender::beginNoCache(const GLuint& mode, S32& count)
-{
- if (mode != mMode)
- {
- if (mode == LLRender::QUADS)
- {
- mQuadCycle = 1;
- }
-
- if (mMode == LLRender::QUADS ||
- mMode == LLRender::LINES ||
- mMode == LLRender::TRIANGLES ||
- mMode == LLRender::POINTS)
- {
- return getBuffer(count);
- }
- else if (mCount != 0)
- {
- LL_ERRS() << "gGL.begin() called redundantly." << LL_ENDL;
- }
- mMode = mode;
- }
- return nullptr;
-}
-
-LLVertexBuffer* LLRender::endNoCache(S32& count)
-{
- if (mCount == 0)
- {
- return nullptr;
- //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
- }
-
- if ((mMode != LLRender::QUADS &&
- mMode != LLRender::LINES &&
- mMode != LLRender::TRIANGLES &&
- mMode != LLRender::POINTS) ||
- mCount > 2048)
- {
- return getBuffer(count);
- }
- return nullptr;
-}
-
void LLRender::flush()
{
STOP_GLERROR;
@@ -1844,76 +1800,6 @@ void LLRender::resetStriders(S32 count)
mCount = 0;
}
-LLVertexBuffer* LLRender::getBuffer(S32 & count)
-{
- STOP_GLERROR;
- LLVertexBuffer *vb;
- if (mCount > 0)
- {
- LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
- llassert(LLGLSLShader::sCurBoundShaderPtr != nullptr);
- if (!mUIOffset.empty())
- {
- sUICalls++;
- sUIVerts += mCount;
- }
-
- //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
- count = mCount;
-
- if (mMode == LLRender::QUADS && !sGLCoreProfile)
- {
- if (mCount % 4 != 0)
- {
- count -= (mCount % 4);
- LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
- }
- }
-
- if (mMode == LLRender::TRIANGLES)
- {
- if (mCount % 3 != 0)
- {
- count -= (mCount % 3);
- LL_WARNS() << "Incomplete triangle requested." << LL_ENDL;
- }
- }
-
- if (mMode == LLRender::LINES)
- {
- if (mCount % 2 != 0)
- {
- count -= (mCount % 2);
- LL_WARNS() << "Incomplete line requested." << LL_ENDL;
- }
- }
-
- mCount = 0;
-
- if (mBuffer)
- {
- LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
-
- U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
- vb = genBuffer(attribute_mask, count);
- drawBuffer(vb, mMode, count);
- }
- else
- {
- // mBuffer is present in main thread and not present in an image thread
- LL_ERRS() << "A flush call from outside main rendering thread" << LL_ENDL;
- }
-
- resetStriders(count);
- }
- else
- {
- count = 0;
- }
-
- return vb;
-}
-
void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
{
//the range of mVerticesp, mColorsp and mTexcoordsp is [0, 4095]