summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-02-21 21:05:14 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-21 23:14:31 +0200
commit60d3dd98a44230c21803c1606552ee098ed9fa7c (patch)
treeaf0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/pipeline.cpp
parent855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff)
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index fc34af8c72..512d806c90 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 gHideSelectedObjects;
+extern bool gDisplaySwapBuffers;
extern bool gDebugGL;
-extern BOOL gCubeSnapshot;
-extern BOOL gSnapshotNoPost;
+extern bool gCubeSnapshot;
+extern bool gSnapshotNoPost;
bool gAvatarBacklight = false;
@@ -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);
}
@@ -1747,7 +1747,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();
@@ -2459,7 +2459,7 @@ void LLPipeline::updateGL()
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
glu->updateGL();
- glu->mInQ = FALSE;
+ glu->mInQ = false;
LLGLUpdate::sGLQ.pop_front();
}
}
@@ -2776,7 +2776,7 @@ void LLPipeline::markGLRebuild(LLGLUpdate* glu)
if (glu && !glu->mInQ)
{
LLGLUpdate::sGLQ.push_back(glu);
- glu->mInQ = TRUE;
+ glu->mInQ = true;
}
}
@@ -2895,7 +2895,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;
@@ -2984,7 +2984,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)
@@ -3042,7 +3042,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);
}
}
@@ -3537,7 +3537,7 @@ void LLPipeline::postSort(LLCamera &camera)
}
}
- // LLSpatialGroup::sNoDelete = FALSE;
+ // LLSpatialGroup::sNoDelete = false;
LL_PUSH_CALLSTACKS();
}
@@ -3560,7 +3560,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();
@@ -4555,7 +4555,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);
@@ -5690,7 +5690,7 @@ void LLPipeline::enableLightsDynamic()
void LLPipeline::enableLightsAvatar()
{
U32 mask = 0xff; // All lights
- setupAvatarLights(FALSE);
+ setupAvatarLights(false);
enableLights(mask);
}
@@ -5754,7 +5754,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);
@@ -6210,7 +6210,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;
@@ -6418,7 +6418,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;
@@ -7154,7 +7154,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());
}
@@ -7439,7 +7439,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);
}
}
}
@@ -7452,7 +7452,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);
}
}
}
@@ -7515,11 +7515,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();
}
@@ -7540,7 +7540,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);
@@ -7585,7 +7585,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();
@@ -7607,7 +7607,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);
}
}
@@ -7696,7 +7696,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
@@ -8440,7 +8440,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);
@@ -8588,7 +8588,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)
@@ -9444,7 +9444,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;
@@ -9751,7 +9751,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);
@@ -9925,7 +9925,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);
//
@@ -10440,7 +10440,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;
}