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.cpp95
1 files changed, 47 insertions, 48 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 341c9706f8..42e74c05ed 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -117,7 +117,7 @@
#include "llenvironment.h"
#include "llsettingsvo.h"
-extern BOOL gSnapshot;
+extern bool gSnapshot;
bool gShiftFrame = false;
//cached settings
@@ -213,11 +213,11 @@ const F32 DEFERRED_LIGHT_FALLOFF = 0.5f;
const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
extern S32 gBoxFrame;
-//extern BOOL gHideSelectedObjects;
-extern BOOL gDisplaySwapBuffers;
-extern BOOL gDebugGL;
-extern BOOL gCubeSnapshot;
-extern BOOL gSnapshotNoPost;
+//extern bool gHideSelectedObjects;
+extern bool gDisplaySwapBuffers;
+extern bool gDebugGL;
+extern bool gCubeSnapshot;
+extern bool gSnapshotNoPost;
bool gAvatarBacklight = false;
@@ -439,8 +439,8 @@ void LLPipeline::init()
// disables non-object rendering (UI, sky, water, etc)
if (gSavedSettings.getBOOL("RenderPerformanceTest"))
{
- gSavedSettings.setBOOL("RenderPerformanceTest", FALSE);
- gSavedSettings.setBOOL("RenderPerformanceTest", TRUE);
+ gSavedSettings.setBOOL("RenderPerformanceTest", false);
+ gSavedSettings.setBOOL("RenderPerformanceTest", true);
}
mOldRenderDebugMask = mRenderDebugMask;
@@ -671,12 +671,12 @@ void LLPipeline::destroyGL()
void LLPipeline::requestResizeScreenTexture()
{
- gResizeScreenTexture = TRUE;
+ gResizeScreenTexture = true;
}
void LLPipeline::requestResizeShadowTexture()
{
- gResizeShadowTexture = TRUE;
+ gResizeShadowTexture = true;
}
void LLPipeline::resizeShadowTexture()
@@ -684,7 +684,7 @@ void LLPipeline::resizeShadowTexture()
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateShadowBuffer(mRT->width, mRT->height);
- gResizeShadowTexture = FALSE;
+ gResizeShadowTexture = false;
}
void LLPipeline::resizeScreenTexture()
@@ -700,7 +700,7 @@ void LLPipeline::resizeScreenTexture()
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateScreenBuffer(resX,resY);
- gResizeScreenTexture = FALSE;
+ gResizeScreenTexture = false;
}
}
}
@@ -776,8 +776,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
if (mRT == &mMainRT)
{ // hacky -- allocate auxillary buffer
-
- gCubeSnapshot = TRUE;
+ gCubeSnapshot = true;
mReflectionMapManager.initReflectionMaps();
mHeroProbeManager.initReflectionMaps();
@@ -800,7 +799,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
}
mRT = &mMainRT;
- gCubeSnapshot = FALSE;
+ gCubeSnapshot = false;
}
// remember these dimensions
@@ -943,7 +942,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
LLRenderTarget* shadow_target = getSunShadowTarget(i);
if (shadow_target)
{
- gGL.getTexUnit(0)->bind(getSunShadowTarget(i), TRUE);
+ gGL.getTexUnit(0)->bind(getSunShadowTarget(i), true);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
@@ -960,7 +959,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
LLRenderTarget* shadow_target = getSpotShadowTarget(i);
if (shadow_target)
{
- gGL.getTexUnit(0)->bind(shadow_target, TRUE);
+ gGL.getTexUnit(0)->bind(shadow_target, true);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
@@ -994,8 +993,8 @@ void LLPipeline::refreshCachedSettings()
&& LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
&& gSavedSettings.getBOOL("UseOcclusion")) ? 2 : 0;
- WindLightUseAtmosShaders = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders");
- RenderDeferred = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred");
+ WindLightUseAtmosShaders = true; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ RenderDeferred = true; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred");
RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
RenderFSAASamples = LLFeatureManager::getInstance()->isFeatureAvailable("RenderFSAASamples") ? gSavedSettings.getU32("RenderFSAASamples") : 0;
RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
@@ -1641,7 +1640,7 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
drawable->setState(LLDrawable::FORCE_INVISIBLE);
}
- drawable->updateXform(TRUE);
+ drawable->updateXform(true);
}
@@ -1792,7 +1791,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
if (drawablep->getVOVolume() && RenderAnimateRes)
{
// fun animated res
- drawablep->updateXform(TRUE);
+ drawablep->updateXform(true);
drawablep->clearState(LLDrawable::MOVE_UNDAMPED);
drawablep->setScale(LLVector3(0,0,0));
drawablep->makeActive();
@@ -2524,7 +2523,7 @@ void LLPipeline::updateGL()
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
glu->updateGL();
- glu->mInQ = FALSE;
+ glu->mInQ = false;
LLGLUpdate::sGLQ.pop_front();
}
}
@@ -2841,7 +2840,7 @@ void LLPipeline::markGLRebuild(LLGLUpdate* glu)
if (glu && !glu->mInQ)
{
LLGLUpdate::sGLQ.push_back(glu);
- glu->mInQ = TRUE;
+ glu->mInQ = true;
}
}
@@ -2960,7 +2959,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD && !gCubeSnapshot)
{
LLSpatialGroup* last_group = NULL;
- BOOL fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged();
+ bool fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged();
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
{
LLCullResult::bridge_iterator cur_iter = i;
@@ -3049,7 +3048,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
}
}
-void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed)
+void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, bool fov_changed)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (bridge->getSpatialGroup()->changeLOD() || fov_changed)
@@ -3107,7 +3106,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
if (!drawablep->isState(LLDrawable::INVISIBLE|LLDrawable::FORCE_INVISIBLE))
{
- drawablep->setVisible(camera, NULL, FALSE);
+ drawablep->setVisible(camera, NULL, false);
}
}
@@ -3602,7 +3601,7 @@ void LLPipeline::postSort(LLCamera &camera)
}
}
- // LLSpatialGroup::sNoDelete = FALSE;
+ // LLSpatialGroup::sNoDelete = false;
LL_PUSH_CALLSTACKS();
}
@@ -3625,7 +3624,7 @@ void render_hud_elements()
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
+ gViewerWindow->renderSelections(false, false, false); // For HUD version in render_ui_3d()
// Draw the tracking overlays
LLTracker::render3D();
@@ -4623,7 +4622,7 @@ void LLPipeline::renderDebug()
LLVertexBuffer::unbind();
LLGLEnable blend(GL_BLEND);
- LLGLDepthTest depth(TRUE, FALSE);
+ LLGLDepthTest depth(true, false);
LLGLDisable cull(GL_CULL_FACE);
gGL.color4f(1,1,1,1);
@@ -5758,7 +5757,7 @@ void LLPipeline::enableLightsDynamic()
void LLPipeline::enableLightsAvatar()
{
U32 mask = 0xff; // All lights
- setupAvatarLights(FALSE);
+ setupAvatarLights(false);
enableLights(mask);
}
@@ -5822,7 +5821,7 @@ void LLPipeline::enableLightsPreview()
void LLPipeline::enableLightsAvatarEdit(const LLColor4& color)
{
U32 mask = 0x2002; // Avatar backlight only, set ambient
- setupAvatarLights(TRUE);
+ setupAvatarLights(true);
enableLights(mask);
gGL.setAmbientLightColor(color);
@@ -6278,7 +6277,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE);
if (part && hasRenderType(part->mDrawableType))
{
- LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL);
+ LLDrawable* hit = part->lineSegmentIntersect(start, local_end, true, false, true, false, face_hit, &position, NULL, NULL, NULL);
if (hit)
{
drawable = hit;
@@ -6507,7 +6506,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD);
if (part)
{
- LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, TRUE, FALSE, face_hit, intersection, tex_coord, normal, tangent);
+ LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, false, true, false, face_hit, intersection, tex_coord, normal, tangent);
if (hit)
{
drawable = hit;
@@ -7285,7 +7284,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
LLVector4a result;
result.clear();
- gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, TRUE, nullptr, nullptr, nullptr, &result);
+ gViewerWindow->cursorIntersect(-1, -1, 512.f, nullptr, -1, false, false, true, true, nullptr, nullptr, nullptr, &result);
focus_point.set(result.getF32ptr());
}
@@ -7570,7 +7569,7 @@ void LLPipeline::bindShadowMaps(LLGLSLShader& shader)
S32 channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0 + i, LLTexUnit::TT_TEXTURE);
if (channel > -1)
{
- gGL.getTexUnit(channel)->bind(getSunShadowTarget(i), TRUE);
+ gGL.getTexUnit(channel)->bind(getSunShadowTarget(i), true);
}
}
}
@@ -7583,7 +7582,7 @@ void LLPipeline::bindShadowMaps(LLGLSLShader& shader)
LLRenderTarget* shadow_target = getSpotShadowTarget(i - 4);
if (shadow_target)
{
- gGL.getTexUnit(channel)->bind(shadow_target, TRUE);
+ gGL.getTexUnit(channel)->bind(shadow_target, true);
}
}
}
@@ -7646,11 +7645,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
{
if (depth_target)
{
- gGL.getTexUnit(channel)->bind(depth_target, TRUE);
+ gGL.getTexUnit(channel)->bind(depth_target, true);
}
else
{
- gGL.getTexUnit(channel)->bind(deferred_target, TRUE);
+ gGL.getTexUnit(channel)->bind(deferred_target, true);
}
stop_glerror();
}
@@ -7671,7 +7670,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
if (sReflectionRender && !shader.getUniformLocation(LLShaderMgr::MODELVIEW_MATRIX))
{
- shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, FALSE, mReflectionModelView.m);
+ shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, false, mReflectionModelView.m);
}
channel = shader.enableTexture(LLShaderMgr::DEFERRED_NOISE);
@@ -7716,7 +7715,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
mat[i+80] = mSunShadowMatrix[5].m[i];
}
- shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, FALSE, mat);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, false, mat);
stop_glerror();
@@ -7738,7 +7737,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat);
}
}
@@ -7827,7 +7826,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
if (shader.getUniformLocation(LLShaderMgr::DEFERRED_NORM_MATRIX) >= 0)
{
glh::matrix4f norm_mat = get_current_modelview().inverse().transpose();
- shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_NORM_MATRIX, 1, FALSE, norm_mat.m);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_NORM_MATRIX, 1, false, norm_mat.m);
}
// auto adjust legacy sun color if needed
@@ -8572,7 +8571,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 proj_range = far_clip - near_clip;
glh::matrix4f light_proj = gl_perspective(fovy, aspect, near_clip, far_clip);
screen_to_light = trans * light_proj * screen_to_light;
- shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, FALSE, screen_to_light.m);
+ shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, false, screen_to_light.m);
shader.uniform1f(LLShaderMgr::PROJECTOR_NEAR, near_clip);
shader.uniform3fv(LLShaderMgr::PROJECTOR_P, 1, p1.v);
shader.uniform3fv(LLShaderMgr::PROJECTOR_N, 1, n.v);
@@ -8720,7 +8719,7 @@ void LLPipeline::setEnvMat(LLGLSLShader& shader)
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat);
}
void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
@@ -9587,7 +9586,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
shadow_cam = camera;
shadow_cam.setFar(16.f);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true);
LLVector3* frust = shadow_cam.mAgentFrustum;
@@ -9894,7 +9893,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
set_current_modelview(view[j]);
set_current_projection(proj[j]);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true);
//shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
shadow_cam.getAgentPlane(LLCamera::AGENT_PLANE_NEAR).set(shadow_near_clip);
@@ -10068,7 +10067,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
shadow_cam.setFar(far_clip);
shadow_cam.setOrigin(origin);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true);
//
@@ -10583,7 +10582,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
if (!preview_avatar && !for_profile)
{
- avatar->mNeedsImpostorUpdate = FALSE;
+ avatar->mNeedsImpostorUpdate = false;
avatar->cacheImpostorValues();
avatar->mLastImpostorUpdateFrameTime = gFrameTimeSeconds;
}