Merge remote branch 'shyotlsv/master'
This commit is contained in:
@@ -450,8 +450,6 @@ static void settings_to_globals()
|
||||
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
|
||||
LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale");
|
||||
LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips");
|
||||
|
||||
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
|
||||
}
|
||||
|
||||
static void settings_modify()
|
||||
@@ -738,6 +736,9 @@ bool LLAppViewer::init()
|
||||
gGLActive = TRUE;
|
||||
initWindow();
|
||||
|
||||
// initWindow also initializes the Feature List, so now we can initialize this global.
|
||||
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
|
||||
|
||||
// call all self-registered classes
|
||||
LLInitClassList::instance().fireCallbacks();
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "llgl.h"
|
||||
#include "llagent.h"
|
||||
#include "llrendersphere.h"
|
||||
#include "llimagegl.h"
|
||||
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "lldrawable.h"
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
|
||||
#include "lluuid.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llinterp.h"
|
||||
#include "llframetimer.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
const F32 LL_HUD_DUR_SHORT = 1.f;
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "llgl.h"
|
||||
#include "llglheaders.h"
|
||||
#include "llhudrender.h"
|
||||
#include "llimagegl.h"
|
||||
#include "llrendersphere.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "llhudeffecttrail.h"
|
||||
|
||||
#include "llviewercontrol.h"
|
||||
#include "llimagegl.h"
|
||||
#include "message.h"
|
||||
|
||||
#include "llagent.h"
|
||||
|
||||
@@ -2957,6 +2957,16 @@ public:
|
||||
renderBoundingBox(drawable);
|
||||
}
|
||||
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BUILD_QUEUE))
|
||||
{
|
||||
if (drawable->isState(LLDrawable::IN_REBUILD_Q2))
|
||||
{
|
||||
gGL.color4f(0.6f, 0.6f, 0.1f, 1.f);
|
||||
const LLVector3* ext = drawable->getSpatialExtents();
|
||||
drawBoxOutline((ext[0]+ext[1])*0.5f, (ext[1]-ext[0])*0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
if (drawable->getVOVolume() && gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
|
||||
{
|
||||
renderTexturePriority(drawable);
|
||||
@@ -2976,6 +2986,10 @@ public:
|
||||
{
|
||||
renderRaycast(drawable);
|
||||
}
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_UPDATE_TYPE))
|
||||
{
|
||||
renderUpdateType(drawable);
|
||||
}
|
||||
|
||||
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(drawable->getVObj().get());
|
||||
|
||||
@@ -3061,13 +3075,15 @@ void LLSpatialPartition::renderDebug()
|
||||
LLPipeline::RENDER_DEBUG_OCCLUSION |
|
||||
LLPipeline::RENDER_DEBUG_LIGHTS |
|
||||
LLPipeline::RENDER_DEBUG_BATCH_SIZE |
|
||||
LLPipeline::RENDER_DEBUG_UPDATE_TYPE |
|
||||
LLPipeline::RENDER_DEBUG_BBOXES |
|
||||
LLPipeline::RENDER_DEBUG_POINTS |
|
||||
LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY |
|
||||
LLPipeline::RENDER_DEBUG_TEXTURE_ANIM |
|
||||
LLPipeline::RENDER_DEBUG_RAYCAST |
|
||||
LLPipeline::RENDER_DEBUG_AVATAR_VOLUME |
|
||||
LLPipeline::RENDER_DEBUG_AGENT_TARGET))
|
||||
LLPipeline::RENDER_DEBUG_AGENT_TARGET |
|
||||
LLPipeline::RENDER_DEBUG_BUILD_QUEUE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
|
||||
BOOL mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane
|
||||
U32 mBufferUsage;
|
||||
BOOL mRenderByGroup;
|
||||
const BOOL mRenderByGroup;
|
||||
U32 mLODSeed;
|
||||
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
|
||||
U32 mVertexDataMask;
|
||||
|
||||
@@ -119,7 +119,6 @@ void render_hud_attachments();
|
||||
void render_ui_3d();
|
||||
void render_ui_2d();
|
||||
void render_disconnected_background();
|
||||
void render_hud_elements();
|
||||
|
||||
void display_startup()
|
||||
{
|
||||
@@ -681,9 +680,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
||||
LLGLState::checkTextureChannels();
|
||||
LLGLState::checkClientArrays();
|
||||
|
||||
BOOL to_texture = !for_snapshot &&
|
||||
gPipeline.canUseVertexShaders() &&
|
||||
LLPipeline::sRenderGlow;
|
||||
BOOL to_texture = gPipeline.canUseVertexShaders() && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderGlow && !gSnapshot));
|
||||
|
||||
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
|
||||
|
||||
|
||||
@@ -1478,7 +1478,13 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
||||
sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_SCULPTED));
|
||||
|
||||
sub_menu->append(new LLMenuItemCheckGL("Build Queue", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_BUILD_QUEUE));
|
||||
sub_menu->append(new LLMenuItemCheckGL("Update Types", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_UPDATE_TYPE));
|
||||
|
||||
sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test));
|
||||
|
||||
sub_menu = new LLMenuGL("Render Tests");
|
||||
|
||||
@@ -337,11 +337,6 @@ void LLVOVolume::animateTextures()
|
||||
te->getScale(&scale_s, &scale_t);
|
||||
}
|
||||
|
||||
LLVector3 scale(scale_s, scale_t, 1.f);
|
||||
LLVector3 trans(off_s+0.5f, off_t+0.5f, 0.f);
|
||||
LLQuaternion quat;
|
||||
quat.setQuat(rot, 0, 0, -1.f);
|
||||
|
||||
if (!facep->mTextureMatrix)
|
||||
{
|
||||
facep->mTextureMatrix = new LLMatrix4();
|
||||
@@ -349,7 +344,16 @@ void LLVOVolume::animateTextures()
|
||||
|
||||
LLMatrix4& tex_mat = *facep->mTextureMatrix;
|
||||
tex_mat.setIdentity();
|
||||
tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
|
||||
LLVector3 trans ;
|
||||
{
|
||||
trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));
|
||||
tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
|
||||
}
|
||||
|
||||
LLVector3 scale(scale_s, scale_t, 1.f);
|
||||
LLQuaternion quat;
|
||||
quat.setQuat(rot, 0, 0, -1.f);
|
||||
|
||||
tex_mat.rotate(quat);
|
||||
|
||||
LLMatrix4 mat;
|
||||
@@ -892,9 +896,7 @@ BOOL LLVOVolume::calcLOD()
|
||||
if (distance < rampDist)
|
||||
{
|
||||
// Boost LOD when you're REALLY close
|
||||
distance *= 1.0f/rampDist;
|
||||
distance *= distance;
|
||||
distance *= rampDist;
|
||||
distance *= distance/rampDist;
|
||||
}
|
||||
|
||||
// DON'T Compensate for field of view changing on FOV zoom.
|
||||
@@ -2228,7 +2230,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||
|
||||
U8 glow = 0;
|
||||
|
||||
if (type == LLRenderPass::PASS_GLOW)
|
||||
if (type == LLRenderPass::PASS_GLOW || type==LLRenderPass::PASS_ALPHA) //Alpha pass now handles glow internally
|
||||
{
|
||||
glow = (U8) (facep->getTextureEntry()->getGlow() * 255);
|
||||
}
|
||||
@@ -2766,7 +2768,9 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
||||
// can we safely treat this as an alpha mask?
|
||||
if (facep->canRenderAsMask())
|
||||
{
|
||||
if (te->getFullbright())
|
||||
const LLDrawable* drawablep = facep->getDrawable();
|
||||
const LLVOVolume* vobj = drawablep ? drawablep->getVOVolume() : NULL;
|
||||
if (te->getFullbright() || (vobj && vobj->isHUDAttachment()))
|
||||
{
|
||||
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
|
||||
}
|
||||
@@ -2862,7 +2866,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
||||
}
|
||||
}
|
||||
|
||||
if (LLPipeline::sRenderGlow && te->getGlow() > 0.f)
|
||||
if (!is_alpha && LLPipeline::sRenderGlow && te->getGlow() > 0.f)
|
||||
{
|
||||
registerFace(group, facep, LLRenderPass::PASS_GLOW);
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ const LLMatrix4* gGLLastMatrix = NULL;
|
||||
std::string gPoolNames[] =
|
||||
{
|
||||
// Correspond to LLDrawpool enum render type
|
||||
"NONE",
|
||||
"POOL_SIMPLE",
|
||||
"POOL_TERRAIN",
|
||||
"POOL_BUMP",
|
||||
@@ -380,6 +381,7 @@ void LLPipeline::init()
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
|
||||
stop_glerror();
|
||||
setLightingDetail(-1);
|
||||
}
|
||||
|
||||
LLPipeline::~LLPipeline()
|
||||
@@ -452,8 +454,6 @@ void LLPipeline::cleanup()
|
||||
|
||||
releaseGLBuffers();
|
||||
|
||||
mBloomImagep = NULL;
|
||||
mBloomImage2p = NULL;
|
||||
mFaceSelectImagep = NULL;
|
||||
|
||||
mMovedBridge.clear();
|
||||
@@ -558,13 +558,12 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
|
||||
//static
|
||||
void LLPipeline::updateRenderDeferred()
|
||||
{
|
||||
BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") &&
|
||||
sRenderDeferred = (gSavedSettings.getBOOL("RenderDeferred") &&
|
||||
LLRenderTarget::sUseFBO &&
|
||||
gSavedSettings.getBOOL("VertexShaderEnable") &&
|
||||
gSavedSettings.getBOOL("RenderAvatarVP") &&
|
||||
gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE;
|
||||
|
||||
sRenderDeferred = deferred;
|
||||
gSavedSettings.getBOOL("WindLightUseAtmosShaders") &&
|
||||
!gUseWireframe);
|
||||
}
|
||||
|
||||
void LLPipeline::releaseGLBuffers()
|
||||
@@ -1398,6 +1397,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
|
||||
gGLLastMatrix = NULL;
|
||||
glLoadMatrixd(gGLLastModelView);
|
||||
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
LLGLDisable test(GL_ALPHA_TEST);
|
||||
@@ -1475,10 +1475,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
|
||||
{
|
||||
mScreen.flush();
|
||||
}
|
||||
/*else if (LLPipeline::sUseOcclusion > 1)
|
||||
else if (LLPipeline::sUseOcclusion > 1)
|
||||
{
|
||||
glFlush();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera)
|
||||
@@ -2372,6 +2372,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
|
||||
assertInitialized();
|
||||
|
||||
llpushcallstacks ;
|
||||
//rebuild drawable geometry
|
||||
for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
|
||||
{
|
||||
@@ -2382,7 +2383,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
group->rebuildGeom();
|
||||
}
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
//rebuild groups
|
||||
sCull->assertDrawMapsEmpty();
|
||||
|
||||
@@ -2400,10 +2401,10 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
}
|
||||
LLSpatialGroup::sNoDelete = TRUE;*/
|
||||
|
||||
|
||||
rebuildPriorityGroups();
|
||||
|
||||
|
||||
|
||||
llpushcallstacks ;
|
||||
|
||||
const S32 bin_count = 1024*8;
|
||||
|
||||
static LLCullResult::drawinfo_list_t alpha_bins[bin_count];
|
||||
@@ -2504,7 +2505,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
|
||||
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
|
||||
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
if (beacon_always_on && !sShadowRender)
|
||||
@@ -2553,7 +2554,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
forAllVisibleDrawables(renderSoundHighlights);
|
||||
}
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
// If managing your telehub, draw beacons at telehub and currently selected spawnpoint.
|
||||
if (LLFloaterTelehub::renderBeacons())
|
||||
{
|
||||
@@ -2583,6 +2584,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
||||
}
|
||||
|
||||
//LLSpatialGroup::sNoDelete = FALSE;
|
||||
llpushcallstacks ;
|
||||
}
|
||||
|
||||
|
||||
@@ -2615,7 +2617,12 @@ void render_hud_elements()
|
||||
|
||||
// Render debugging beacons.
|
||||
//gObjectList.renderObjectBeacons();
|
||||
//LLHUDObject::renderAll();
|
||||
|
||||
//TO-DO:
|
||||
//V2 moved this line from LLPipeline::renderGeom
|
||||
//Uncomment once multisample z-buffer issues are figured out on ati cards.
|
||||
// LLHUDObject::renderAll();
|
||||
|
||||
//gObjectList.resetObjectBeacons();
|
||||
}
|
||||
else if (gForceRenderLandFence)
|
||||
@@ -2938,6 +2945,9 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
//TO-DO:
|
||||
//V2 moved this line to LLPipeline::render_hud_elements
|
||||
//Migrate once multisample z-buffer issues are figured out on ati cards.
|
||||
LLHUDObject::renderAll();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
@@ -3167,26 +3177,32 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
||||
gGLLastMatrix = NULL;
|
||||
glLoadMatrixd(gGLModelView);
|
||||
|
||||
renderHighlights();
|
||||
mHighlightFaces.clear();
|
||||
|
||||
renderDebug();
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
//TO-DO:
|
||||
//V2 moved block to LLPipeline::renderDeferredLighting
|
||||
//Migrate once multisample z-buffer issues are figured out on ati cards.
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
LLHUDObject::renderAll();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure particle effects disappear
|
||||
LLHUDObject::renderAllForTimer();
|
||||
}
|
||||
renderHighlights();
|
||||
mHighlightFaces.clear();
|
||||
|
||||
renderDebug();
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
LLHUDObject::renderAll();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure particle effects disappear
|
||||
LLHUDObject::renderAllForTimer();
|
||||
}
|
||||
}
|
||||
//END
|
||||
|
||||
if (occlude)
|
||||
{
|
||||
occlude = FALSE;
|
||||
@@ -3282,6 +3298,9 @@ void LLPipeline::renderDebug()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
|
||||
if(!mRenderDebugMask)
|
||||
return;
|
||||
|
||||
assertInitialized();
|
||||
|
||||
gGL.color4f(1,1,1,1);
|
||||
@@ -3446,6 +3465,55 @@ void LLPipeline::renderDebug()
|
||||
}
|
||||
}
|
||||
|
||||
if (mRenderDebugMask & LLPipeline::RENDER_DEBUG_BUILD_QUEUE)
|
||||
{
|
||||
U32 count = 0;
|
||||
U32 size = mBuildQ2.size();
|
||||
LLColor4 col;
|
||||
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.getTexUnit(0)->bind(LLViewerImage::sWhiteImagep.get());
|
||||
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); iter != mGroupQ2.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
if (group->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
LLSpatialBridge* bridge = group->mSpatialPartition->asBridge();
|
||||
|
||||
if (bridge && (!bridge->mDrawable || bridge->mDrawable->isDead()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bridge)
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
|
||||
}
|
||||
|
||||
F32 alpha = (F32) (size-count)/size;
|
||||
|
||||
|
||||
LLVector2 c(1.f-alpha, alpha);
|
||||
c.normVec();
|
||||
|
||||
|
||||
++count;
|
||||
col.set(c.mV[0], c.mV[1], 0, alpha*0.5f+0.1f);
|
||||
group->drawObjectBox(col);
|
||||
|
||||
if (bridge)
|
||||
{
|
||||
gGL.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gGL.flush();
|
||||
}
|
||||
|
||||
@@ -4257,32 +4325,28 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
LLVector4 light_pos_gl(light_pos, 1.0f);
|
||||
|
||||
F32 light_radius = llmax(light->getLightRadius(), 0.001f);
|
||||
F32 atten, quad;
|
||||
|
||||
#if 0 //1.9.1
|
||||
if (pool->getVertexShaderLevel() > 0)
|
||||
{
|
||||
atten = light_radius;
|
||||
quad = llmax(light->getLightFalloff(), 0.0001f);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
F32 x = (3.f * (1.f + light->getLightFalloff()));
|
||||
atten = x / (light_radius); // % of brightness at radius
|
||||
quad = 0.0f;
|
||||
}
|
||||
F32 x = (3.f * (1.f + light->getLightFalloff())); // why this magic? probably trying to match a historic behavior.
|
||||
float linatten = x / (light_radius); // % of brightness at radius
|
||||
|
||||
mHWLightColors[cur_light] = light_color;
|
||||
S32 gllight = GL_LIGHT0+cur_light;
|
||||
glLightfv(gllight, GL_POSITION, light_pos_gl.mV);
|
||||
glLightfv(gllight, GL_DIFFUSE, light_color.mV);
|
||||
glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV);
|
||||
glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
|
||||
glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, atten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad);
|
||||
glLightf (gllight, GL_SPOT_EXPONENT, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, linatten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f);
|
||||
//Point lights
|
||||
{
|
||||
glLightf (gllight, GL_SPOT_EXPONENT, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
|
||||
|
||||
// we use specular.w = 1.0 as a cheap hack for the shaders to know that this is omnidirectional rather than a spotlight
|
||||
const float specular[] = {0.f, 0.f, 0.f, 1.f};
|
||||
glLightfv(gllight, GL_SPECULAR, specular);
|
||||
//llinfos << "boring light" << llendl;
|
||||
}
|
||||
cur_light++;
|
||||
if (cur_light >= 8)
|
||||
{
|
||||
@@ -4299,7 +4363,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
|
||||
}
|
||||
|
||||
if (gAgent.getAvatarObject() &&
|
||||
if (isAgentAvatarValid() &&
|
||||
gAgent.getAvatarObject()->mSpecialRenderMode == 3)
|
||||
{
|
||||
LLColor4 light_color = LLColor4::white;
|
||||
@@ -4309,13 +4373,10 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
LLVector4 light_pos_gl(light_pos, 1.0f);
|
||||
|
||||
F32 light_radius = 16.f;
|
||||
F32 atten, quad;
|
||||
|
||||
{
|
||||
F32 x = 3.f;
|
||||
atten = x / (light_radius); // % of brightness at radius
|
||||
quad = 0.0f;
|
||||
}
|
||||
float linatten = x / (light_radius); // % of brightness at radius
|
||||
|
||||
mHWLightColors[2] = light_color;
|
||||
S32 gllight = GL_LIGHT2;
|
||||
glLightfv(gllight, GL_POSITION, light_pos_gl.mV);
|
||||
@@ -4323,8 +4384,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV);
|
||||
glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
|
||||
glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, atten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad);
|
||||
glLightf (gllight, GL_LINEAR_ATTENUATION, linatten);
|
||||
glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_EXPONENT, 0.0f);
|
||||
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
|
||||
}
|
||||
@@ -4341,6 +4402,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
void LLPipeline::enableLights(U32 mask)
|
||||
{
|
||||
assertInitialized();
|
||||
|
||||
if (mLightingDetail == 0)
|
||||
{
|
||||
mask &= 0xf003; // sun and backlight only (and fullbright bit)
|
||||
@@ -5528,6 +5590,14 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
|
||||
gGL.getTexUnit(0)->activate();
|
||||
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
|
||||
|
||||
//TO-DO:
|
||||
//V2 requires this for hover text and such since they have been pulled out of geom render.
|
||||
//Do this when multisample z-buffer issues are figured out
|
||||
/*if (LLRenderTarget::sUseFBO)
|
||||
{ //copy depth buffer from mScreen to framebuffer
|
||||
LLRenderTarget::copyContentsToFramebuffer(mScreen, 0, 0, mScreen.getWidth(), mScreen.getHeight(),
|
||||
0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
@@ -5836,6 +5906,9 @@ void LLPipeline::renderDeferredLighting()
|
||||
|
||||
{
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
//TO-DO:
|
||||
//V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
|
||||
//Do this when multisample z-buffer issues are figured out
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
stop_glerror();
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
|
||||
@@ -5852,6 +5925,9 @@ void LLPipeline::renderDeferredLighting()
|
||||
|
||||
{
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
//TO-DO:
|
||||
//V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
|
||||
//Do this when multisample z-buffer issues are figured out
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
stop_glerror();
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
@@ -6088,6 +6164,26 @@ void LLPipeline::renderDeferredLighting()
|
||||
popRenderTypeMask();
|
||||
}
|
||||
|
||||
//TO-DO:
|
||||
//V2 moved block from LLPipeline::renderGeomPostDeferred
|
||||
//Migrate once multisample z-buffer issues are figured out on ati cards.
|
||||
/*{
|
||||
//render highlights, etc.
|
||||
renderHighlights();
|
||||
mHighlightFaces.clear();
|
||||
|
||||
renderDebug();
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
// Render debugging beacons.
|
||||
gObjectList.renderObjectBeacons();
|
||||
gObjectList.resetObjectBeacons();
|
||||
}
|
||||
}*/
|
||||
|
||||
mScreen.flush();
|
||||
|
||||
}
|
||||
@@ -6251,48 +6347,47 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
|
||||
gPipeline.pushRenderTypeMask();
|
||||
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
|
||||
LLPipeline::RENDER_TYPE_VOIDWATER,
|
||||
LLPipeline::RENDER_TYPE_GROUND,
|
||||
LLPipeline::RENDER_TYPE_SKY,
|
||||
LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS,
|
||||
LLPipeline::RENDER_TYPE_WL_CLOUDS,
|
||||
LLPipeline::END_RENDER_TYPES);
|
||||
|
||||
if (gSavedSettings.getBOOL("RenderWaterReflections"))
|
||||
{ //mask out selected geometry based on reflection detail
|
||||
S32 detail = gSavedSettings.getS32("RenderReflectionDetail");
|
||||
if (detail > 0)
|
||||
//if (detail > 0)
|
||||
{ //mask out selected geometry based on reflection detail
|
||||
{
|
||||
if (detail < 4)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
|
||||
gPipeline.pushRenderTypeMask();
|
||||
if (detail < 3)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
|
||||
if (detail < 2)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
|
||||
if (detail < 1)
|
||||
{
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
|
||||
LLPipeline::RENDER_TYPE_VOIDWATER,
|
||||
LLPipeline::RENDER_TYPE_GROUND,
|
||||
LLPipeline::RENDER_TYPE_SKY,
|
||||
LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS,
|
||||
LLPipeline::RENDER_TYPE_WL_CLOUDS,
|
||||
LLPipeline::END_RENDER_TYPES);
|
||||
static LLCachedControl<bool> skip_distortion_updates("SkipReflectOcclusionUpdates",false);
|
||||
LLPipeline::sSkipUpdate = skip_distortion_updates;
|
||||
LLGLUserClipPlane clip_plane(plane, mat, projection);
|
||||
LLGLDisable cull(GL_CULL_FACE);
|
||||
updateCull(camera, ref_result, 1);
|
||||
stateSort(camera, ref_result);
|
||||
gPipeline.grabReferences(ref_result);
|
||||
renderGeom(camera);
|
||||
LLPipeline::sSkipUpdate = FALSE;
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
gPipeline.grabReferences(ref_result);
|
||||
LLGLUserClipPlane clip_plane(plane, mat, projection);
|
||||
renderGeom(camera);
|
||||
LLPipeline::sSkipUpdate = FALSE;
|
||||
}
|
||||
}
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
glCullFace(GL_BACK);
|
||||
glPopMatrix();
|
||||
|
||||
@@ -397,7 +397,9 @@ public:
|
||||
RENDER_DEBUG_SHADOW_FRUSTA = 0x0040000,
|
||||
RENDER_DEBUG_SCULPTED = 0x0080000,
|
||||
RENDER_DEBUG_AVATAR_VOLUME = 0x0100000,
|
||||
RENDER_DEBUG_AGENT_TARGET = 0x0200000,
|
||||
RENDER_DEBUG_BUILD_QUEUE = 0x0200000,
|
||||
RENDER_DEBUG_AGENT_TARGET = 0x0400000,
|
||||
RENDER_DEBUG_UPDATE_TYPE = 0x0800000,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -602,8 +604,6 @@ protected:
|
||||
std::vector<LLFace*> mSelectedFaces;
|
||||
|
||||
LLPointer<LLViewerImage> mFaceSelectImagep;
|
||||
LLPointer<LLViewerImage> mBloomImagep;
|
||||
LLPointer<LLViewerImage> mBloomImage2p;
|
||||
|
||||
U32 mLightMask;
|
||||
U32 mLightMovingMask;
|
||||
@@ -620,6 +620,7 @@ public:
|
||||
};
|
||||
|
||||
void render_bbox(const LLVector3 &min, const LLVector3 &max);
|
||||
void render_hud_elements();
|
||||
|
||||
extern LLPipeline gPipeline;
|
||||
extern BOOL gRenderForSelect;
|
||||
|
||||
@@ -80,23 +80,23 @@ Hover your mouse over the options for more help.
|
||||
<column label="Title" name="title" relwidth="0.30" />
|
||||
<column label="Last Login" name="online" relwidth="0.25" />
|
||||
</name_list>
|
||||
<text bottom_delta="-18" font="SansSerif" name="text_group_preferences">
|
||||
<text bottom_delta="-10" font="SansSerif" name="text_group_preferences">
|
||||
Group Preferences
|
||||
</text>
|
||||
<panel background_opaque="true" background_visible="false" bevel_style="in"
|
||||
border="true"
|
||||
bottom_delta="-104" follows="left|top" height="96" left_delta="0"
|
||||
bottom_delta="-94" follows="left|top" height="86" left_delta="0"
|
||||
mouse_opaque="true" name="preferences_container" width="404">
|
||||
<check_box bottom="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom="-17" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="true" label="Show in search" left="4" mouse_opaque="true"
|
||||
name="show_in_group_list" radio_style="false"
|
||||
tool_tip="Let people see this group in search results." width="95" />
|
||||
<check_box bottom_delta="-18" follows="right|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="-16" follows="right|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Open enrollment" left="4" mouse_opaque="true"
|
||||
name="open_enrollement" radio_style="false"
|
||||
tool_tip="Sets whether this group allows new members to join without being invited."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Enrollment fee: [CURRENCY]" left_delta="16"
|
||||
max_length="5" mouse_opaque="true" name="check_enrollment_fee"
|
||||
radio_style="false"
|
||||
@@ -109,7 +109,10 @@ Hover your mouse over the options for more help.
|
||||
mouse_opaque="true" name="spin_enrollment_fee" right_delta="170"
|
||||
tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked."
|
||||
v_pad="0" width="65" />
|
||||
<combo_box allow_text_entry="false" bottom_delta="-30" follows="left|top" height="20" left="6"
|
||||
<text bottom_delta="-12" left="4" font="SansSerifSmall" name="content_rating">
|
||||
Content Rating
|
||||
</text>
|
||||
<combo_box allow_text_entry="false" bottom_delta="-25" follows="left|top" height="20" left="6"
|
||||
max_chars="20" mouse_opaque="true" name="group_mature_check"
|
||||
tool_tip="Sets whether your group information is considered mature."
|
||||
width="130">
|
||||
@@ -124,29 +127,27 @@ Hover your mouse over the options for more help.
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
|
||||
<panel background_opaque="false" border="false" bottom="-31" height="32" left="225"
|
||||
name="title_container" width="160">
|
||||
<text bottom="17" font="SansSerifSmall" left="0" name="active_title_label">
|
||||
My Active Title
|
||||
</text>
|
||||
<combo_box length="150" bottom_delta="-22" follows="left|top" height="16" left="0" name="active_title"
|
||||
tool_tip="Sets the title that appears in your avatar's name tag when this group is active." />
|
||||
</panel>
|
||||
<check_box bottom_delta="-25" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Receive group notices" left_delta="0"
|
||||
<check_box bottom="-17" left="225" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Receive group notices"
|
||||
mouse_opaque="true" name="receive_notices" radio_style="false"
|
||||
tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Join group chat" left_delta="0"
|
||||
mouse_opaque="true" name="receive_chat" radio_style="false"
|
||||
tool_tip="Sets whether you want to participate in group chat. Uncheck this box if this group is spamming you."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Join group chat" left_delta="0"
|
||||
mouse_opaque="true" name="receive_chat" radio_style="false"
|
||||
tool_tip="Sets whether you want to participate in group chat. Uncheck this box if this group is spamming you."
|
||||
width="95" />
|
||||
<check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="List group in my profile" left_delta="0"
|
||||
mouse_opaque="true" name="list_groups_in_profile" radio_style="false"
|
||||
tool_tip="Sets whether you want to list this group in your Profile"
|
||||
width="95" />
|
||||
<text bottom_delta="-10" font="SansSerifSmall" left_delta="0" name="active_title_label">
|
||||
My Active Title
|
||||
</text>
|
||||
<combo_box length="120" width="175" bottom_delta="-25" follows="left|top" height="20" left_delta="0" name="active_title"
|
||||
tool_tip="Sets the title that appears in your avatar's name tag when this group is active." />
|
||||
</panel>
|
||||
</panel>
|
||||
<string name="incomplete_member_data_str">
|
||||
Retrieving member data
|
||||
|
||||
Reference in New Issue
Block a user