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.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index b92c9363fc..1301d325a0 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -990,6 +990,9 @@ void LLRender::syncLightState()
void LLRender::syncMatrices()
{
+ STOP_GLERROR;
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
+
static const U32 name[] =
{
LLShaderMgr::MODELVIEW_MATRIX,
@@ -1012,8 +1015,6 @@ void LLRender::syncMatrices()
if (shader)
{
- //llassert(shader);
-
bool mvp_done = false;
U32 i = MM_MODELVIEW;
@@ -1087,7 +1088,7 @@ void LLRender::syncMatrices()
if (shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX))
{
glh::matrix4f inv_proj = mat.inverse();
- shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
+ shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, false, inv_proj.m);
}
// Used by some full screen effects - such as full screen lights, glow, etc.
@@ -1134,6 +1135,7 @@ void LLRender::syncMatrices()
syncLightState();
}
}
+ STOP_GLERROR;
}
void LLRender::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z)
@@ -1512,7 +1514,7 @@ LLLightState* LLRender::getLight(U32 index)
void LLRender::setAmbientLightColor(const LLColor4& color)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (color != mAmbientLightColor)
{
++mLightHash;
@@ -1585,6 +1587,7 @@ void LLRender::end()
}
void LLRender::flush()
{
+ STOP_GLERROR;
if (mCount > 0)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
@@ -1685,7 +1688,7 @@ void LLRender::flush()
if (attribute_mask & LLVertexBuffer::MAP_TEXCOORD0)
{
- vb->setTexCoordData(mTexcoordsp.get());
+ vb->setTexCoord0Data(mTexcoordsp.get());
}
if (attribute_mask & LLVertexBuffer::MAP_COLOR)
@@ -1693,6 +1696,9 @@ void LLRender::flush()
vb->setColorData(mColorsp.get());
}
+#if LL_DARWIN
+ vb->unmapBuffer();
+#endif
vb->unbind();
sVBCache[vhash] = { vb , std::chrono::steady_clock::now() };