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.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f5f2ba52bf..53b879286a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -116,7 +116,7 @@
#include "llenvironment.h"
#include "llsettingsvo.h"
-extern BOOL gSnapshot;
+extern bool gSnapshot;
bool gShiftFrame = false;
//cached settings
@@ -207,11 +207,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;
@@ -433,8 +433,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;
@@ -661,12 +661,12 @@ void LLPipeline::destroyGL()
void LLPipeline::requestResizeScreenTexture()
{
- gResizeScreenTexture = TRUE;
+ gResizeScreenTexture = true;
}
void LLPipeline::requestResizeShadowTexture()
{
- gResizeShadowTexture = TRUE;
+ gResizeShadowTexture = true;
}
void LLPipeline::resizeShadowTexture()
@@ -674,7 +674,7 @@ void LLPipeline::resizeShadowTexture()
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateShadowBuffer(mRT->width, mRT->height);
- gResizeShadowTexture = FALSE;
+ gResizeShadowTexture = false;
}
void LLPipeline::resizeScreenTexture()
@@ -690,7 +690,7 @@ void LLPipeline::resizeScreenTexture()
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateScreenBuffer(resX,resY);
- gResizeScreenTexture = FALSE;
+ gResizeScreenTexture = false;
}
}
}
@@ -766,13 +766,13 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
if (mRT == &mMainRT && sReflectionProbesEnabled)
{ // hacky -- allocate auxillary buffer
- gCubeSnapshot = TRUE;
+ gCubeSnapshot = true;
mReflectionMapManager.initReflectionMaps();
mRT = &mAuxillaryRT;
U32 res = mReflectionMapManager.mProbeResolution * 4; //multiply by 4 because probes will be 16x super sampled
allocateScreenBuffer(res, res, samples);
mRT = &mMainRT;
- gCubeSnapshot = FALSE;
+ gCubeSnapshot = false;
}
// remember these dimensions
@@ -915,7 +915,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);
@@ -932,7 +932,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);
@@ -966,8 +966,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");
@@ -1602,7 +1602,7 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
drawable->setState(LLDrawable::FORCE_INVISIBLE);
}
- drawable->updateXform(TRUE);
+ drawable->updateXform(true);
}
@@ -1753,7 +1753,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();
@@ -2465,7 +2465,7 @@ void LLPipeline::updateGL()
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
glu->updateGL();
- glu->mInQ = FALSE;
+ glu->mInQ = false;
LLGLUpdate::sGLQ.pop_front();
}
}
@@ -2782,7 +2782,7 @@ void LLPipeline::markGLRebuild(LLGLUpdate* glu)
if (glu && !glu->mInQ)
{
LLGLUpdate::sGLQ.push_back(glu);
- glu->mInQ = TRUE;
+ glu->mInQ = true;
}
}
@@ -2901,7 +2901,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;
@@ -2990,7 +2990,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)
@@ -3048,7 +3048,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);
}
}
@@ -3543,7 +3543,7 @@ void LLPipeline::postSort(LLCamera &camera)
}
}
- // LLSpatialGroup::sNoDelete = FALSE;
+ // LLSpatialGroup::sNoDelete = false;
LL_PUSH_CALLSTACKS();
}
@@ -3566,7 +3566,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();
@@ -4561,7 +4561,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);
@@ -5696,7 +5696,7 @@ void LLPipeline::enableLightsDynamic()
void LLPipeline::enableLightsAvatar()
{
U32 mask = 0xff; // All lights
- setupAvatarLights(FALSE);
+ setupAvatarLights(false);
enableLights(mask);
}
@@ -5760,7 +5760,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);
@@ -6216,7 +6216,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;
@@ -6424,7 +6424,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;
@@ -7160,7 +7160,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
LLVector4a result;
result.clear();
- gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, TRUE, NULL, &result);
+ gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, false, false, true, true, NULL, &result);
focus_point.set(result.getF32ptr());
}
@@ -7445,7 +7445,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);
}
}
}
@@ -7458,7 +7458,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);
}
}
}
@@ -7521,11 +7521,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();
}
@@ -7546,7 +7546,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);
@@ -7591,7 +7591,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();
@@ -7613,7 +7613,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);
}
}
@@ -7702,7 +7702,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
@@ -8446,7 +8446,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);
@@ -8594,7 +8594,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)
@@ -9450,7 +9450,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;
@@ -9757,7 +9757,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);
@@ -9931,7 +9931,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);
//
@@ -10446,7 +10446,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;
}