summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llmutex.h2
-rw-r--r--indra/llmath/raytrace.h4
-rw-r--r--indra/llmath/tests/xform_test.cpp2
-rw-r--r--indra/llrender/llcubemap.cpp10
-rw-r--r--indra/llrender/llcubemaparray.h2
-rw-r--r--indra/llrender/llfontbitmapcache.cpp4
-rw-r--r--indra/llrender/llfontfreetype.cpp16
-rw-r--r--indra/llrender/llfontfreetype.h6
-rw-r--r--indra/llrender/llfontgl.cpp40
-rw-r--r--indra/llrender/llfontgl.h16
-rw-r--r--indra/llrender/llgl.cpp56
-rw-r--r--indra/llrender/llgl.h44
-rw-r--r--indra/llrender/llglslshader.cpp20
-rw-r--r--indra/llrender/llglslshader.h8
-rw-r--r--indra/llrender/llgltexture.cpp42
-rw-r--r--indra/llrender/llgltexture.h36
-rw-r--r--indra/llrender/llimagegl.cpp190
-rw-r--r--indra/llrender/llimagegl.h86
-rw-r--r--indra/llrender/llpostprocess.cpp6
-rw-r--r--indra/llrender/llrender.cpp2
-rw-r--r--indra/llrender/llrender2dutils.cpp22
-rw-r--r--indra/llrender/llrender2dutils.h28
-rw-r--r--indra/llrender/llshadermgr.cpp86
-rw-r--r--indra/llrender/llshadermgr.h8
-rw-r--r--indra/llrender/lltexturemanagerbridge.h4
-rw-r--r--indra/llrender/lluiimage.inl4
-rw-r--r--indra/llrender/llvertexbuffer.h2
-rw-r--r--indra/newview/llappviewer.cpp26
-rw-r--r--indra/newview/llappviewerwin32.cpp2
-rw-r--r--indra/newview/lldrawpoolbump.cpp2
-rw-r--r--indra/newview/lldynamictexture.cpp2
-rw-r--r--indra/newview/llfloaterreporter.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp2
-rw-r--r--indra/newview/llviewertexture.cpp8
-rw-r--r--indra/newview/llvosky.cpp2
35 files changed, 396 insertions, 396 deletions
diff --git a/indra/llcommon/llmutex.h b/indra/llcommon/llmutex.h
index cef58c1c9d..2b2435da4d 100644
--- a/indra/llcommon/llmutex.h
+++ b/indra/llcommon/llmutex.h
@@ -64,7 +64,7 @@ protected:
mutable LLThread::id_t mLockingThread;
#if MUTEX_DEBUG
- std::unordered_map<LLThread::id_t, BOOL> mIsLocked;
+ std::unordered_map<LLThread::id_t, bool> mIsLocked;
#endif
};
diff --git a/indra/llmath/raytrace.h b/indra/llmath/raytrace.h
index df14a9a487..f620e48459 100644
--- a/indra/llmath/raytrace.h
+++ b/indra/llmath/raytrace.h
@@ -105,7 +105,7 @@ bool ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
LLVector3 &intersection, LLVector3 &intersection_normal);
-// this function doesn't just return a BOOL because the return is currently
+// this function doesn't just return a bool because the return is currently
// used to decide how to break up boxes that have been hit by shots...
// a hack that will probably be changed later
//
@@ -202,7 +202,7 @@ bool linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
LLVector3 &intersection, LLVector3 &intersection_normal);
-// this function doesn't just return a BOOL because the return is currently
+// this function doesn't just return a bool because the return is currently
// used to decide how to break up boxes that have been hit by shots...
// a hack that will probably be changed later
//
diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp
index 49870eef3c..50e24c9d4f 100644
--- a/indra/llmath/tests/xform_test.cpp
+++ b/indra/llmath/tests/xform_test.cpp
@@ -121,7 +121,7 @@ namespace tut
// Is that the expected behavior?
}
- // test cases for inline BOOL setParent(LLXform *parent) and getParent() fn.
+ // test cases for inline bool setParent(LLXform *parent) and getParent() fn.
template<> template<>
void xform_test_object_t::test<3>()
{
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 26bd925f03..3fe0ff8041 100644
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -78,7 +78,7 @@ void LLCubeMap::initGL()
for (int i = 0; i < 6; i++)
{
- mImages[i] = new LLImageGL(RESOLUTION, RESOLUTION, 4, FALSE);
+ mImages[i] = new LLImageGL(RESOLUTION, RESOLUTION, 4, false);
#if USE_SRGB_DECODE
if (mIssRGB) {
mImages[i]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA);
@@ -176,7 +176,7 @@ void LLCubeMap::initReflectionMap(U32 resolution, U32 components)
LLImageGL::generateTextures(1, &texname);
- mImages[0] = new LLImageGL(resolution, resolution, components, TRUE);
+ mImages[0] = new LLImageGL(resolution, resolution, components, true);
mImages[0]->setTexName(texname);
mImages[0]->setTarget(mTargets[0], LLTexUnit::TT_CUBE_MAP);
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname);
@@ -200,7 +200,7 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra
llassert(rawimages[i]->getHeight() == resolution);
llassert(rawimages[i]->getComponents() == components);
- mImages[i] = new LLImageGL(resolution, resolution, components, TRUE);
+ mImages[i] = new LLImageGL(resolution, resolution, components, true);
mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
mRawImages[i] = rawimages[i];
mImages[i]->createGLTexture(0, mRawImages[i], texname);
@@ -224,8 +224,8 @@ void LLCubeMap::generateMipMaps()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- mImages[0]->setUseMipMaps(TRUE);
- mImages[0]->setHasMipMaps(TRUE);
+ mImages[0]->setUseMipMaps(true);
+ mImages[0]->setHasMipMaps(true);
enableTexture(0);
bind();
mImages[0]->setFilteringOption(LLTexUnit::TFO_BILINEAR);
diff --git a/indra/llrender/llcubemaparray.h b/indra/llrender/llcubemaparray.h
index 1b0fa626c4..fb4508187c 100644
--- a/indra/llrender/llcubemaparray.h
+++ b/indra/llrender/llcubemaparray.h
@@ -51,7 +51,7 @@ public:
// res - resolution of each cube face
// 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
+ // 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 bind(S32 stage);
void unbind();
diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp
index 004888f8bc..3f6d85b542 100644
--- a/indra/llrender/llfontbitmapcache.cpp
+++ b/indra/llrender/llfontbitmapcache.cpp
@@ -87,7 +87,7 @@ bool LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitm
LLImageRaw *image_raw = getImageRaw(mBitmapNum);
// Make corresponding GL image.
- mImageGLVec.push_back(new LLImageGL(FALSE));
+ mImageGLVec.push_back(new LLImageGL(false));
LLImageGL *image_gl = getImageGL(mBitmapNum);
S32 image_width = mMaxCharWidth * 20;
@@ -122,7 +122,7 @@ bool LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitm
// Attach corresponding GL texture.
image_gl->createGLTexture(0, image_raw);
gGL.getTexUnit(0)->bind(image_gl);
- image_gl->setFilteringOption(LLTexUnit::TFO_POINT); // was setMipFilterNearest(TRUE, TRUE);
+ image_gl->setFilteringOption(LLTexUnit::TFO_POINT); // was setMipFilterNearest(true, true);
}
else
{
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 11a379d70f..ffeed89454 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -112,7 +112,7 @@ LLFontFreetype::LLFontFreetype()
pFileStream(NULL),
pFtStream(NULL),
#endif
- mIsFallback(FALSE),
+ mIsFallback(false),
mFTFace(NULL),
mRenderGlyphCount(0),
mAddGlyphCount(0),
@@ -156,7 +156,7 @@ void ft_close_cb(FT_Stream stream) {
}
#endif
-BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback, S32 face_n)
+bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, bool is_fallback, S32 face_n)
{
// Don't leak face objects. This is also needed to deal with
// changed font file names.
@@ -181,7 +181,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
#ifdef LL_WINDOWS
clearFontStreams();
#endif
- return FALSE;
+ return false;
}
mIsFallback = is_fallback;
@@ -201,7 +201,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
clearFontStreams();
#endif
mFTFace = NULL;
- return FALSE;
+ return false;
}
F32 y_max, y_min, x_max, x_min;
@@ -248,7 +248,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
mStyle |= LLFontGL::ITALIC;
}
- return TRUE;
+ return true;
}
S32 LLFontFreetype::getNumFaces(const std::string& filename)
@@ -414,7 +414,7 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL
return delta.x*(1.f/64.f);
}
-BOOL LLFontFreetype::hasGlyph(llwchar wch) const
+bool LLFontFreetype::hasGlyph(llwchar wch) const
{
llassert(!mIsFallback);
return(mCharGlyphInfoMap.find(wch) != mCharGlyphInfoMap.end());
@@ -423,7 +423,7 @@ BOOL LLFontFreetype::hasGlyph(llwchar wch) const
LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const
{
if (mFTFace == NULL)
- return FALSE;
+ return false;
llassert(!mIsFallback);
//LL_DEBUGS() << "Adding new glyph for " << wch << " to font" << LL_ENDL;
@@ -529,7 +529,7 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l
height,
buffer_data,
buffer_row_stride,
- TRUE);
+ true);
break;
case 2:
setSubImageLuminanceAlpha(pos_x,
diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h
index f61f169987..543c6fbd8e 100644
--- a/indra/llrender/llfontfreetype.h
+++ b/indra/llrender/llfontfreetype.h
@@ -84,7 +84,7 @@ public:
// is_fallback should be true for fallback fonts that aren't used
// to render directly (Unicode backup, primarily)
- BOOL loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback, S32 face_n = 0);
+ bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, bool is_fallback, S32 face_n = 0);
S32 getNumFaces(const std::string& filename);
@@ -151,7 +151,7 @@ public:
private:
void resetBitmapCache();
void setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 width, U32 height, U8 *data, S32 stride = 0) const;
- BOOL hasGlyph(llwchar wch) const; // Has a glyph for this character
+ bool hasGlyph(llwchar wch) const; // Has a glyph for this character
LLFontGlyphInfo* addGlyph(llwchar wch) const; // Add a new character to the font if necessary
LLFontGlyphInfo* addGlyphFromFont(const LLFontFreetype *fontp, llwchar wch, U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
void renderGlyph(U32 glyph_index) const;
@@ -173,7 +173,7 @@ private:
LLFT_Stream *pFtStream;
#endif
- BOOL mIsFallback;
+ bool mIsFallback;
font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars)
typedef boost::unordered_map<llwchar, LLFontGlyphInfo*> char_glyph_info_map_t;
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 484fa9d82c..4dfc6f2021 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -58,7 +58,7 @@ F32 LLFontGL::sVertDPI = 96.f;
F32 LLFontGL::sHorizDPI = 96.f;
F32 LLFontGL::sScaleX = 1.f;
F32 LLFontGL::sScaleY = 1.f;
-BOOL LLFontGL::sDisplayFont = TRUE ;
+bool LLFontGL::sDisplayFont = true ;
std::string LLFontGL::sAppDir;
LLColor4 LLFontGL::sShadowColor(0.f, 0.f, 0.f, 1.f);
@@ -89,7 +89,7 @@ void LLFontGL::destroyGL()
mFontFreetype->destroyGL();
}
-BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback, S32 face_n)
+bool LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, bool is_fallback, S32 face_n)
{
if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL))
{
@@ -110,14 +110,14 @@ S32 LLFontGL::getNumFaces(const std::string& filename)
}
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
- ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
+ ShadowType shadow, S32 max_chars, F32* right_x, bool use_ellipses) const
{
LLRectf rect_float(rect.mLeft, rect.mTop, rect.mRight, rect.mBottom);
return render(wstr, begin_offset, rect_float, color, halign, valign, style, shadow, max_chars, right_x, use_ellipses);
}
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
- ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
+ ShadowType shadow, S32 max_chars, F32* right_x, bool use_ellipses) const
{
F32 x = rect.mLeft;
F32 y = 0.f;
@@ -143,7 +143,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
- ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const
+ ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses) const
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
@@ -255,7 +255,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
- BOOL draw_ellipses = FALSE;
+ bool draw_ellipses = false;
if (use_ellipses)
{
// check for too long of a string
@@ -265,7 +265,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
// use four dots for ellipsis width to generate padding
const LLWString dots(utf8str_to_wstring(std::string("....")));
scaled_max_pixels = llmax(0, scaled_max_pixels - ll_round(getWidthF32(dots.c_str())));
- draw_ellipses = TRUE;
+ draw_ellipses = true;
}
}
@@ -409,7 +409,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
shadow,
S32_MAX, max_pixels,
right_x,
- FALSE);
+ false);
gGL.popUIMatrix();
}
@@ -420,22 +420,22 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
S32 LLFontGL::render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const
{
- return render(text, begin_offset, x, y, color, LEFT, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+ return render(text, begin_offset, x, y, color, LEFT, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL, false);
}
-S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const
+S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses) const
{
return render(utf8str_to_wstring(text), begin_offset, x, y, color, halign, valign, style, shadow, max_chars, max_pixels, right_x, use_ellipses);
}
S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color) const
{
- return renderUTF8(text, begin_offset, (F32)x, (F32)y, color, LEFT, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+ return renderUTF8(text, begin_offset, (F32)x, (F32)y, color, LEFT, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL, false);
}
S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow) const
{
- return renderUTF8(text, begin_offset, (F32)x, (F32)y, color, halign, valign, style, shadow, S32_MAX, S32_MAX, NULL, FALSE);
+ return renderUTF8(text, begin_offset, (F32)x, (F32)y, color, halign, valign, style, shadow, S32_MAX, S32_MAX, NULL, false);
}
// font metrics - override for LLFontFreetype that returns units of virtual pixels
@@ -572,11 +572,11 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
llassert(max_pixels >= 0.f);
llassert(max_chars >= 0);
- BOOL clip = FALSE;
+ bool clip = false;
F32 cur_x = 0;
S32 start_of_last_word = 0;
- BOOL in_word = FALSE;
+ bool in_word = false;
// avoid S32 overflow when max_pixels == S32_MAX by staying in floating point
F32 scaled_max_pixels = max_pixels * sScaleX;
@@ -601,18 +601,18 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
{
if(wch !=(0x00A0))
{
- in_word = FALSE;
+ in_word = false;
}
}
if (iswindividual(wch))
{
if (iswpunct(wchars[i+1]))
{
- in_word=TRUE;
+ in_word=true;
}
else
{
- in_word=FALSE;
+ in_word=false;
start_of_last_word = i;
}
}
@@ -622,7 +622,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
start_of_last_word = i;
if (!iswspace(wch)||!iswindividual(wch))
{
- in_word = TRUE;
+ in_word = true;
}
}
@@ -648,7 +648,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
// clip if current character runs past scaled_max_pixels (using width_padding)
if (scaled_max_pixels < cur_x + width_padding)
{
- clip = TRUE;
+ clip = true;
break;
}
@@ -746,7 +746,7 @@ S32 LLFontGL::firstDrawableChar(const llwchar* wchars, F32 max_pixels, S32 text_
}
-S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 target_x, F32 max_pixels, S32 max_chars, BOOL round) const
+S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 target_x, F32 max_pixels, S32 max_chars, bool round) const
{
if (!wchars || !wchars[0] || max_chars == 0)
{
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 9bbf9ce0c4..551e704aca 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -87,7 +87,7 @@ public:
void destroyGL();
- BOOL loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback, S32 face_n = 0);
+ bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, bool is_fallback, S32 face_n = 0);
S32 getNumFaces(const std::string& filename);
@@ -98,7 +98,7 @@ public:
U8 style = NORMAL, ShadowType shadow = NO_SHADOW,
S32 max_chars = S32_MAX,
F32* right_x=NULL,
- BOOL use_ellipses = FALSE) const;
+ bool use_ellipses = false) const;
S32 render(const LLWString &text, S32 begin_offset,
const LLRectf& rect,
@@ -107,7 +107,7 @@ public:
U8 style = NORMAL, ShadowType shadow = NO_SHADOW,
S32 max_chars = S32_MAX,
F32* right_x=NULL,
- BOOL use_ellipses = FALSE) const;
+ bool use_ellipses = false) const;
S32 render(const LLWString &text, S32 begin_offset,
F32 x, F32 y,
@@ -116,12 +116,12 @@ public:
U8 style = NORMAL, ShadowType shadow = NO_SHADOW,
S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
F32* right_x=NULL,
- BOOL use_ellipses = FALSE) const;
+ bool use_ellipses = false) const;
S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const;
// renderUTF8 does a conversion, so is slower!
- S32 renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const;
+ S32 renderUTF8(const std::string &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses) const;
S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color) const;
S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const;
@@ -156,7 +156,7 @@ public:
S32 firstDrawableChar(const llwchar* wchars, F32 max_pixels, S32 text_len, S32 start_pos=S32_MAX, S32 max_chars = S32_MAX) const;
// Returns the index of the character closest to pixel position x (ignoring text to the right of max_pixels and max_chars)
- S32 charFromPixelOffset(const llwchar* wchars, S32 char_offset, F32 x, F32 max_pixels=F32_MAX, S32 max_chars = S32_MAX, BOOL round = TRUE) const;
+ S32 charFromPixelOffset(const llwchar* wchars, S32 char_offset, F32 x, F32 max_pixels=F32_MAX, S32 max_chars = S32_MAX, bool round = true) const;
const LLFontDescriptor& getFontDesc() const;
@@ -185,7 +185,7 @@ public:
static std::string nameFromVAlign(LLFontGL::VAlign align);
static LLFontGL::VAlign vAlignFromName(const std::string& name);
- static void setFontDisplay(BOOL flag) { sDisplayFont = flag; }
+ static void setFontDisplay(bool flag) { sDisplayFont = flag; }
static LLFontGL* getFontMonospace();
static LLFontGL* getFontSansSerifSmall();
@@ -213,7 +213,7 @@ public:
static F32 sHorizDPI;
static F32 sScaleX;
static F32 sScaleY;
- static BOOL sDisplayFont ;
+ static bool sDisplayFont ;
static std::string sAppDir; // For loading fonts
private:
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 4c7c8e6f5c..b6cbef142c 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -59,12 +59,12 @@
#endif
-BOOL gDebugSession = FALSE;
-BOOL gDebugGLSession = FALSE;
-BOOL gClothRipple = FALSE;
-BOOL gHeadlessClient = FALSE;
-BOOL gNonInteractive = FALSE;
-BOOL gGLActive = FALSE;
+bool gDebugSession = false;
+bool gDebugGLSession = false;
+bool gClothRipple = false;
+bool gHeadlessClient = false;
+bool gNonInteractive = false;
+bool gGLActive = false;
static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
static const std::string HEADLESS_RENDERER_STRING("Headless");
@@ -971,21 +971,21 @@ PFNGLPOLYGONOFFSETCLAMPPROC glPolygonOffsetClamp = nullptr;
LLGLManager gGLManager;
LLGLManager::LLGLManager() :
- mInited(FALSE),
- mIsDisabled(FALSE),
+ mInited(false),
+ mIsDisabled(false),
mMaxSamples(0),
mNumTextureImageUnits(1),
mMaxSampleMaskWords(0),
mMaxColorTextureSamples(0),
mMaxDepthTextureSamples(0),
mMaxIntegerSamples(0),
- mIsAMD(FALSE),
- mIsNVIDIA(FALSE),
- mIsIntel(FALSE),
+ mIsAMD(false),
+ mIsNVIDIA(false),
+ mIsIntel(false),
#if LL_DARWIN
- mIsMobileGF(FALSE),
+ mIsMobileGF(false),
#endif
- mHasRequirements(TRUE),
+ mHasRequirements(true),
mDriverVersionMajor(1),
mDriverVersionMinor(0),
mDriverVersionRelease(0),
@@ -1135,12 +1135,12 @@ bool LLGLManager::initGL()
{
mGLVendorShort = "AMD";
// *TODO: Fix this?
- mIsAMD = TRUE;
+ mIsAMD = true;
}
else if (mGLVendor.find("NVIDIA ") != std::string::npos)
{
mGLVendorShort = "NVIDIA";
- mIsNVIDIA = TRUE;
+ mIsNVIDIA = true;
}
else if (mGLVendor.find("INTEL") != std::string::npos
#if LL_LINUX
@@ -1151,7 +1151,7 @@ bool LLGLManager::initGL()
)
{
mGLVendorShort = "INTEL";
- mIsIntel = TRUE;
+ mIsIntel = true;
}
else
{
@@ -1360,12 +1360,12 @@ void LLGLManager::shutdownGL()
{
glFinish();
stop_glerror();
- mInited = FALSE;
+ mInited = false;
}
}
// these are used to turn software blending on. They appear in the Debug/Avatar menu
-// presence of vertex skinning/blending or vertex programs will set these to FALSE by default.
+// presence of vertex skinning/blending or vertex programs will set these to false by default.
void LLGLManager::initExtensions()
{
@@ -1397,7 +1397,7 @@ void LLGLManager::initExtensions()
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*) &mGLMaxTextureSize);
- mInited = TRUE;
+ mInited = true;
#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL;
@@ -2285,10 +2285,10 @@ void do_assert_glerror()
// Create or update texture to be used with this data
GLenum error;
error = glGetError();
- BOOL quit = FALSE;
+ bool quit = false;
if (LL_UNLIKELY(error))
{
- quit = TRUE;
+ quit = true;
GLubyte const * gl_error_msg = gluErrorString(error);
if (NULL != gl_error_msg)
{
@@ -2408,7 +2408,7 @@ void LLGLState::dumpStates()
for (boost::unordered_map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin();
iter != sStateMap.end(); ++iter)
{
- LL_INFOS("RenderState") << llformat(" 0x%04x : %s",(S32)iter->first,iter->second?"TRUE":"FALSE") << LL_ENDL;
+ LL_INFOS("RenderState") << llformat(" 0x%04x : %s",(S32)iter->first,iter->second?"true":"false") << LL_ENDL;
}
}
@@ -2451,7 +2451,7 @@ void LLGLState::checkStates(GLboolean writeAlpha)
///////////////////////////////////////////////////////////////////////
LLGLState::LLGLState(LLGLenum state, S32 enabled) :
- mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE)
+ mState(state), mWasEnabled(false), mIsEnabled(false)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
@@ -2470,15 +2470,15 @@ void LLGLState::setEnabled(S32 enabled)
}
if (enabled == CURRENT_STATE)
{
- enabled = sStateMap[mState] == GL_TRUE ? TRUE : FALSE;
+ enabled = sStateMap[mState] == GL_TRUE ? ENABLED_STATE : DISABLED_STATE;
}
- else if (enabled == TRUE && sStateMap[mState] != GL_TRUE)
+ else if (enabled == ENABLED_STATE && sStateMap[mState] != GL_TRUE)
{
gGL.flush();
glEnable(mState);
sStateMap[mState] = GL_TRUE;
}
- else if (enabled == FALSE && sStateMap[mState] != GL_FALSE)
+ else if (enabled == DISABLED_STATE && sStateMap[mState] != GL_FALSE)
{
gGL.flush();
glDisable(mState);
@@ -2732,7 +2732,7 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G
{ // always disable depth writes if depth testing is disabled
// GL spec defines this as a requirement, but some implementations allow depth writes with testing disabled
// The proper way to write to depth buffer with testing disabled is to enable testing and use a depth_func of GL_ALWAYS
- write_enabled = FALSE;
+ write_enabled = false;
}
if (depth_enabled != sDepthEnabled)
@@ -2785,7 +2785,7 @@ void LLGLDepthTest::checkState()
if (gDebugGL)
{
GLint func = 0;
- GLboolean mask = FALSE;
+ GLboolean mask = false;
glGetIntegerv(GL_DEPTH_FUNC, &func);
glGetBooleanv(GL_DEPTH_WRITEMASK, &mask);
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 2ded1d1906..19d585e789 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -46,8 +46,8 @@
#include "glh/glh_linear.h"
extern bool gDebugGL;
-extern BOOL gDebugSession;
-extern BOOL gDebugGLSession;
+extern bool gDebugSession;
+extern bool gDebugGLSession;
extern llofstream gFailLog;
#define LL_GL_ERRS LL_ERRS("RenderState")
@@ -73,8 +73,8 @@ public:
std::string getRawGLString(); // For sending to simulator
- BOOL mInited;
- BOOL mIsDisabled;
+ bool mInited;
+ bool mIsDisabled;
// OpenGL limits
S32 mMaxSamples;
@@ -97,17 +97,17 @@ public:
// Vendor-specific extensions
bool mHasAMDAssociations = false;
- BOOL mIsAMD;
- BOOL mIsNVIDIA;
- BOOL mIsIntel;
+ bool mIsAMD;
+ bool mIsNVIDIA;
+ bool mIsIntel;
#if LL_DARWIN
// Needed to distinguish problem cards on older Macs that break with Materials
- BOOL mIsMobileGF;
+ bool mIsMobileGF;
#endif
// Whether this version of GL is good enough for SL to use
- BOOL mHasRequirements;
+ bool mHasRequirements;
S32 mDriverVersionMajor;
S32 mDriverVersionMinor;
@@ -241,16 +241,16 @@ protected:
static boost::unordered_map<LLGLenum, LLGLboolean> sStateMap;
public:
- enum { CURRENT_STATE = -2 };
+ enum { CURRENT_STATE = -2, DISABLED_STATE = 0, ENABLED_STATE = 1 };
LLGLState(LLGLenum state, S32 enabled = CURRENT_STATE);
~LLGLState();
void setEnabled(S32 enabled);
- void enable() { setEnabled(TRUE); }
- void disable() { setEnabled(FALSE); }
+ void enable() { setEnabled(ENABLED_STATE); }
+ void disable() { setEnabled(DISABLED_STATE); }
protected:
LLGLenum mState;
- BOOL mWasEnabled;
- BOOL mIsEnabled;
+ bool mWasEnabled;
+ bool mIsEnabled;
};
// New LLGLState class wrappers that don't depend on actual GL flags.
@@ -284,14 +284,14 @@ public:
class LLGLEnable : public LLGLState
{
public:
- LLGLEnable(LLGLenum state) : LLGLState(state, TRUE) {}
+ LLGLEnable(LLGLenum state) : LLGLState(state, ENABLED_STATE) {}
};
/// TODO: Being deprecated.
class LLGLDisable : public LLGLState
{
public:
- LLGLDisable(LLGLenum state) : LLGLState(state, FALSE) {}
+ LLGLDisable(LLGLenum state) : LLGLState(state, DISABLED_STATE) {}
};
/*
@@ -351,9 +351,9 @@ public:
static std::list<LLGLUpdate*> sGLQ;
- BOOL mInQ;
+ bool mInQ;
LLGLUpdate()
- : mInQ(FALSE)
+ : mInQ(false)
{
}
virtual ~LLGLUpdate()
@@ -405,10 +405,10 @@ void init_glstates();
void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor_specific, std::string* version_string );
-extern BOOL gClothRipple;
-extern BOOL gHeadlessClient;
-extern BOOL gNonInteractive;
-extern BOOL gGLActive;
+extern bool gClothRipple;
+extern bool gHeadlessClient;
+extern bool gNonInteractive;
+extern bool gGLActive;
// Deal with changing glext.h definitions for newer SDK versions, specifically
// with MAC OSX 10.5 -> 10.6
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 65c44ed04c..405203b3de 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -309,7 +309,7 @@ LLGLSLShader::LLGLSLShader()
mShaderLevel(0),
mShaderGroup(SG_DEFAULT),
mFeatures(),
- mUniformsDirty(FALSE),
+ mUniformsDirty(false),
mTimerQuery(0),
mSamplesQuery(0),
mPrimitivesQuery(0)
@@ -602,11 +602,11 @@ void LLGLSLShader::attachObjects(GLuint* objects, S32 count)
}
}
-BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attributes)
+bool LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attributes)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
- BOOL res = TRUE;
+ bool res = true;
if (!mUsingBinaryProgram)
{
//before linking, make sure reserved attributes always have consistent locations
@@ -663,10 +663,10 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attrib
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString>* uniforms)
@@ -830,11 +830,11 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint
return -1;
}
-BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
+bool LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
- BOOL res = TRUE;
+ bool res = true;
mTotalUniformSize = 0;
mActiveTextureChannels = 0;
@@ -1001,11 +1001,11 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
}
-BOOL LLGLSLShader::link(BOOL suppress_errors)
+bool LLGLSLShader::link(bool suppress_errors)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
- BOOL success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
+ bool success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
if (!success && !suppress_errors)
{
@@ -1045,7 +1045,7 @@ void LLGLSLShader::bind()
if (mUniformsDirty)
{
LLShaderMgr::instance()->updateShaderUniforms(this);
- mUniformsDirty = FALSE;
+ mUniformsDirty = false;
}
}
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index af9472e2ea..b67e06a5f2 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -182,8 +182,8 @@ public:
bool attachVertexObject(std::string object);
void attachObject(GLuint object);
void attachObjects(GLuint* objects = NULL, S32 count = 0);
- BOOL mapAttributes(const std::vector<LLStaticHashedString>* attributes);
- BOOL mapUniforms(const std::vector<LLStaticHashedString>*);
+ bool mapAttributes(const std::vector<LLStaticHashedString>* attributes);
+ bool mapUniforms(const std::vector<LLStaticHashedString>*);
void mapUniform(GLint index, const std::vector<LLStaticHashedString>*);
void uniform1i(U32 index, GLint i);
void uniform1f(U32 index, GLfloat v);
@@ -251,7 +251,7 @@ public:
S32 unbindTexture(const std::string& uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
S32 unbindTexture(S32 uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
- BOOL link(BOOL suppress_errors = FALSE);
+ bool link(bool suppress_errors = false);
void bind();
//helper to conditionally bind mRiggedVariant instead of this
void bind(bool rigged);
@@ -289,7 +289,7 @@ public:
S32 mActiveTextureChannels;
S32 mShaderLevel;
S32 mShaderGroup; // see LLGLSLShader::eGroup
- BOOL mUniformsDirty;
+ bool mUniformsDirty;
LLShaderFeatures mFeatures;
std::vector< std::pair< std::string, GLenum > > mShaderFiles;
std::string mName;
diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp
index b616002b49..d366af0435 100644
--- a/indra/llrender/llgltexture.cpp
+++ b/indra/llrender/llgltexture.cpp
@@ -27,13 +27,13 @@
#include "llgltexture.h"
-LLGLTexture::LLGLTexture(BOOL usemipmaps)
+LLGLTexture::LLGLTexture(bool usemipmaps)
{
init();
mUseMipMaps = usemipmaps;
}
-LLGLTexture::LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps)
+LLGLTexture::LLGLTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps)
{
init();
mFullWidth = width ;
@@ -43,7 +43,7 @@ LLGLTexture::LLGLTexture(const U32 width, const U32 height, const U8 components,
setTexelsPerImage();
}
-LLGLTexture::LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps)
+LLGLTexture::LLGLTexture(const LLImageRaw* raw, bool usemipmaps)
{
init();
mUseMipMaps = usemipmaps ;
@@ -63,12 +63,12 @@ void LLGLTexture::init()
mFullWidth = 0;
mFullHeight = 0;
mTexelsPerImage = 0 ;
- mUseMipMaps = FALSE ;
+ mUseMipMaps = false ;
mComponents = 0 ;
mTextureState = NO_DELETE ;
- mDontDiscard = FALSE;
- mNeedsGLTexture = FALSE ;
+ mDontDiscard = false;
+ mNeedsGLTexture = false ;
}
void LLGLTexture::cleanup()
@@ -136,7 +136,7 @@ LLImageGL* LLGLTexture::getGLTexture() const
return mGLTexturep ;
}
-BOOL LLGLTexture::createGLTexture()
+bool LLGLTexture::createGLTexture()
{
if(mGLTexturep.isNull())
{
@@ -146,11 +146,11 @@ BOOL LLGLTexture::createGLTexture()
return mGLTexturep->createGLTexture() ;
}
-BOOL LLGLTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename, BOOL to_create, S32 category, bool defer_copy, LLGLuint* tex_name)
+bool LLGLTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename, bool to_create, S32 category, bool defer_copy, LLGLuint* tex_name)
{
llassert(mGLTexturep.notNull());
- BOOL ret = mGLTexturep->createGLTexture(discard_level, imageraw, usename, to_create, category, defer_copy, tex_name) ;
+ bool ret = mGLTexturep->createGLTexture(discard_level, imageraw, usename, to_create, category, defer_copy, tex_name) ;
if(ret)
{
@@ -163,7 +163,7 @@ BOOL LLGLTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw,
return ret ;
}
-void LLGLTexture::setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes)
+void LLGLTexture::setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes)
{
llassert(mGLTexturep.notNull()) ;
@@ -218,22 +218,22 @@ LLGLuint LLGLTexture::getTexName() const
return mGLTexturep->getTexName() ;
}
-BOOL LLGLTexture::hasGLTexture() const
+bool LLGLTexture::hasGLTexture() const
{
if(mGLTexturep.notNull())
{
return mGLTexturep->getHasGLTexture() ;
}
- return FALSE ;
+ return false ;
}
-BOOL LLGLTexture::getBoundRecently() const
+bool LLGLTexture::getBoundRecently() const
{
if(mGLTexturep.notNull())
{
return mGLTexturep->getBoundRecently() ;
}
- return FALSE ;
+ return false ;
}
LLTexUnit::eTextureType LLGLTexture::getTarget(void) const
@@ -242,7 +242,7 @@ LLTexUnit::eTextureType LLGLTexture::getTarget(void) const
return mGLTexturep->getTarget() ;
}
-BOOL LLGLTexture::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name)
+bool LLGLTexture::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert(mGLTexturep.notNull()) ;
@@ -250,7 +250,7 @@ BOOL LLGLTexture::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos,
return mGLTexturep->setSubImage(imageraw, x_pos, y_pos, width, height, 0, use_name) ;
}
-BOOL LLGLTexture::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name)
+bool LLGLTexture::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
llassert(mGLTexturep.notNull()) ;
@@ -305,14 +305,14 @@ LLGLenum LLGLTexture::getPrimaryFormat() const
return mGLTexturep->getPrimaryFormat() ;
}
-BOOL LLGLTexture::getIsAlphaMask() const
+bool LLGLTexture::getIsAlphaMask() const
{
llassert(mGLTexturep.notNull()) ;
return mGLTexturep->getIsAlphaMask() ;
}
-BOOL LLGLTexture::getMask(const LLVector2 &tc)
+bool LLGLTexture::getMask(const LLVector2 &tc)
{
llassert(mGLTexturep.notNull()) ;
@@ -325,14 +325,14 @@ F32 LLGLTexture::getTimePassedSinceLastBound()
return mGLTexturep->getTimePassedSinceLastBound() ;
}
-BOOL LLGLTexture::getMissed() const
+bool LLGLTexture::getMissed() const
{
llassert(mGLTexturep.notNull()) ;
return mGLTexturep->getMissed() ;
}
-BOOL LLGLTexture::isJustBound() const
+bool LLGLTexture::isJustBound() const
{
llassert(mGLTexturep.notNull()) ;
@@ -360,7 +360,7 @@ U32 LLGLTexture::getTexelsInGLTexture() const
return mGLTexturep->getTexelsInGLTexture() ;
}
-BOOL LLGLTexture::isGLTextureCreated() const
+bool LLGLTexture::isGLTextureCreated() const
{
llassert(mGLTexturep.notNull()) ;
diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index 24849d1d1b..6012b198f3 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -93,9 +93,9 @@ protected:
LOG_CLASS(LLGLTexture);
public:
- LLGLTexture(BOOL usemipmaps = TRUE);
- LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
- LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ;
+ LLGLTexture(bool usemipmaps = true);
+ LLGLTexture(const LLImageRaw* raw, bool usemipmaps) ;
+ LLGLTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps) ;
virtual void dump(); // debug info to LL_INFOS()
@@ -116,25 +116,25 @@ public:
/*virtual*/S32 getWidth(S32 discard_level = -1) const;
/*virtual*/S32 getHeight(S32 discard_level = -1) const;
- BOOL hasGLTexture() const ;
+ bool hasGLTexture() const ;
LLGLuint getTexName() const ;
- BOOL createGLTexture() ;
+ bool createGLTexture() ;
// Create a GL Texture from an image raw
// discard_level - mip level, 0 for highest resultion mip
// imageraw - the image to copy from
// usename - explicit GL name override
- // to_create - set to FALSE to force gl texture to not be created
+ // to_create - set to false to force gl texture to not be created
// category - LLGLTexture category for this LLGLTexture
// defer_copy - set to true to allocate GL texture but NOT initialize with imageraw data
// tex_name - if not null, will be set to the GL name of the texture created
- BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE, S32 category = LLGLTexture::OTHER, bool defer_copy = false, LLGLuint* tex_name = nullptr);
+ bool createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, bool to_create = true, S32 category = LLGLTexture::OTHER, bool defer_copy = false, LLGLuint* tex_name = nullptr);
void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
- void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
+ void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, bool swap_bytes = false);
void setAddressMode(LLTexUnit::eTextureAddressMode mode);
- BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
- BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
+ bool setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
+ bool setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
void setGLTextureCreated (bool initialized);
void setCategory(S32 category) ;
void setTexName(LLGLuint); // for forcing w/ externally created textures only
@@ -144,20 +144,20 @@ public:
S32 getMaxDiscardLevel() const;
S32 getDiscardLevel() const;
S8 getComponents() const;
- BOOL getBoundRecently() const;
+ bool getBoundRecently() const;
S32Bytes getTextureMemory() const ;
LLGLenum getPrimaryFormat() const;
- BOOL getIsAlphaMask() const ;
+ bool getIsAlphaMask() const ;
LLTexUnit::eTextureType getTarget(void) const ;
- BOOL getMask(const LLVector2 &tc);
+ bool getMask(const LLVector2 &tc);
F32 getTimePassedSinceLastBound();
- BOOL getMissed() const ;
- BOOL isJustBound()const ;
+ bool getMissed() const ;
+ bool isJustBound()const ;
void forceUpdateBindStats(void) const;
U32 getTexelsInAtlas() const ;
U32 getTexelsInGLTexture() const ;
- BOOL isGLTextureCreated() const ;
+ bool isGLTextureCreated() const ;
S32 getDiscardLevelInAtlas() const ;
LLGLTextureState getTextureState() const { return mTextureState; }
@@ -170,7 +170,7 @@ public:
void forceActive() ;
void setNoDelete() ;
void dontDiscard() { mDontDiscard = 1; mTextureState = NO_DELETE; }
- BOOL getDontDiscard() const { return mDontDiscard; }
+ bool getDontDiscard() const { return mDontDiscard; }
//-----------------
private:
@@ -187,7 +187,7 @@ protected:
S32 mBoostLevel; // enum describing priority level
U32 mFullWidth;
U32 mFullHeight;
- BOOL mUseMipMaps;
+ bool mUseMipMaps;
S8 mComponents;
U32 mTexelsPerImage; // Texels per image.
mutable S8 mNeedsGLTexture;
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 78c4c90663..7e09713054 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -126,9 +126,9 @@ U32 LLImageGL::sUniqueCount = 0;
U32 LLImageGL::sBindCount = 0;
S32 LLImageGL::sCount = 0;
-BOOL LLImageGL::sGlobalUseAnisotropic = FALSE;
+bool LLImageGL::sGlobalUseAnisotropic = false;
F32 LLImageGL::sLastFrameTime = 0.f;
-BOOL LLImageGL::sAllowReadBackRaw = FALSE ;
+bool LLImageGL::sAllowReadBackRaw = false ;
LLImageGL* LLImageGL::sDefaultGLTexture = NULL ;
bool LLImageGL::sCompressTextures = false;
std::set<LLImageGL*> LLImageGL::sImageList;
@@ -147,7 +147,7 @@ S32 LLImageGL::sCurTexPickSize = -1 ;
S32 LLImageGL::sMaxCategories = 1 ;
//optimization for when we don't need to calculate mIsMask
-BOOL LLImageGL::sSkipAnalyzeAlpha;
+bool LLImageGL::sSkipAnalyzeAlpha;
//------------------------
//****************************************************************************************************
@@ -185,12 +185,12 @@ void LLImageGL::checkTexSize(bool forced) const
GLint texname;
glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname);
- BOOL error = FALSE;
+ bool error = false;
if (texname != mTexName)
{
LL_INFOS() << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << LL_ENDL;
- error = TRUE;
+ error = true;
if (gDebugSession)
{
gFailLog << "Invalid texture bound!" << std::endl;
@@ -213,7 +213,7 @@ void LLImageGL::checkTexSize(bool forced) const
}
if(x != (mWidth >> mCurrentDiscardLevel) || y != (mHeight >> mCurrentDiscardLevel))
{
- error = TRUE;
+ error = true;
if (gDebugSession)
{
gFailLog << "wrong texture size and discard level!" <<
@@ -236,7 +236,7 @@ void LLImageGL::checkTexSize(bool forced) const
//**************************************************************************************
//----------------------------------------------------------------------------
-BOOL is_little_endian()
+bool is_little_endian()
{
S32 a = 0x12345678;
U8 *c = (U8*)(&a);
@@ -245,7 +245,7 @@ BOOL is_little_endian()
}
//static
-void LLImageGL::initClass(LLWindow* window, S32 num_catagories, BOOL skip_analyze_alpha /* = false */, bool thread_texture_loads /* = false */, bool thread_media_updates /* = false */)
+void LLImageGL::initClass(LLWindow* window, S32 num_catagories, bool skip_analyze_alpha /* = false */, bool thread_texture_loads /* = false */, bool thread_media_updates /* = false */)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
sSkipAnalyzeAlpha = skip_analyze_alpha;
@@ -356,7 +356,7 @@ void LLImageGL::updateStats(F32 current_time)
//----------------------------------------------------------------------------
//static
-void LLImageGL::destroyGL(BOOL save_state)
+void LLImageGL::destroyGL(bool save_state)
{
for (S32 stage = 0; stage < gGLManager.mNumTextureImageUnits; stage++)
{
@@ -401,7 +401,7 @@ void LLImageGL::restoreGL()
{
if (glimage->getComponents() && glimage->mSaveData->getComponents())
{
- glimage->createGLTexture(glimage->mCurrentDiscardLevel, glimage->mSaveData, 0, TRUE, glimage->getCategory());
+ glimage->createGLTexture(glimage->mCurrentDiscardLevel, glimage->mSaveData, 0, true, glimage->getCategory());
stop_glerror();
}
glimage->mSaveData = NULL; // deletes data
@@ -425,30 +425,30 @@ void LLImageGL::dirtyTexOptions()
//for server side use only.
//static
-BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, BOOL usemipmaps)
+bool LLImageGL::create(LLPointer<LLImageGL>& dest, bool usemipmaps)
{
dest = new LLImageGL(usemipmaps);
- return TRUE;
+ return true;
}
//for server side use only.
-BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, U32 width, U32 height, U8 components, BOOL usemipmaps)
+bool LLImageGL::create(LLPointer<LLImageGL>& dest, U32 width, U32 height, U8 components, bool usemipmaps)
{
dest = new LLImageGL(width, height, components, usemipmaps);
- return TRUE;
+ return true;
}
//for server side use only.
-BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, BOOL usemipmaps)
+bool LLImageGL::create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, bool usemipmaps)
{
dest = new LLImageGL(imageraw, usemipmaps);
- return TRUE;
+ return true;
}
//----------------------------------------------------------------------------
-LLImageGL::LLImageGL(BOOL usemipmaps)
-: mSaveData(0), mExternalTexture(FALSE)
+LLImageGL::LLImageGL(bool usemipmaps)
+: mSaveData(0), mExternalTexture(false)
{
init(usemipmaps);
setSize(0, 0, 0);
@@ -456,8 +456,8 @@ LLImageGL::LLImageGL(BOOL usemipmaps)
sCount++;
}
-LLImageGL::LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps)
-: mSaveData(0), mExternalTexture(FALSE)
+LLImageGL::LLImageGL(U32 width, U32 height, U8 components, bool usemipmaps)
+: mSaveData(0), mExternalTexture(false)
{
llassert( components <= 4 );
init(usemipmaps);
@@ -466,8 +466,8 @@ LLImageGL::LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps)
sCount++;
}
-LLImageGL::LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps)
-: mSaveData(0), mExternalTexture(FALSE)
+LLImageGL::LLImageGL(const LLImageRaw* imageraw, bool usemipmaps)
+: mSaveData(0), mExternalTexture(false)
{
init(usemipmaps);
setSize(0, 0, 0);
@@ -508,7 +508,7 @@ LLImageGL::~LLImageGL()
}
}
-void LLImageGL::init(BOOL usemipmaps)
+void LLImageGL::init(bool usemipmaps)
{
#if LL_IMAGEGL_THREAD_CHECK
mActiveThread = LLThread::currentID();
@@ -525,14 +525,14 @@ void LLImageGL::init(BOOL usemipmaps)
mPickMaskWidth = 0;
mPickMaskHeight = 0;
mUseMipMaps = usemipmaps;
- mHasExplicitFormat = FALSE;
+ mHasExplicitFormat = false;
- mIsMask = FALSE;
- mNeedsAlphaAndPickMask = TRUE ;
+ mIsMask = false;
+ mNeedsAlphaAndPickMask = true ;
mAlphaStride = 0 ;
mAlphaOffset = 0 ;
- mGLTextureCreated = FALSE ;
+ mGLTextureCreated = false ;
mTexName = 0;
mWidth = 0;
mHeight = 0;
@@ -561,10 +561,10 @@ void LLImageGL::init(BOOL usemipmaps)
mFormatInternal = -1;
mFormatPrimary = (LLGLenum) 0;
mFormatType = GL_UNSIGNED_BYTE;
- mFormatSwapBytes = FALSE;
+ mFormatSwapBytes = false;
#ifdef DEBUG_MISS
- mMissed = FALSE;
+ mMissed = false;
#endif
mCategory = -1;
@@ -682,12 +682,12 @@ void LLImageGL::forceUpdateBindStats(void) const
mLastBindTime = sLastFrameTime;
}
-BOOL LLImageGL::updateBindStats() const
+bool LLImageGL::updateBindStats() const
{
if (mTexName != 0)
{
#ifdef DEBUG_MISS
- mMissed = ! getIsResident(TRUE);
+ mMissed = ! getIsResident(true);
#endif
sBindCount++;
if (mLastBindTime != sLastFrameTime)
@@ -696,10 +696,10 @@ BOOL LLImageGL::updateBindStats() const
sUniqueCount++;
mLastBindTime = sLastFrameTime;
- return TRUE ;
+ return true ;
}
}
- return FALSE ;
+ return false ;
}
F32 LLImageGL::getTimePassedSinceLastBound()
@@ -707,11 +707,11 @@ F32 LLImageGL::getTimePassedSinceLastBound()
return sLastFrameTime - mLastBindTime ;
}
-void LLImageGL::setExplicitFormat( LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes )
+void LLImageGL::setExplicitFormat( LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes )
{
// Note: must be called before createTexture()
// Note: it's up to the caller to ensure that the format matches the number of components.
- mHasExplicitFormat = TRUE;
+ mHasExplicitFormat = true;
mFormatInternal = internal_format;
mFormatPrimary = primary_format;
if(type_format == 0)
@@ -732,10 +732,10 @@ void LLImageGL::setImage(const LLImageRaw* imageraw)
(imageraw->getHeight() == getHeight(mCurrentDiscardLevel)) &&
(imageraw->getComponents() == getComponents()));
const U8* rawdata = imageraw->getData();
- setImage(rawdata, FALSE);
+ setImage(rawdata, false);
}
-BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 usename /* = 0 */)
+bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32 usename /* = 0 */)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -917,7 +917,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
}
mGLTextureCreated = false;
- return FALSE;
+ return false;
}
else
{
@@ -1018,10 +1018,10 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
}
stop_glerror();
mGLTextureCreated = true;
- return TRUE;
+ return true;
}
-BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
+bool LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
{
//not compatible with core GL profile
llassert(!LLRender::sGLCoreProfile);
@@ -1029,7 +1029,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
if (gGLManager.mIsDisabled)
{
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
- return FALSE;
+ return false;
}
llassert(gGLManager.mInited);
stop_glerror();
@@ -1048,7 +1048,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
if (!setSize(w, h, raw_image->getComponents(), discard_level))
{
LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL;
- return FALSE;
+ return false;
}
if (!mHasExplicitFormat)
@@ -1097,7 +1097,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
stop_glerror();
}
- return TRUE ;
+ return true ;
}
void LLImageGL::postAddToAtlas()
@@ -1167,31 +1167,31 @@ void sub_image_lines(U32 target, S32 miplevel, S32 x_offset, S32 y_offset, S32 w
}
}
-BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update /* = FALSE */, LLGLuint use_name)
+bool LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, bool force_fast_update /* = false */, LLGLuint use_name)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if (!width || !height)
{
- return TRUE;
+ return true;
}
LLGLuint tex_name = use_name != 0 ? use_name : mTexName;
if (0 == tex_name)
{
// *TODO: Re-enable warning? Ran into thread locking issues? DK 2011-02-18
//LL_WARNS() << "Setting subimage on image without GL texture" << LL_ENDL;
- return FALSE;
+ return false;
}
if (datap == NULL)
{
// *TODO: Re-enable warning? Ran into thread locking issues? DK 2011-02-18
//LL_WARNS() << "Setting subimage on image with NULL datap" << LL_ENDL;
- return FALSE;
+ return false;
}
// HACK: allow the caller to explicitly force the fast path (i.e. using glTexSubImage2D here instead of calling setImage) even when updating the full texture.
if (!force_fast_update && x_pos == 0 && y_pos == 0 && width == getWidth() && height == getHeight() && data_width == width && data_height == height)
{
- setImage(datap, FALSE, tex_name);
+ setImage(datap, false, tex_name);
}
else
{
@@ -1243,7 +1243,7 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
const U8* sub_datap = datap + (y_pos * data_width + x_pos) * getComponents();
// Update the GL texture
- BOOL res = gGL.getTexUnit(0)->bindManual(mBindTarget, tex_name);
+ bool res = gGL.getTexUnit(0)->bindManual(mBindTarget, tex_name);
if (!res) LL_ERRS() << "LLImageGL::setSubImage(): bindTexture failed" << LL_ENDL;
stop_glerror();
@@ -1273,28 +1273,28 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
stop_glerror();
mGLTextureCreated = true;
}
- return TRUE;
+ return true;
}
-BOOL LLImageGL::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update /* = FALSE */, LLGLuint use_name)
+bool LLImageGL::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, bool force_fast_update /* = false */, LLGLuint use_name)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
return setSubImage(imageraw->getData(), imageraw->getWidth(), imageraw->getHeight(), x_pos, y_pos, width, height, force_fast_update, use_name);
}
// Copy sub image from frame buffer
-BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height)
+bool LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height)
{
if (gGL.getTexUnit(0)->bind(this, false, true))
{
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, fb_x, fb_y, x_pos, y_pos, width, height);
mGLTextureCreated = true;
stop_glerror();
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -1508,7 +1508,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
//create an empty GL texture: just create a texture name
//the texture is assiciate with some image by calling glTexImage outside LLImageGL
-BOOL LLImageGL::createGLTexture()
+bool LLImageGL::createGLTexture()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
checkActiveThread();
@@ -1516,7 +1516,7 @@ BOOL LLImageGL::createGLTexture()
if (gGLManager.mIsDisabled)
{
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
- return FALSE;
+ return false;
}
mGLTextureCreated = false ; //do not save this texture when gl is destroyed.
@@ -1536,13 +1536,13 @@ BOOL LLImageGL::createGLTexture()
if (!mTexName)
{
LL_WARNS() << "LLImageGL::createGLTexture failed to make an empty texture" << LL_ENDL;
- return FALSE;
+ return false;
}
- return TRUE ;
+ return true ;
}
-BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category, bool defer_copy, LLGLuint* tex_name)
+bool LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, bool to_create, S32 category, bool defer_copy, LLGLuint* tex_name)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
checkActiveThread();
@@ -1550,7 +1550,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
if (gGLManager.mIsDisabled)
{
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
- return FALSE;
+ return false;
}
llassert(gGLManager.mInited);
@@ -1560,7 +1560,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
{
LL_WARNS() << "Trying to create a texture from invalid image data" << LL_ENDL;
mGLTextureCreated = false;
- return FALSE;
+ return false;
}
if (discard_level < 0)
@@ -1581,7 +1581,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
{
LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL;
mGLTextureCreated = false;
- return FALSE;
+ return false;
}
if (mHasExplicitFormat &&
@@ -1590,7 +1590,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
{
LL_WARNS() << "Incorrect format: " << std::hex << mFormatPrimary << " components: " << (U32)mComponents << LL_ENDL;
- mHasExplicitFormat = FALSE;
+ mHasExplicitFormat = false;
}
if( !mHasExplicitFormat )
@@ -1632,15 +1632,15 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
mCurrentDiscardLevel = discard_level;
mLastBindTime = sLastFrameTime;
mGLTextureCreated = false;
- return TRUE ;
+ return true ;
}
setCategory(category);
const U8* rawdata = imageraw->getData();
- return createGLTexture(discard_level, rawdata, FALSE, usename, defer_copy, tex_name);
+ return createGLTexture(discard_level, rawdata, false, usename, defer_copy, tex_name);
}
-BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename, bool defer_copy, LLGLuint* tex_name)
+bool LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, bool data_hasmips, S32 usename, bool defer_copy, LLGLuint* tex_name)
// Call with void data, vmem is allocated but unitialized
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -1713,7 +1713,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
LL_PROFILE_ZONE_NAMED("cglt - late setImage");
if (!setImage(data_in, data_hasmips, new_texname))
{
- return FALSE;
+ return false;
}
}
@@ -1751,7 +1751,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
mLastBindTime = sLastFrameTime;
checkActiveThread();
- return TRUE;
+ return true;
}
void LLImageGL::syncToMainThread(LLGLuint new_tex_name)
@@ -1821,7 +1821,7 @@ void LLImageGL::syncTexName(LLGLuint texname)
}
}
-BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const
+bool LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const
{
llassert_always(sAllowReadBackRaw) ;
//LL_ERRS() << "should not call this function!" << LL_ENDL ;
@@ -1833,7 +1833,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
if (mTexName == 0 || discard_level < mCurrentDiscardLevel || discard_level > mMaxDiscardLevel )
{
- return FALSE;
+ return false;
}
S32 gl_discard = discard_level - mCurrentDiscardLevel;
@@ -1850,7 +1850,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
if (glwidth == 0)
{
// No mip data smaller than current discard level
- return FALSE;
+ return false;
}
S32 width = getWidth(discard_level);
@@ -1858,14 +1858,14 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
S32 ncomponents = getComponents();
if (ncomponents == 0)
{
- return FALSE;
+ return false;
}
if(width < glwidth)
{
LL_WARNS() << "texture size is smaller than it should be." << LL_ENDL ;
LL_WARNS() << "width: " << width << " glwidth: " << glwidth << " mWidth: " << mWidth <<
" mCurrentDiscardLevel: " << (S32)mCurrentDiscardLevel << " discard_level: " << (S32)discard_level << LL_ENDL ;
- return FALSE ;
+ return false ;
}
if (width <= 0 || width > 2048 || height <= 0 || height > 2048 || ncomponents < 1 || ncomponents > 4)
@@ -1897,7 +1897,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
{
LL_WARNS() << "Memory allocation failed for reading back texture. Size is: " << glbytes << LL_ENDL ;
LL_WARNS() << "width: " << width << "height: " << height << "components: " << ncomponents << LL_ENDL ;
- return FALSE ;
+ return false ;
}
glGetCompressedTexImage(mTarget, gl_discard, (GLvoid*)(imageraw->getData()));
@@ -1909,7 +1909,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
{
LL_WARNS() << "Memory allocation failed for reading back texture." << LL_ENDL ;
LL_WARNS() << "width: " << width << "height: " << height << "components: " << ncomponents << LL_ENDL ;
- return FALSE ;
+ return false ;
}
glGetTexImage(GL_TEXTURE_2D, gl_discard, mFormatPrimary, mFormatType, (GLvoid*)(imageraw->getData()));
@@ -1927,11 +1927,11 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ;
}
- return FALSE ;
+ return false ;
}
//-----------------------------------------------------------------------------------------------
- return TRUE ;
+ return true ;
}
void LLImageGL::destroyGLTexture()
@@ -1948,7 +1948,7 @@ void LLImageGL::destroyGLTexture()
LLImageGL::deleteTextures(1, &mTexName);
mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel.
mTexName = 0;
- mGLTextureCreated = FALSE ;
+ mGLTextureCreated = false ;
}
}
@@ -1999,7 +1999,7 @@ void LLImageGL::setFilteringOption(LLTexUnit::eTextureFilterOptions option)
}
}
-BOOL LLImageGL::getIsResident(BOOL test_now)
+bool LLImageGL::getIsResident(bool test_now)
{
if (test_now)
{
@@ -2009,7 +2009,7 @@ BOOL LLImageGL::getIsResident(BOOL test_now)
}
else
{
- mIsResident = FALSE;
+ mIsResident = false;
}
}
@@ -2077,12 +2077,12 @@ bool LLImageGL::isJustBound() const
return sLastFrameTime - mLastBindTime < 0.5f;
}
-BOOL LLImageGL::getBoundRecently() const
+bool LLImageGL::getBoundRecently() const
{
- return (BOOL)(sLastFrameTime - mLastBindTime < MIN_TEXTURE_LIFETIME);
+ return (bool)(sLastFrameTime - mLastBindTime < MIN_TEXTURE_LIFETIME);
}
-BOOL LLImageGL::getIsAlphaMask() const
+bool LLImageGL::getIsAlphaMask() const
{
llassert_always(!sSkipAnalyzeAlpha);
return mIsMask;
@@ -2095,7 +2095,7 @@ void LLImageGL::setTarget(const LLGLenum target, const LLTexUnit::eTextureType b
}
const S8 INVALID_OFFSET = -99 ;
-void LLImageGL::setNeedsAlphaAndPickMask(BOOL need_mask)
+void LLImageGL::setNeedsAlphaAndPickMask(bool need_mask)
{
if(mNeedsAlphaAndPickMask != need_mask)
{
@@ -2108,7 +2108,7 @@ void LLImageGL::setNeedsAlphaAndPickMask(BOOL need_mask)
else //do not need alpha mask
{
mAlphaOffset = INVALID_OFFSET ;
- mIsMask = FALSE;
+ mIsMask = false;
}
}
}
@@ -2133,8 +2133,8 @@ void LLImageGL::calcAlphaChannelOffsetAndStride()
case GL_RED:
case GL_RGB:
case GL_SRGB:
- mNeedsAlphaAndPickMask = FALSE;
- mIsMask = FALSE;
+ mNeedsAlphaAndPickMask = false;
+ mIsMask = false;
return; //no alpha channel.
case GL_RGBA:
case GL_SRGB_ALPHA:
@@ -2181,8 +2181,8 @@ void LLImageGL::calcAlphaChannelOffsetAndStride()
{
LL_WARNS() << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << LL_ENDL;
- mNeedsAlphaAndPickMask = FALSE ;
- mIsMask = FALSE;
+ mNeedsAlphaAndPickMask = false ;
+ mIsMask = false;
}
}
@@ -2279,11 +2279,11 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
(lowerhalftotal == length && alphatotal != 0) || // all close to transparent but not all totally transparent, or
(upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque
{
- mIsMask = FALSE; // not suitable for masking
+ mIsMask = false; // not suitable for masking
}
else
{
- mIsMask = TRUE;
+ mIsMask = true;
}
}
@@ -2383,9 +2383,9 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
}
}
-BOOL LLImageGL::getMask(const LLVector2 &tc)
+bool LLImageGL::getMask(const LLVector2 &tc)
{
- BOOL res = TRUE;
+ bool res = true;
if (mPickMask)
{
@@ -2429,13 +2429,13 @@ BOOL LLImageGL::getMask(const LLVector2 &tc)
S32 idx = y*mPickMaskWidth+x;
S32 offset = idx%8;
- res = mPickMask[idx/8] & (1 << offset) ? TRUE : FALSE;
+ res = mPickMask[idx/8] & (1 << offset) ? true : false;
}
return res;
}
-void LLImageGL::setCurTexSizebar(S32 index, BOOL set_pick_size)
+void LLImageGL::setCurTexSizebar(S32 index, bool set_pick_size)
{
sCurTexSizeBar = index ;
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 1b77fd0964..60fa1258b6 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -68,7 +68,7 @@ public:
static S64 dataFormatBytes(S32 dataformat, S32 width, S32 height);
static S32 dataFormatComponents(S32 dataformat);
- BOOL updateBindStats() const ;
+ bool updateBindStats() const ;
F32 getTimePassedSinceLastBound();
void forceUpdateBindStats(void) const;
@@ -76,7 +76,7 @@ public:
static void updateStats(F32 current_time);
// Save off / restore GL textures
- static void destroyGL(BOOL save_state = TRUE);
+ static void destroyGL(bool save_state = true);
static void restoreGL();
static void dirtyTexOptions();
@@ -85,14 +85,14 @@ public:
//for server side use only.
// Not currently necessary for LLImageGL, but required in some derived classes,
// so include for compatability
- static BOOL create(LLPointer<LLImageGL>& dest, BOOL usemipmaps = TRUE);
- static BOOL create(LLPointer<LLImageGL>& dest, U32 width, U32 height, U8 components, BOOL usemipmaps = TRUE);
- static BOOL create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, BOOL usemipmaps = TRUE);
+ static bool create(LLPointer<LLImageGL>& dest, bool usemipmaps = true);
+ static bool create(LLPointer<LLImageGL>& dest, U32 width, U32 height, U8 components, bool usemipmaps = true);
+ static bool create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, bool usemipmaps = true);
public:
- LLImageGL(BOOL usemipmaps = TRUE);
- LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps = TRUE);
- LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps = TRUE);
+ LLImageGL(bool usemipmaps = true);
+ LLImageGL(U32 width, U32 height, U8 components, bool usemipmaps = true);
+ LLImageGL(const LLImageRaw* imageraw, bool usemipmaps = true);
// For wrapping textures created via GL elsewhere with our API only. Use with caution.
LLImageGL(LLGLuint mTexName, U32 components, LLGLenum target, LLGLint formatInternal, LLGLenum formatPrimary, LLGLenum formatType, LLTexUnit::eTextureAddressMode addressMode);
@@ -112,29 +112,29 @@ public:
static void setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression = true);
- BOOL createGLTexture() ;
- BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE,
+ bool createGLTexture() ;
+ bool createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, bool to_create = true,
S32 category = sMaxCategories-1, bool defer_copy = false, LLGLuint* tex_name = nullptr);
- BOOL createGLTexture(S32 discard_level, const U8* data, BOOL data_hasmips = FALSE, S32 usename = 0, bool defer_copy = false, LLGLuint* tex_name = nullptr);
+ bool createGLTexture(S32 discard_level, const U8* data, bool data_hasmips = false, S32 usename = 0, bool defer_copy = false, LLGLuint* tex_name = nullptr);
void setImage(const LLImageRaw* imageraw);
- BOOL setImage(const U8* data_in, BOOL data_hasmips = FALSE, S32 usename = 0);
+ bool setImage(const U8* data_in, bool data_hasmips = false, S32 usename = 0);
// *TODO: This function may not work if the textures is compressed (i.e.
// RenderCompressTextures is 0). Partial image updates do not work on
// compressed textures.
- BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE, LLGLuint use_name = 0);
- BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE, LLGLuint use_name = 0);
- BOOL setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height);
+ bool setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, bool force_fast_update = false, LLGLuint use_name = 0);
+ bool setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, bool force_fast_update = false, LLGLuint use_name = 0);
+ bool setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height);
// wait for gl commands to finish on current thread and push
// a lambda to main thread to swap mNewTexName and mTexName
void syncToMainThread(LLGLuint new_tex_name);
// Read back a raw image for this discard level, if it exists
- BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const;
+ bool readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const;
void destroyGLTexture();
void forceToInvalidateGLTexture();
- void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
+ void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, bool swap_bytes = false);
void setComponents(S8 ncomponents) { mComponents = ncomponents; }
S32 getDiscardLevel() const { return mCurrentDiscardLevel; }
@@ -147,18 +147,18 @@ public:
U8 getComponents() const { return mComponents; }
S64 getBytes(S32 discard_level = -1) const;
S64 getMipBytes(S32 discard_level = -1) const;
- BOOL getBoundRecently() const;
+ bool getBoundRecently() const;
bool isJustBound() const;
- BOOL getHasExplicitFormat() const { return mHasExplicitFormat; }
+ bool getHasExplicitFormat() const { return mHasExplicitFormat; }
LLGLenum getPrimaryFormat() const { return mFormatPrimary; }
LLGLenum getFormatType() const { return mFormatType; }
- BOOL getHasGLTexture() const { return mTexName != 0; }
+ bool getHasGLTexture() const { return mTexName != 0; }
LLGLuint getTexName() const { return mTexName; }
- BOOL getIsAlphaMask() const;
+ bool getIsAlphaMask() const;
- BOOL getIsResident(BOOL test_now = FALSE); // not const
+ bool getIsResident(bool test_now = false); // not const
void setTarget(const LLGLenum target, const LLTexUnit::eTextureType bind_target);
@@ -166,11 +166,11 @@ public:
bool isGLTextureCreated(void) const { return mGLTextureCreated ; }
void setGLTextureCreated (bool initialized) { mGLTextureCreated = initialized; }
- BOOL getUseMipMaps() const { return mUseMipMaps; }
- void setUseMipMaps(BOOL usemips) { mUseMipMaps = usemips; }
- void setHasMipMaps(BOOL hasmips) { mHasMipMaps = hasmips; }
+ bool getUseMipMaps() const { return mUseMipMaps; }
+ void setUseMipMaps(bool usemips) { mUseMipMaps = usemips; }
+ void setHasMipMaps(bool hasmips) { mHasMipMaps = hasmips; }
void updatePickMask(S32 width, S32 height, const U8* data_in);
- BOOL getMask(const LLVector2 &tc);
+ bool getMask(const LLVector2 &tc);
void checkTexSize(bool forced = false) const ;
@@ -192,12 +192,12 @@ public:
U32 getTexelsInGLTexture()const {return mTexelsInGLTexture;}
- void init(BOOL usemipmaps);
+ void init(bool usemipmaps);
virtual void cleanup(); // Clean up the LLImageGL so it can be reinitialized. Be careful when using this in derived class destructors
- void setNeedsAlphaAndPickMask(BOOL need_mask);
+ void setNeedsAlphaAndPickMask(bool need_mask);
- BOOL preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image);
+ bool preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image);
void postAddToAtlas() ;
#if LL_IMAGEGL_THREAD_CHECK
@@ -222,11 +222,11 @@ private:
U16 mPickMaskWidth;
U16 mPickMaskHeight;
S8 mUseMipMaps;
- BOOL mHasExplicitFormat; // If false (default), GL format is f(mComponents)
+ bool mHasExplicitFormat; // If false (default), GL format is f(mComponents)
bool mAutoGenMips = false;
- BOOL mIsMask;
- BOOL mNeedsAlphaAndPickMask;
+ bool mIsMask;
+ bool mNeedsAlphaAndPickMask;
S8 mAlphaStride ;
S8 mAlphaOffset ;
@@ -261,9 +261,9 @@ protected:
LLGLint mFormatInternal; // = GL internalformat
LLGLenum mFormatPrimary; // = GL format (pixel data format)
LLGLenum mFormatType;
- BOOL mFormatSwapBytes;// if true, use glPixelStorei(GL_UNPACK_SWAP_BYTES, 1)
+ bool mFormatSwapBytes;// if true, use glPixelStorei(GL_UNPACK_SWAP_BYTES, 1)
- BOOL mExternalTexture;
+ bool mExternalTexture;
// STATICS
public:
@@ -275,28 +275,28 @@ public:
// Global memory statistics
static U32 sBindCount; // Tracks number of texture binds for current frame
static U32 sUniqueCount; // Tracks number of unique texture binds for current frame
- static BOOL sGlobalUseAnisotropic;
+ static bool sGlobalUseAnisotropic;
static LLImageGL* sDefaultGLTexture ;
- static BOOL sAutomatedTest;
+ static bool sAutomatedTest;
static bool sCompressTextures; //use GL texture compression
#if DEBUG_MISS
- BOOL mMissed; // Missed on last bind?
- BOOL getMissed() const { return mMissed; };
+ bool mMissed; // Missed on last bind?
+ bool getMissed() const { return mMissed; };
#else
- BOOL getMissed() const { return FALSE; };
+ bool getMissed() const { return false; };
#endif
public:
- static void initClass(LLWindow* window, S32 num_catagories, BOOL skip_analyze_alpha = false, bool thread_texture_loads = false, bool thread_media_updates = false);
+ static void initClass(LLWindow* window, S32 num_catagories, bool skip_analyze_alpha = false, bool thread_texture_loads = false, bool thread_media_updates = false);
static void cleanupClass() ;
private:
static S32 sMaxCategories;
- static BOOL sSkipAnalyzeAlpha;
+ static bool sSkipAnalyzeAlpha;
//the flag to allow to call readBackRaw(...).
//can be removed if we do not use that function at all.
- static BOOL sAllowReadBackRaw ;
+ static bool sAllowReadBackRaw ;
//
//****************************************************************************************************
//The below for texture auditing use only
@@ -317,7 +317,7 @@ public:
static S32 sCurTexSizeBar ;
static S32 sCurTexPickSize ;
- static void setCurTexSizebar(S32 index, BOOL set_pick_size = TRUE) ;
+ static void setCurTexSizebar(S32 index, bool set_pick_size = true) ;
static void resetCurTexSizebar();
//****************************************************************************************************
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index 0f8655132b..6e1375c65f 100644
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -165,7 +165,7 @@ void LLPostProcess::invalidate()
mSceneRenderTexture = NULL ;
mNoiseTexture = NULL ;
mTempBloomTexture = NULL ;
- initialized = FALSE ;
+ initialized = false ;
}
void LLPostProcess::apply(unsigned int width, unsigned int height)
@@ -367,7 +367,7 @@ void LLPostProcess::createTexture(LLPointer<LLImageGL>& texture, unsigned int wi
{
std::vector<GLubyte> data(width * height * 4, 0) ;
- texture = new LLImageGL(FALSE) ;
+ texture = new LLImageGL(false) ;
if(texture->createGLTexture())
{
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, texture->getTexName());
@@ -387,7 +387,7 @@ void LLPostProcess::createNoiseTexture(LLPointer<LLImageGL>& texture)
}
}
- texture = new LLImageGL(FALSE) ;
+ texture = new LLImageGL(false) ;
if(texture->createGLTexture())
{
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, texture->getTexName());
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index ee66122774..66252facc4 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1079,7 +1079,7 @@ void LLRender::syncMatrices()
if (shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX))
{
glh::matrix4f inv_proj = mat.inverse();
- shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
+ shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, false, inv_proj.m);
}
// Used by some full screen effects - such as full screen lights, glow, etc.
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index df1169b315..aeaf3c3db0 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -91,13 +91,13 @@ void gl_draw_x(const LLRect& rect, const LLColor4& color)
}
-void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, S32 pixel_offset, BOOL filled)
+void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, S32 pixel_offset, bool filled)
{
gGL.color4fv(color.mV);
gl_rect_2d_offset_local(left, top, right, bottom, pixel_offset, filled);
}
-void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset, BOOL filled)
+void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset, bool filled)
{
gGL.pushUIMatrix();
left += LLFontGL::sCurOrigin.mX;
@@ -115,7 +115,7 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixe
}
-void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
+void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, bool filled )
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -143,14 +143,14 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
}
}
-void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, BOOL filled )
+void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, bool filled )
{
gGL.color4fv( color.mV );
gl_rect_2d( left, top, right, bottom, filled );
}
-void gl_rect_2d( const LLRect& rect, const LLColor4& color, BOOL filled )
+void gl_rect_2d( const LLRect& rect, const LLColor4& color, bool filled )
{
gGL.color4fv( color.mV );
gl_rect_2d( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, filled );
@@ -243,7 +243,7 @@ void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color )
gGL.end();
}
-void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColor4& color, BOOL filled)
+void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColor4& color, bool filled)
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -322,7 +322,7 @@ void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image,
gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color, uv_rect );
}
-void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect, bool scale_inner)
+void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4& color, bool solid_color, const LLRectf& uv_rect, bool scale_inner)
{
if (NULL == image)
{
@@ -338,7 +338,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border
gl_draw_scaled_image_with_border(x, y, width, height, image, color, solid_color, uv_rect, scale_rect, scale_inner);
}
-void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_outer_rect, const LLRectf& center_rect, bool scale_inner)
+void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, bool solid_color, const LLRectf& uv_outer_rect, const LLRectf& center_rect, bool scale_inner)
{
stop_glerror();
@@ -729,7 +729,7 @@ void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& c
LLRender2D::getInstance()->setLineWidth(1.f);
}
-void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F32 start_angle, F32 end_angle)
+void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled, F32 start_angle, F32 end_angle)
{
if (end_angle < start_angle)
{
@@ -772,7 +772,7 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F
gGL.popUIMatrix();
}
-void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled)
+void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled)
{
gGL.pushUIMatrix();
{
@@ -833,7 +833,7 @@ void gl_deep_circle( F32 radius, F32 depth, S32 steps )
gGL.end();
}
-void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center )
+void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, bool render_center )
{
gGL.pushUIMatrix();
{
diff --git a/indra/llrender/llrender2dutils.h b/indra/llrender/llrender2dutils.h
index 298b357a38..63bb9c1317 100644
--- a/indra/llrender/llrender2dutils.h
+++ b/indra/llrender/llrender2dutils.h
@@ -48,25 +48,25 @@ void gl_state_for_2d(S32 width, S32 height);
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2);
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color );
-void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColor4& color, BOOL filled);
+void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColor4& color, bool filled);
void gl_rect_2d_simple( S32 width, S32 height );
void gl_draw_x(const LLRect& rect, const LLColor4& color);
-void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled = TRUE );
-void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, BOOL filled = TRUE );
-void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, S32 pixel_offset = 0, BOOL filled = TRUE );
-void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset = 0, BOOL filled = TRUE );
-void gl_rect_2d(const LLRect& rect, BOOL filled = TRUE );
-void gl_rect_2d(const LLRect& rect, const LLColor4& color, BOOL filled = TRUE );
+void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, bool filled = true );
+void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, bool filled = true );
+void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, S32 pixel_offset = 0, bool filled = true );
+void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset = 0, bool filled = true );
+void gl_rect_2d(const LLRect& rect, bool filled = true );
+void gl_rect_2d(const LLRect& rect, const LLColor4& color, bool filled = true );
void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha = 1.0f);
void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &start_color, S32 lines);
-void gl_circle_2d(F32 x, F32 y, F32 radius, S32 steps, BOOL filled);
-void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F32 start_angle, F32 end_angle);
+void gl_circle_2d(F32 x, F32 y, F32 radius, S32 steps, bool filled);
+void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled, F32 start_angle, F32 end_angle);
void gl_deep_circle( F32 radius, F32 depth );
-void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center );
+void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, bool render_center );
void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max_frac);
void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians, F32 end_radians, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
@@ -76,8 +76,8 @@ void gl_draw_scaled_target(S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), LLRenderTarget* target = NULL);
-void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), bool scale_inner = true);
-void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f), bool scale_inner = true);
+void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4 &color, bool solid_color = false, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), bool scale_inner = true);
+void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4 &color, bool solid_color = false, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f), bool scale_inner = true);
void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color);
@@ -110,12 +110,12 @@ void gl_segmented_rect_2d_tex(const S32 left, const S32 top, const S32 right, co
void gl_segmented_rect_2d_fragment_tex(const LLRect& rect, const S32 texture_width, const S32 texture_height, const S32 border_size, const F32 start_fragment, const F32 end_fragment, const U32 edges = ROUNDED_RECT_ALL);
void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect, const LLVector3& width_vec, const LLVector3& height_vec);
-inline void gl_rect_2d( const LLRect& rect, BOOL filled )
+inline void gl_rect_2d( const LLRect& rect, bool filled )
{
gl_rect_2d( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, filled );
}
-inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, BOOL filled)
+inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, bool filled)
{
gl_rect_2d_offset_local( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, pixel_offset, filled );
}
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index f78be910d2..edb5f65e1f 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -65,14 +65,14 @@ LLShaderMgr * LLShaderMgr::instance()
return sInstance;
}
-BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
+bool LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
llassert_always(shader != NULL);
LLShaderFeatures *features = & shader->mFeatures;
if (features->attachNothing)
{
- return TRUE;
+ return true;
}
//////////////////////////////////////
// Attach Vertex Shader Features First
@@ -83,7 +83,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("windlight/atmosphericsVarsV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -91,7 +91,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("windlight/atmosphericsHelpersV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -101,40 +101,40 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("lighting/lightFuncSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
if (!features->isAlphaLighting)
{
if (!shader->attachVertexObject("lighting/sumLightsSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("lighting/lightSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachVertexObject("lighting/lightFuncV.glsl"))
{
- return FALSE;
+ return false;
}
if (!features->isAlphaLighting)
{
if (!shader->attachVertexObject("lighting/sumLightsV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("lighting/lightV.glsl"))
{
- return FALSE;
+ return false;
}
}
}
@@ -144,16 +144,16 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("environment/srgbF.glsl")) // NOTE -- "F" suffix is superfluous here, there is nothing fragment specific in srgbF
{
- return FALSE;
+ return false;
}
if (!shader->attachVertexObject("windlight/atmosphericsFuncs.glsl")) {
- return FALSE;
+ return false;
}
if (!shader->attachVertexObject("windlight/atmosphericsV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -161,7 +161,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("avatar/avatarSkinV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -170,13 +170,13 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
shader->mRiggedVariant = shader;
if (!shader->attachVertexObject("avatar/objectSkinV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("deferred/textureUtilV.glsl"))
{
- return FALSE;
+ return false;
}
///////////////////////////////////////
@@ -188,7 +188,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/srgbF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -196,7 +196,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/atmosphericsVarsF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -204,7 +204,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/atmosphericsHelpersF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -213,7 +213,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/deferredUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -221,7 +221,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/screenSpaceReflUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -229,7 +229,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/shadowUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -237,7 +237,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/reflectionProbeF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -245,7 +245,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/aoUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -253,7 +253,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/gammaF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -261,19 +261,19 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/encodeNormF.glsl"))
{
- return FALSE;
+ return false;
}
}
if (features->hasAtmospherics || features->isDeferred)
{
if (!shader->attachFragmentObject("windlight/atmosphericsFuncs.glsl")) {
- return FALSE;
+ return false;
}
if (!shader->attachFragmentObject("windlight/atmosphericsF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -282,7 +282,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/waterFogF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -294,14 +294,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachFragmentObject("lighting/lightNonIndexedF.glsl"))
{
- return FALSE;
+ return false;
}
}
}
@@ -311,14 +311,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("lighting/lightAlphaMaskF.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachFragmentObject("lighting/lightF.glsl"))
{
- return FALSE;
+ return false;
}
}
shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
@@ -329,18 +329,18 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("objects/nonindexedTextureV.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachVertexObject("objects/indexedTextureV.glsl"))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//============================================================================
@@ -414,7 +414,7 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLchar** shader_code_t
LL_CONT << LL_ENDL;
}
-void LLShaderMgr::dumpObjectLog(GLuint ret, BOOL warns, const std::string& filename)
+void LLShaderMgr::dumpObjectLog(GLuint ret, bool warns, const std::string& filename)
{
std::string log;
log = get_object_log(ret);
@@ -853,7 +853,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
{
//an error occured, print log
LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
- dumpObjectLog(ret, TRUE, open_file_name);
+ dumpObjectLog(ret, true, open_file_name);
dumpShaderSource(shader_code_count, shader_code_text);
glDeleteShader(ret); //no longer need handle
ret = 0;
@@ -895,7 +895,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
return ret;
}
-BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
+bool LLShaderMgr::linkProgramObject(GLuint obj, bool suppress_errors)
{
//check for errors
{
@@ -912,7 +912,7 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
//an error occured, print log
LL_SHADER_LOADING_WARNS() << "GLSL Linker Error:" << LL_ENDL;
- dumpObjectLog(obj, TRUE, "linker");
+ dumpObjectLog(obj, true, "linker");
return success;
}
}
@@ -923,12 +923,12 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
LL_SHADER_LOADING_WARNS() << "GLSL Linker: Running in Software:" << LL_ENDL;
success = GL_FALSE;
- suppress_errors = FALSE;
+ suppress_errors = false;
}
return success;
}
-BOOL LLShaderMgr::validateProgramObject(GLuint obj)
+bool LLShaderMgr::validateProgramObject(GLuint obj)
{
//check program validity against current GL
glValidateProgram(obj);
@@ -941,7 +941,7 @@ BOOL LLShaderMgr::validateProgramObject(GLuint obj)
}
else
{
- dumpObjectLog(obj, FALSE);
+ dumpObjectLog(obj, false);
}
return success;
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 79a24773e1..781fcd95e0 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -296,11 +296,11 @@ public:
virtual void initAttribsAndUniforms(void);
- BOOL attachShaderFeatures(LLGLSLShader * shader);
- void dumpObjectLog(GLuint ret, BOOL warns = TRUE, const std::string& filename = "");
+ bool attachShaderFeatures(LLGLSLShader * shader);
+ void dumpObjectLog(GLuint ret, bool warns = true, const std::string& filename = "");
void dumpShaderSource(U32 shader_code_count, GLchar** shader_code_text);
- BOOL linkProgramObject(GLuint obj, BOOL suppress_errors = FALSE);
- BOOL validateProgramObject(GLuint obj);
+ bool linkProgramObject(GLuint obj, bool suppress_errors = false);
+ bool validateProgramObject(GLuint obj);
GLuint loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1);
// Implemented in the application to actually point to the shader directory.
diff --git a/indra/llrender/lltexturemanagerbridge.h b/indra/llrender/lltexturemanagerbridge.h
index f61433ea4d..bbbbbf9f9e 100644
--- a/indra/llrender/lltexturemanagerbridge.h
+++ b/indra/llrender/lltexturemanagerbridge.h
@@ -36,8 +36,8 @@ class LLTextureManagerBridge
public:
virtual ~LLTextureManagerBridge() {}
- virtual LLPointer<LLGLTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE) = 0;
- virtual LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) = 0;
+ virtual LLPointer<LLGLTexture> getLocalTexture(bool usemipmaps = true, bool generate_gl_tex = true) = 0;
+ virtual LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex = true) = 0;
virtual LLGLTexture* getFetchedTexture(const LLUUID &image_id) = 0;
};
diff --git a/indra/llrender/lluiimage.inl b/indra/llrender/lluiimage.inl
index f5227556f0..8fee1c68c3 100644
--- a/indra/llrender/lluiimage.inl
+++ b/indra/llrender/lluiimage.inl
@@ -36,7 +36,7 @@ void LLUIImage::draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color)
width, height,
mImage,
color,
- FALSE,
+ false,
mClipRegion,
mScaleRegion,
mScaleStyle == SCALE_INNER);
@@ -49,7 +49,7 @@ void LLUIImage::drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& c
width, height,
mImage,
color,
- TRUE,
+ true,
mClipRegion,
mScaleRegion,
mScaleStyle == SCALE_INNER);
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index f2d146d4bb..38ca799165 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -253,7 +253,7 @@ private:
: LLVertexBuffer(typemask)
{}
- bool allocateBuffer(S32 nverts, S32 nindices, BOOL create) { return allocateBuffer(nverts, nindices); }
+ bool allocateBuffer(S32 nverts, S32 nindices, bool create) { return allocateBuffer(nverts, nindices); }
public:
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4ffd9198a2..930c5e4947 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -943,7 +943,7 @@ bool LLAppViewer::init()
//
// Initialize the window
//
- gGLActive = TRUE;
+ gGLActive = true;
initWindow();
LL_INFOS("InitInfo") << "Window is initialized." << LL_ENDL ;
@@ -1129,7 +1129,7 @@ bool LLAppViewer::init()
LLNotificationsUtil::add("CorruptedProtectedDataStore");
}
- gGLActive = FALSE;
+ gGLActive = false;
#if LL_RELEASE_FOR_DOWNLOAD
// Skip updater if this is a non-interactive instance
@@ -1510,7 +1510,7 @@ bool LLAppViewer::doFrame()
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df Display");
pingMainloopTimeout("Main:Display");
- gGLActive = TRUE;
+ gGLActive = true;
display();
@@ -1521,7 +1521,7 @@ bool LLAppViewer::doFrame()
gPipeline.mReflectionMapManager.update();
LLFloaterSnapshot::update(); // take snapshots
LLFloaterSimpleSnapshot::update();
- gGLActive = FALSE;
+ gGLActive = false;
}
if (LLViewerStatsRecorder::instanceExists())
@@ -2738,7 +2738,7 @@ bool LLAppViewer::initConfiguration()
std::string test_name(gSavedSettings.getString("LogMetrics"));
if (! test_name.empty())
{
- LLTrace::BlockTimer::sMetricLog = TRUE;
+ LLTrace::BlockTimer::sMetricLog = true;
// '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
// In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...)
LL_INFOS() << "'--logmetrics' argument : " << test_name << LL_ENDL;
@@ -2762,16 +2762,16 @@ bool LLAppViewer::initConfiguration()
if (gSavedSettings.getBOOL("DebugSession"))
{
- gDebugSession = TRUE;
- gDebugGL = TRUE;
+ gDebugSession = true;
+ gDebugGL = true;
ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log"));
}
if (gSavedSettings.getBOOL("RenderDebugGLSession"))
{
- gDebugGLSession = TRUE;
- gDebugGL = TRUE;
+ gDebugGLSession = true;
+ gDebugGL = true;
// gDebugGL can cause excessive logging
// so it's limited to a single session
gSavedSettings.setBOOL("RenderDebugGLSession", FALSE);
@@ -4642,13 +4642,13 @@ void LLAppViewer::idle()
if (LLStartUp::getStartupState() < STATE_STARTED)
{
// Skip rest if idle startup returns false (essentially, no world yet)
- gGLActive = TRUE;
+ gGLActive = true;
if (!idle_startup())
{
- gGLActive = FALSE;
+ gGLActive = false;
return;
}
- gGLActive = FALSE;
+ gGLActive = false;
}
@@ -4989,7 +4989,7 @@ void LLAppViewer::idle()
// forcibly quit if it has taken too long
if (mQuitRequested)
{
- gGLActive = TRUE;
+ gGLActive = true;
idleShutdown();
}
}
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 41101e79a6..775d27221b 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -529,7 +529,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
}
#endif
- gGLActive = TRUE;
+ gGLActive = true;
viewer_app_ptr->cleanup();
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 77a196380b..04b56f5055 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1104,7 +1104,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
// Note: bump will still point at GPU copy of dst_image
bump_ptr->setExplicitFormat(GL_RGBA, GL_RGBA);
LLGLuint tex_name;
- img->createGLTexture(0, nullptr, 0, 0, true, &tex_name);
+ img->createGLTexture(0, nullptr, false, 0, true, &tex_name);
// point render target at empty buffer
sRenderTarget.setColorAttachment(img, tex_name);
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 425acd3392..1a09c78164 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -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);
}
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 2df4ca973d..ca93bf9012 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -917,7 +917,7 @@ void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
// store in the image list so it doesn't try to fetch from the server
LLPointer<LLViewerFetchedTexture> image_in_list =
LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid);
- image_in_list->createGLTexture(0, mImageRaw, 0, TRUE, LLGLTexture::OTHER);
+ image_in_list->createGLTexture(0, mImageRaw, 0, true, LLGLTexture::OTHER);
// the texture picker then uses that texture
LLTextureCtrl* texture = getChild<LLTextureCtrl>("screenshot");
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 6a4b3dfb5b..de519a03c2 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -2980,7 +2980,7 @@ void LLViewerMediaImpl::doMediaTexUpdate(LLViewerMediaTexture* media_tex, U8* da
// -Cosmic,2023-04-04
// Allocate GL texture based on LLImageRaw but do NOT copy to GL
LLGLuint tex_name = 0;
- media_tex->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER, true, &tex_name);
+ media_tex->createGLTexture(0, raw, 0, true, LLGLTexture::OTHER, true, &tex_name);
// copy just the subimage covered by the image raw to GL
media_tex->setSubImage(data, data_width, data_height, x_pos, y_pos, width, height, tex_name);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 89b7b3ba0d..fab125982c 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -342,12 +342,12 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const
// Create a bridge to the viewer texture manager.
class LLViewerTextureManagerBridge : public LLTextureManagerBridge
{
- /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE)
+ /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(bool usemipmaps = true, bool generate_gl_tex = true)
{
return LLViewerTextureManager::getLocalTexture(usemipmaps, generate_gl_tex);
}
- /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE)
+ /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex = true)
{
return LLViewerTextureManager::getLocalTexture(width, height, components, usemipmaps, generate_gl_tex);
}
@@ -1355,7 +1355,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
if(isForSculptOnly())
{
//just update some variables, not to create a real GL texture.
- createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE);
+ createGLTexture(mRawDiscardLevel, mRawImage, 0, false);
mNeedsCreateTexture = false;
destroyRawImage();
}
@@ -1540,7 +1540,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
return FALSE;
}
- BOOL res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
+ BOOL res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, true, mBoostLevel);
return res;
}
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index db197335f2..0840d945a8 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -207,7 +207,7 @@ void LLSkyTex::create()
void LLSkyTex::createGLImage(S32 which)
{
mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA);
- mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL);
+ mTexture[which]->createGLTexture(0, mImageRaw[which], 0, true, LLGLTexture::LOCAL);
mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
}