summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp51
1 files changed, 36 insertions, 15 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 59b526059b..670414f780 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1227,10 +1227,6 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
U32 LLPipeline::addObject(LLViewerObject *vobj)
{
LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
- if (gNoRender)
- {
- return 0;
- }
if (gSavedSettings.getBOOL("RenderDelayCreation"))
{
@@ -5313,7 +5309,25 @@ void LLPipeline::setUseVBO(BOOL use_vbo)
}
resetVertexBuffers();
- LLVertexBuffer::initClass(use_vbo);
+ LLVertexBuffer::initClass(use_vbo, gSavedSettings.getBOOL("RenderVBOMappingDisable"));
+ }
+}
+
+void LLPipeline::setDisableVBOMapping(BOOL no_vbo_mapping)
+{
+ if (LLVertexBuffer::sEnableVBOs && no_vbo_mapping != LLVertexBuffer::sDisableVBOMapping)
+ {
+ if (no_vbo_mapping)
+ {
+ llinfos << "Disabling VBO glMapBufferARB." << llendl;
+ }
+ else
+ {
+ llinfos << "Enabling VBO glMapBufferARB." << llendl;
+ }
+
+ resetVertexBuffers();
+ LLVertexBuffer::initClass(true, no_vbo_mapping);
}
}
@@ -5432,7 +5446,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
- if (for_snapshot)
+ /*if (for_snapshot)
{
gGL.getTexUnit(0)->bind(&mGlow[1]);
{
@@ -5443,14 +5457,21 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
// If the snapshot is constructed from tiles, calculate which
// tile we're in.
- const S32 num_horizontal_tiles = llceil(zoom_factor);
- const LLVector2 tile(subfield % num_horizontal_tiles,
- (S32)(subfield / num_horizontal_tiles));
- llassert(zoom_factor > 0.0); // Non-zero, non-negative.
- const F32 tile_size = 1.0/zoom_factor;
-
- tc1 = tile*tile_size; // Top left texture coordinates
- tc2 = (tile+LLVector2(1,1))*tile_size; // Bottom right texture coordinates
+
+ //from LLViewerCamera::setPerpsective
+ if (zoom_factor > 1.f)
+ {
+ int pos_y = subfield / llceil(zoom_factor);
+ int pos_x = subfield - (pos_y*llceil(zoom_factor));
+ F32 size = 1.f/zoom_factor;
+
+ tc1.set(pos_x*size, pos_y*size);
+ tc2 = tc1 + LLVector2(size,size);
+ }
+ else
+ {
+ tc2.set(1,1);
+ }
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ADD);
@@ -5483,7 +5504,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glPopMatrix();
return;
- }
+ }*/
{
{