summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-04-11 17:54:18 +0000
committerJosh Bell <josh@lindenlab.com>2007-04-11 17:54:18 +0000
commit0277259455c4354f81ea8a24c8ab93f27567bc6f (patch)
treef1411dab563dcf697f794e9e8a592a6d3e5c4d2d /indra/newview/pipeline.cpp
parent568397bbcc4fca307ebc010ec7f815422b9ba80a (diff)
svn merge -r 59968:60342 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 44ebb2503b..43c587ed92 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -181,6 +181,8 @@ LLPipeline::LLPipeline() :
void LLPipeline::init()
{
LLMemType mt(LLMemType::MTYPE_PIPELINE);
+
+ mInitialized = TRUE;
stop_glerror();
@@ -1466,7 +1468,7 @@ void renderScriptedBeacons(LLDrawable* drawablep)
&& !vobj->getParent()
&& vobj->flagScripted())
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
}
}
@@ -1478,7 +1480,7 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
&& !vobj->getParent()
&& vobj->usePhysics())
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
}
}
@@ -1490,7 +1492,7 @@ void renderParticleBeacons(LLDrawable* drawablep)
&& vobj->isParticleSource())
{
LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
}
}
@@ -1711,7 +1713,7 @@ void LLPipeline::postSort(LLCamera& camera)
LLVector3d pos_global = sourcep->getPositionGlobal();
LLVector3 pos = gAgent.getPosAgentFromGlobal(pos_global);
//pos += LLVector3(0.f, 0.f, 0.2f);
- gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f));
+ gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
}
}
@@ -1976,6 +1978,7 @@ void LLPipeline::renderGeom(LLCamera& camera)
}
poolp->endRenderPass(i);
#ifndef LL_RELEASE_FOR_DOWNLOAD
+#if LL_DEBUG_GL
GLint depth;
glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &depth);
if (depth > 3)
@@ -1986,6 +1989,7 @@ void LLPipeline::renderGeom(LLCamera& camera)
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
#endif
+#endif
}
}
else
@@ -3874,14 +3878,14 @@ void LLPipeline::bindScreenToTexture()
{
LLGLEnable gl_texture_2d(GL_TEXTURE_2D);
+ GLint* viewport = (GLint*) gGLViewport;
+ GLuint resX = nhpo2(viewport[2]);
+ GLuint resY = nhpo2(viewport[3]);
+
if (mScreenTex == 0)
{
glGenTextures(1, &mScreenTex);
glBindTexture(GL_TEXTURE_2D, mScreenTex);
- GLint viewport[4];
- glGetIntegerv(GL_VIEWPORT, viewport);
- GLuint resX = nhpo2(viewport[2]);
- GLuint resY = nhpo2(viewport[3]);
gImageList.updateMaxResidentTexMem(-1, resX*resY*3);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, resX, resY, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
@@ -3892,11 +3896,6 @@ void LLPipeline::bindScreenToTexture()
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
- GLint viewport[4];
- glGetIntegerv(GL_VIEWPORT, viewport);
- GLuint resX = nhpo2(viewport[2]);
- GLuint resY = nhpo2(viewport[3]);
-
glBindTexture(GL_TEXTURE_2D, mScreenTex);
GLint cResX;
GLint cResY;
@@ -4026,5 +4025,4 @@ void LLPipeline::renderBloom(GLuint source, GLuint dest, GLuint buffer, U32 res,
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
-}
-
+} \ No newline at end of file