summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLars Næsbye Christensen <lars@naesbye.dk>2024-02-09 04:25:50 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-12 23:17:22 +0200
commit7316441f22e516db17f27a6102e012713c2b0ce9 (patch)
tree4c99f016d481a398453ff34009ac0010090d1a2e /indra
parent3a12af88b779b667ace2dc594f0e8ec48b83b58a (diff)
llrender: BOOL (int) to real bool
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llcubemaparray.cpp2
-rw-r--r--indra/llrender/llcubemaparray.h2
-rw-r--r--indra/llrender/llfontbitmapcache.cpp4
-rw-r--r--indra/llrender/llfontbitmapcache.h2
-rw-r--r--indra/llrender/llfontregistry.cpp4
-rw-r--r--indra/llrender/llglslshader.cpp26
-rw-r--r--indra/llrender/llglslshader.h6
-rw-r--r--indra/llrender/llrender2dutils.cpp8
-rw-r--r--indra/llrender/llrender2dutils.h2
9 files changed, 28 insertions, 28 deletions
diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp
index 1debd33953..ed0ad07dc0 100644
--- a/indra/llrender/llcubemaparray.cpp
+++ b/indra/llrender/llcubemaparray.cpp
@@ -107,7 +107,7 @@ LLCubeMapArray::~LLCubeMapArray()
{
}
-void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL use_mips)
+void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool use_mips)
{
U32 texname = 0;
mWidth = resolution;
diff --git a/indra/llrender/llcubemaparray.h b/indra/llrender/llcubemaparray.h
index 6c3f7dc890..1b0fa626c4 100644
--- a/indra/llrender/llcubemaparray.h
+++ b/indra/llrender/llcubemaparray.h
@@ -52,7 +52,7 @@ public:
// components - number of components per pixel
// count - number of cube maps in the array
// use_mips - if TRUE, mipmaps will be allocated for this cube map array and anisotropic filtering will be used
- void allocate(U32 res, U32 components, U32 count, BOOL use_mips = TRUE);
+ void allocate(U32 res, U32 components, U32 count, bool use_mips = true);
void bind(S32 stage);
void unbind();
diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp
index c71e24c83a..004888f8bc 100644
--- a/indra/llrender/llfontbitmapcache.cpp
+++ b/indra/llrender/llfontbitmapcache.cpp
@@ -73,7 +73,7 @@ LLImageGL *LLFontBitmapCache::getImageGL(U32 bitmap_num) const
}
-BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitmap_num)
+bool LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitmap_num)
{
if ((mBitmapNum<0) || (mCurrentOffsetX + width + 1) > mBitmapWidth)
{
@@ -138,7 +138,7 @@ BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitm
mCurrentOffsetX += width + 1;
- return TRUE;
+ return true;
}
void LLFontBitmapCache::destroyGL()
diff --git a/indra/llrender/llfontbitmapcache.h b/indra/llrender/llfontbitmapcache.h
index 7de3a6b56f..4bbd464cea 100644
--- a/indra/llrender/llfontbitmapcache.h
+++ b/indra/llrender/llfontbitmapcache.h
@@ -45,7 +45,7 @@ public:
void reset();
- BOOL nextOpenPos(S32 width, S32 &posX, S32 &posY, S32 &bitmapNum);
+ bool nextOpenPos(S32 width, S32 &posX, S32 &posY, S32 &bitmapNum);
void destroyGL();
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index 9750bd4fa1..032396ca33 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -457,7 +457,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
// Snarf all fonts we can into fontlist. First will get pulled
// off the list and become the "head" font, set to non-fallback.
// Rest will consitute the fallback list.
- BOOL is_first_found = TRUE;
+ bool is_first_found = true;
std::string local_path = LLFontGL::getFontPathLocal();
std::string sys_path = LLFontGL::getFontPathSystem();
@@ -481,7 +481,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
bool is_ft_collection = (std::find(ft_collection_list.begin(), ft_collection_list.end(), *file_name_it) != ft_collection_list.end());
// *HACK: Fallback fonts don't render, so we can use that to suppress
// creation of OpenGL textures for test apps. JC
- BOOL is_fallback = !is_first_found || !mCreateGLTextures;
+ bool is_fallback = !is_first_found || !mCreateGLTextures;
F32 extra_scale = (is_fallback)?fallback_scale:1.0;
F32 point_size_scale = extra_scale * point_size;
bool is_font_loaded = false;
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index ccfb8f69be..65c44ed04c 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -81,7 +81,7 @@ const std::string gShaderConstsVal[LLGLSLShader::NUM_SHADER_CONSTS] =
};
-BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
+bool shouldChange(const LLVector4& v1, const LLVector4& v2)
{
return v1 != v2;
}
@@ -381,7 +381,7 @@ void LLGLSLShader::unloadInternal()
stop_glerror();
}
-BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
+bool LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
std::vector<LLStaticHashedString>* uniforms,
U32 varying_count,
const char** varyings)
@@ -415,10 +415,10 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
// Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist.
LL_SHADER_LOADING_WARNS() << "Failed to create handle for shader: " << mName << LL_ENDL;
unloadInternal();
- return FALSE;
+ return false;
}
- BOOL success = TRUE;
+ bool success = true;
mUsingBinaryProgram = LLShaderMgr::instance()->loadCachedProgramBinary(this);
@@ -440,7 +440,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
}
else
{
- success = FALSE;
+ success = false;
}
}
}
@@ -449,7 +449,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
if (!LLShaderMgr::instance()->attachShaderFeatures(this))
{
unloadInternal();
- return FALSE;
+ return false;
}
// Map attributes and uniforms
if (success)
@@ -529,7 +529,7 @@ void dumpAttachObject(const char* func_name, GLuint program_object, const std::s
}
#endif // DEBUG_SHADER_INCLUDES
-BOOL LLGLSLShader::attachVertexObject(std::string object_path)
+bool LLGLSLShader::attachVertexObject(std::string object_path)
{
if (LLShaderMgr::instance()->mVertexShaderObjects.count(object_path) > 0)
{
@@ -539,19 +539,19 @@ BOOL LLGLSLShader::attachVertexObject(std::string object_path)
dumpAttachObject("attachVertexObject", mProgramObject, object_path);
#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
- return TRUE;
+ return true;
}
else
{
LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL;
- return FALSE;
+ return false;
}
}
-BOOL LLGLSLShader::attachFragmentObject(std::string object_path)
+bool LLGLSLShader::attachFragmentObject(std::string object_path)
{
if(mUsingBinaryProgram)
- return TRUE;
+ return true;
if (LLShaderMgr::instance()->mFragmentShaderObjects.count(object_path) > 0)
{
@@ -561,12 +561,12 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path)
dumpAttachObject("attachFragmentObject", mProgramObject, object_path);
#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
- return TRUE;
+ return true;
}
else
{
LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL;
- return FALSE;
+ return false;
}
}
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 43d095f73a..af9472e2ea 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -174,12 +174,12 @@ public:
// If force_read is true, will force an immediate readback (severe performance penalty)
bool readProfileQuery(bool for_runtime = false, bool force_read = false);
- BOOL createShader(std::vector<LLStaticHashedString>* attributes,
+ bool createShader(std::vector<LLStaticHashedString>* attributes,
std::vector<LLStaticHashedString>* uniforms,
U32 varying_count = 0,
const char** varyings = NULL);
- BOOL attachFragmentObject(std::string object);
- BOOL attachVertexObject(std::string object);
+ bool attachFragmentObject(std::string object);
+ bool attachVertexObject(std::string object);
void attachObject(GLuint object);
void attachObjects(GLuint* objects = NULL, S32 count = 0);
BOOL mapAttributes(const std::vector<LLStaticHashedString>* attributes);
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 52869406d2..df1169b315 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -51,11 +51,11 @@ const LLColor4 UI_VERTEX_COLOR(1.f, 1.f, 1.f, 1.f);
// Functions
//
-BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom)
+bool ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom)
{
- if (x < left || right < x) return FALSE;
- if (y < bottom || top < y) return FALSE;
- return TRUE;
+ if (x < left || right < x) return false;
+ if (y < bottom || top < y) return false;
+ return true;
}
diff --git a/indra/llrender/llrender2dutils.h b/indra/llrender/llrender2dutils.h
index 135738c3ba..298b357a38 100644
--- a/indra/llrender/llrender2dutils.h
+++ b/indra/llrender/llrender2dutils.h
@@ -43,7 +43,7 @@ class LLUUID;
extern const LLColor4 UI_VERTEX_COLOR;
-BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom);
+bool ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom);
void gl_state_for_2d(S32 width, S32 height);
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2);