aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/pipeline.cpp')
-rw-r--r--linden/indra/newview/pipeline.cpp69
1 files changed, 61 insertions, 8 deletions
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index e2d9f85..a13a605 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -232,6 +232,7 @@ BOOL LLPipeline::sPickAvatar = TRUE;
232BOOL LLPipeline::sDynamicLOD = TRUE; 232BOOL LLPipeline::sDynamicLOD = TRUE;
233BOOL LLPipeline::sShowHUDAttachments = TRUE; 233BOOL LLPipeline::sShowHUDAttachments = TRUE;
234BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; 234BOOL LLPipeline::sRenderPhysicalBeacons = TRUE;
235BOOL LLPipeline::sRenderMOAPBeacons = FALSE;
235BOOL LLPipeline::sRenderScriptedBeacons = FALSE; 236BOOL LLPipeline::sRenderScriptedBeacons = FALSE;
236BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; 237BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE;
237BOOL LLPipeline::sRenderParticleBeacons = FALSE; 238BOOL LLPipeline::sRenderParticleBeacons = FALSE;
@@ -2167,6 +2168,43 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
2167 } 2168 }
2168} 2169}
2169 2170
2171void renderMOAPBeacons(LLDrawable* drawablep)
2172{
2173 LLViewerObject *vobj = drawablep->getVObj();
2174
2175 if(!vobj || vobj->isAvatar())
2176 return;
2177
2178 BOOL beacon=FALSE;
2179 U8 tecount=vobj->getNumTEs();
2180 for(int x=0;x<tecount;x++)
2181 {
2182 if(vobj->getTE(x)->hasMedia())
2183 {
2184 beacon=TRUE;
2185 break;
2186 }
2187 }
2188 if(beacon==TRUE)
2189 {
2190 if (gPipeline.sRenderBeacons)
2191 {
2192 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"));
2193 }
2194
2195 if (gPipeline.sRenderHighlight)
2196 {
2197 S32 face_id;
2198 S32 count = drawablep->getNumFaces();
2199 for (face_id = 0; face_id < count; face_id++)
2200 {
2201 gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) );
2202 }
2203 }
2204 }
2205}
2206
2207
2170void renderParticleBeacons(LLDrawable* drawablep) 2208void renderParticleBeacons(LLDrawable* drawablep)
2171{ 2209{
2172 // Look for attachments, objects, etc. 2210 // Look for attachments, objects, etc.
@@ -2249,18 +2287,12 @@ void LLPipeline::postSort(LLCamera& camera)
2249 const S32 bin_count = 1024*8; 2287 const S32 bin_count = 1024*8;
2250 2288
2251 static LLCullResult::drawinfo_list_t alpha_bins[bin_count]; 2289 static LLCullResult::drawinfo_list_t alpha_bins[bin_count];
2252 static U32 bin_size[bin_count];
2253 2290
2254 //clear one bin per frame to avoid memory bloat 2291 //clear one bin per frame to avoid memory bloat
2255 static S32 clear_idx = 0; 2292 static S32 clear_idx = 0;
2256 clear_idx = (1+clear_idx)%bin_count; 2293 clear_idx = (1+clear_idx)%bin_count;
2257 alpha_bins[clear_idx].clear(); 2294 alpha_bins[clear_idx].clear();
2258 2295
2259 for (U32 j = 0; j < bin_count; j++)
2260 {
2261 bin_size[j] = 0;
2262 }
2263
2264 //build render map 2296 //build render map
2265 for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) 2297 for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
2266 { 2298 {
@@ -2347,6 +2379,11 @@ void LLPipeline::postSort(LLCamera& camera)
2347 forAllVisibleDrawables(renderPhysicalBeacons); 2379 forAllVisibleDrawables(renderPhysicalBeacons);
2348 } 2380 }
2349 2381
2382 if(sRenderMOAPBeacons)
2383 {
2384 forAllVisibleDrawables(renderMOAPBeacons);
2385 }
2386
2350 if (sRenderParticleBeacons) 2387 if (sRenderParticleBeacons)
2351 { 2388 {
2352 forAllVisibleDrawables(renderParticleBeacons); 2389 forAllVisibleDrawables(renderParticleBeacons);
@@ -4581,6 +4618,24 @@ BOOL LLPipeline::getRenderScriptedTouchBeacons(void*)
4581} 4618}
4582 4619
4583// static 4620// static
4621void LLPipeline::setRenderMOAPBeacons(BOOL val)
4622{
4623 sRenderMOAPBeacons = val;
4624}
4625
4626// static
4627void LLPipeline::toggleRenderMOAPBeacons(void*)
4628{
4629 sRenderMOAPBeacons = !sRenderMOAPBeacons;
4630}
4631
4632// static
4633BOOL LLPipeline::getRenderMOAPBeacons(void*)
4634{
4635 return sRenderMOAPBeacons;
4636}
4637
4638// static
4584void LLPipeline::setRenderPhysicalBeacons(BOOL val) 4639void LLPipeline::setRenderPhysicalBeacons(BOOL val)
4585{ 4640{
4586 sRenderPhysicalBeacons = val; 4641 sRenderPhysicalBeacons = val;
@@ -5913,8 +5968,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
5913 5968
5914 stop_glerror(); 5969 stop_glerror();
5915 5970
5916 LLVector3 origin = camera.getOrigin();
5917
5918 glPushMatrix(); 5971 glPushMatrix();
5919 5972
5920 mat.set_scale(glh::vec3f(1,1,-1)); 5973 mat.set_scale(glh::vec3f(1,1,-1));