diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-05 08:40:49 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-05 08:40:49 -0400 |
commit | 22a47eee84dbaa5c731c000c6013ca558bd15892 (patch) | |
tree | 8b3128fdb91731d95025b86701431826c441c5ba /indra/newview/lldynamictexture.cpp | |
parent | a6b85244a6f943a4598ff9b7b8a3343eb1e0d11e (diff) | |
parent | 7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (diff) |
Merge branch 'release/luau-scripting' into lua-resultset
Diffstat (limited to 'indra/newview/lldynamictexture.cpp')
-rw-r--r-- | indra/newview/lldynamictexture.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index f1145948a7..fe6cd4e37d 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -50,8 +50,8 @@ S32 LLViewerDynamicTexture::sNumRenders = 0; //----------------------------------------------------------------------------- // LLViewerDynamicTexture() //----------------------------------------------------------------------------- -LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, BOOL clamp) : - LLViewerTexture(width, height, components, FALSE), +LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, bool clamp) : + LLViewerTexture(width, height, components, false), mClamp(clamp) { llassert((1 <= components) && (components <= 4)); @@ -85,10 +85,10 @@ S8 LLViewerDynamicTexture::getType() const void LLViewerDynamicTexture::generateGLTexture() { LLViewerTexture::generateGLTexture() ; - generateGLTexture(-1, 0, 0, FALSE); + generateGLTexture(-1, 0, 0, false); } -void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes) +void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes) { if (mComponents < 1 || mComponents > 4) { @@ -100,7 +100,7 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum { setExplicitFormat(internal_format, primary_format, type_format, swap_bytes); } - createGLTexture(0, raw_image, 0, TRUE, LLGLTexture::DYNAMIC_TEX); + createGLTexture(0, raw_image, 0, true, LLGLTexture::DYNAMIC_TEX); setAddressMode((mClamp) ? LLTexUnit::TAM_CLAMP : LLTexUnit::TAM_WRAP); mGLTexturep->setGLTextureCreated(false); } @@ -108,15 +108,15 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum //----------------------------------------------------------------------------- // render() //----------------------------------------------------------------------------- -BOOL LLViewerDynamicTexture::render() +bool LLViewerDynamicTexture::render() { - return FALSE; + return false; } //----------------------------------------------------------------------------- // preRender() //----------------------------------------------------------------------------- -void LLViewerDynamicTexture::preRender(BOOL clear_depth) +void LLViewerDynamicTexture::preRender(bool clear_depth) { LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; @@ -142,7 +142,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth) //----------------------------------------------------------------------------- // postRender() //----------------------------------------------------------------------------- -void LLViewerDynamicTexture::postRender(BOOL success) +void LLViewerDynamicTexture::postRender(bool success) { { if (success) @@ -181,14 +181,14 @@ void LLViewerDynamicTexture::postRender(BOOL success) // updateDynamicTextures() // Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last." //----------------------------------------------------------------------------- -BOOL LLViewerDynamicTexture::updateAllInstances() +bool LLViewerDynamicTexture::updateAllInstances() { LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; sNumRenders = 0; if (gGLManager.mIsDisabled) { - return TRUE; + return true; } LLRenderTarget& bake_target = gPipeline.mAuxillaryRT.deferredScreen; @@ -196,7 +196,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances() if (!bake_target.isComplete()) { llassert(false); - return FALSE; + return false; } llassert(bake_target.getWidth() >= LLPipeline::MAX_BAKE_WIDTH); llassert(bake_target.getHeight() >= LLPipeline::MAX_BAKE_WIDTH); @@ -207,8 +207,8 @@ BOOL LLViewerDynamicTexture::updateAllInstances() LLGLSLShader::unbind(); LLVertexBuffer::unbind(); - BOOL result = FALSE; - BOOL ret = FALSE ; + bool result = false; + bool ret = false ; for( S32 order = 0; order < ORDER_COUNT; order++ ) { for (instance_list_t::iterator iter = LLViewerDynamicTexture::sInstances[order].begin(); @@ -217,19 +217,19 @@ BOOL LLViewerDynamicTexture::updateAllInstances() LLViewerDynamicTexture *dynamicTexture = *iter; if (dynamicTexture->needsRender()) { - llassert(dynamicTexture->getFullWidth() <= LLPipeline::MAX_BAKE_WIDTH); - llassert(dynamicTexture->getFullHeight() <= LLPipeline::MAX_BAKE_WIDTH); + llassert(dynamicTexture->getFullWidth() <= S32(LLPipeline::MAX_BAKE_WIDTH)); + llassert(dynamicTexture->getFullHeight() <= S32(LLPipeline::MAX_BAKE_WIDTH)); glClear(GL_DEPTH_BUFFER_BIT); gGL.color4f(1,1,1,1); dynamicTexture->setBoundTarget(&bake_target); dynamicTexture->preRender(); // Must be called outside of startRender() - result = FALSE; + result = false; if (dynamicTexture->render()) { - ret = TRUE ; - result = TRUE; + ret = true ; + result = true; sNumRenders++; } gGL.flush(); |