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.cpp32
1 files changed, 6 insertions, 26 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 7ad03a32a8..51028e5667 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -990,6 +990,7 @@ void LLRender::syncLightState()
void LLRender::syncMatrices()
{
+ STOP_GLERROR;
static const U32 name[] =
{
LLShaderMgr::MODELVIEW_MATRIX,
@@ -1012,8 +1013,6 @@ void LLRender::syncMatrices()
if (shader)
{
- //llassert(shader);
-
bool mvp_done = false;
U32 i = MM_MODELVIEW;
@@ -1134,6 +1133,7 @@ void LLRender::syncMatrices()
syncLightState();
}
}
+ STOP_GLERROR;
}
void LLRender::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z)
@@ -1585,6 +1585,7 @@ void LLRender::end()
}
void LLRender::flush()
{
+ STOP_GLERROR;
if (mCount > 0)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
@@ -1693,6 +1694,9 @@ void LLRender::flush()
vb->setColorData(mColorsp.get());
}
+#if LL_DARWIN
+ vb->unmapBuffer();
+#endif
vb->unbind();
sVBCache[vhash] = { vb , std::chrono::steady_clock::now() };
@@ -2068,10 +2072,6 @@ void LLRender::diffuseColor3f(F32 r, F32 g, F32 b)
{
shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, r,g,b,1.f);
}
- else
- {
- glColor3f(r,g,b);
- }
}
void LLRender::diffuseColor3fv(const F32* c)
@@ -2083,10 +2083,6 @@ void LLRender::diffuseColor3fv(const F32* c)
{
shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, c[0], c[1], c[2], 1.f);
}
- else
- {
- glColor3fv(c);
- }
}
void LLRender::diffuseColor4f(F32 r, F32 g, F32 b, F32 a)
@@ -2098,10 +2094,6 @@ void LLRender::diffuseColor4f(F32 r, F32 g, F32 b, F32 a)
{
shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, r,g,b,a);
}
- else
- {
- glColor4f(r,g,b,a);
- }
}
void LLRender::diffuseColor4fv(const F32* c)
@@ -2113,10 +2105,6 @@ void LLRender::diffuseColor4fv(const F32* c)
{
shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, c);
}
- else
- {
- glColor4fv(c);
- }
}
void LLRender::diffuseColor4ubv(const U8* c)
@@ -2128,10 +2116,6 @@ void LLRender::diffuseColor4ubv(const U8* c)
{
shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, c[0]/255.f, c[1]/255.f, c[2]/255.f, c[3]/255.f);
}
- else
- {
- glColor4ubv(c);
- }
}
void LLRender::diffuseColor4ub(U8 r, U8 g, U8 b, U8 a)
@@ -2143,10 +2127,6 @@ void LLRender::diffuseColor4ub(U8 r, U8 g, U8 b, U8 a)
{
shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, r/255.f, g/255.f, b/255.f, a/255.f);
}
- else
- {
- glColor4ub(r,g,b,a);
- }
}