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 cd9b3be..ae7461c 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;
@@ -2149,6 +2150,43 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
2149 } 2150 }
2150} 2151}
2151 2152
2153void renderMOAPBeacons(LLDrawable* drawablep)
2154{
2155 LLViewerObject *vobj = drawablep->getVObj();
2156
2157 if(!vobj || vobj->isAvatar())
2158 return;
2159
2160 BOOL beacon=FALSE;
2161 U8 tecount=vobj->getNumTEs();
2162 for(int x=0;x<tecount;x++)
2163 {
2164 if(vobj->getTE(x)->hasMedia())
2165 {
2166 beacon=TRUE;
2167 break;
2168 }
2169 }
2170 if(beacon==TRUE)
2171 {
2172 if (gPipeline.sRenderBeacons)
2173 {
2174 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"));
2175 }
2176
2177 if (gPipeline.sRenderHighlight)
2178 {
2179 S32 face_id;
2180 S32 count = drawablep->getNumFaces();
2181 for (face_id = 0; face_id < count; face_id++)
2182 {
2183 gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) );
2184 }
2185 }
2186 }
2187}
2188
2189
2152void renderParticleBeacons(LLDrawable* drawablep) 2190void renderParticleBeacons(LLDrawable* drawablep)
2153{ 2191{
2154 // Look for attachments, objects, etc. 2192 // Look for attachments, objects, etc.
@@ -2231,18 +2269,12 @@ void LLPipeline::postSort(LLCamera& camera)
2231 const S32 bin_count = 1024*8; 2269 const S32 bin_count = 1024*8;
2232 2270
2233 static LLCullResult::drawinfo_list_t alpha_bins[bin_count]; 2271 static LLCullResult::drawinfo_list_t alpha_bins[bin_count];
2234 static U32 bin_size[bin_count];
2235 2272
2236 //clear one bin per frame to avoid memory bloat 2273 //clear one bin per frame to avoid memory bloat
2237 static S32 clear_idx = 0; 2274 static S32 clear_idx = 0;
2238 clear_idx = (1+clear_idx)%bin_count; 2275 clear_idx = (1+clear_idx)%bin_count;
2239 alpha_bins[clear_idx].clear(); 2276 alpha_bins[clear_idx].clear();
2240 2277
2241 for (U32 j = 0; j < bin_count; j++)
2242 {
2243 bin_size[j] = 0;
2244 }
2245
2246 //build render map 2278 //build render map
2247 for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) 2279 for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
2248 { 2280 {
@@ -2329,6 +2361,11 @@ void LLPipeline::postSort(LLCamera& camera)
2329 forAllVisibleDrawables(renderPhysicalBeacons); 2361 forAllVisibleDrawables(renderPhysicalBeacons);
2330 } 2362 }
2331 2363
2364 if(sRenderMOAPBeacons)
2365 {
2366 forAllVisibleDrawables(renderMOAPBeacons);
2367 }
2368
2332 if (sRenderParticleBeacons) 2369 if (sRenderParticleBeacons)
2333 { 2370 {
2334 forAllVisibleDrawables(renderParticleBeacons); 2371 forAllVisibleDrawables(renderParticleBeacons);
@@ -4563,6 +4600,24 @@ BOOL LLPipeline::getRenderScriptedTouchBeacons(void*)
4563} 4600}
4564 4601
4565// static 4602// static
4603void LLPipeline::setRenderMOAPBeacons(BOOL val)
4604{
4605 sRenderMOAPBeacons = val;
4606}
4607
4608// static
4609void LLPipeline::toggleRenderMOAPBeacons(void*)
4610{
4611 sRenderMOAPBeacons = !sRenderMOAPBeacons;
4612}
4613
4614// static
4615BOOL LLPipeline::getRenderMOAPBeacons(void*)
4616{
4617 return sRenderMOAPBeacons;
4618}
4619
4620// static
4566void LLPipeline::setRenderPhysicalBeacons(BOOL val) 4621void LLPipeline::setRenderPhysicalBeacons(BOOL val)
4567{ 4622{
4568 sRenderPhysicalBeacons = val; 4623 sRenderPhysicalBeacons = val;
@@ -5895,8 +5950,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
5895 5950
5896 stop_glerror(); 5951 stop_glerror();
5897 5952
5898 LLVector3 origin = camera.getOrigin();
5899
5900 glPushMatrix(); 5953 glPushMatrix();
5901 5954
5902 mat.set_scale(glh::vec3f(1,1,-1)); 5955 mat.set_scale(glh::vec3f(1,1,-1));