summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-08-09 17:11:19 -0700
committerRichard Linden <none@none>2013-08-09 17:11:19 -0700
commite340009fc59d59e59b2e8d903a884acb76b178eb (patch)
tree6c42d6e0031ef1dbe841fd05cd5d62d5b6b48525 /indra/llrender
parent8d3daa141e9ea14f533559843d77ab5c0f715421 (diff)
second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
Diffstat (limited to 'indra/llrender')
-rwxr-xr-xindra/llrender/llcubemap.cpp2
-rwxr-xr-xindra/llrender/llfontfreetype.cpp10
-rwxr-xr-xindra/llrender/llfontgl.cpp8
-rwxr-xr-xindra/llrender/llfontregistry.cpp30
-rwxr-xr-xindra/llrender/llgl.cpp48
-rwxr-xr-xindra/llrender/llgldbg.cpp82
-rwxr-xr-xindra/llrender/llglslshader.cpp32
-rw-r--r--indra/llrender/llgltexture.h2
-rw-r--r--indra/llrender/llimagegl.cpp86
-rwxr-xr-xindra/llrender/llimagegl.h2
-rwxr-xr-xindra/llrender/llpostprocess.cpp2
-rwxr-xr-xindra/llrender/llrender.cpp78
-rw-r--r--indra/llrender/llrender2dutils.cpp10
-rwxr-xr-xindra/llrender/llrendertarget.cpp24
-rwxr-xr-xindra/llrender/llshadermgr.cpp12
-rwxr-xr-xindra/llrender/llvertexbuffer.cpp102
-rwxr-xr-xindra/llrender/llvertexbuffer.h2
17 files changed, 266 insertions, 266 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 362452d837..77b4019b7c 100755
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -100,7 +100,7 @@ void LLCubeMap::initGL()
}
else
{
- llwarns << "Using cube map without extension!" << llendl;
+ LL_WARNS() << "Using cube map without extension!" << LL_ENDL;
}
}
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 058bef43a5..4cc5b78b63 100755
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -75,7 +75,7 @@ LLFontManager::LLFontManager()
if (error)
{
// Clean up freetype libs.
- llerrs << "Freetype initialization failure!" << llendl;
+ LL_ERRS() << "Freetype initialization failure!" << LL_ENDL;
FT_Done_FreeType(gFTLibrary);
}
}
@@ -189,7 +189,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
if (!mFTFace->charmap)
{
- //llinfos << " no unicode encoding, set whatever encoding there is..." << llendl;
+ //LL_INFOS() << " no unicode encoding, set whatever encoding there is..." << LL_ENDL;
FT_Set_Charmap(mFTFace, mFTFace->charmaps[0]);
}
@@ -321,7 +321,7 @@ LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const
return FALSE;
llassert(!mIsFallback);
- //lldebugs << "Adding new glyph for " << wch << " to font" << llendl;
+ //LL_DEBUGS() << "Adding new glyph for " << wch << " to font" << LL_ENDL;
FT_UInt glyph_index;
@@ -329,7 +329,7 @@ LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const
glyph_index = FT_Get_Char_Index(mFTFace, wch);
if (glyph_index == 0)
{
- //llinfos << "Trying to add glyph from fallback font!" << llendl;
+ //LL_INFOS() << "Trying to add glyph from fallback font!" << LL_ENDL;
font_vector_t::const_iterator iter;
for(iter = mFallbackFonts.begin(); iter != mFallbackFonts.end(); iter++)
{
@@ -501,7 +501,7 @@ void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi)
// This is the head of the list - need to rebuild ourself and all fallbacks.
if (mFallbackFonts.empty())
{
- llwarns << "LLFontGL::reset(), no fallback fonts present" << llendl;
+ LL_WARNS() << "LLFontGL::reset(), no fallback fonts present" << LL_ENDL;
}
else
{
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index a646a0d35a..ce5757a6ae 100755
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -276,7 +276,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
}
if (!fgi)
{
- llerrs << "Missing Glyph Info" << llendl;
+ LL_ERRS() << "Missing Glyph Info" << LL_ENDL;
break;
}
// Per-glyph bitmap texture.
@@ -1070,7 +1070,7 @@ std::string LLFontGL::getFontPathSystem()
system_root = getenv("SystemRoot"); /* Flawfinder: ignore */
if (!system_root)
{
- llwarns << "SystemRoot not found, attempting to load fonts from default path." << llendl;
+ LL_WARNS() << "SystemRoot not found, attempting to load fonts from default path." << LL_ENDL;
}
#endif
@@ -1115,12 +1115,12 @@ std::string LLFontGL::getFontPathLocal()
LLFontGL::LLFontGL(const LLFontGL &source)
{
- llerrs << "Not implemented!" << llendl;
+ LL_ERRS() << "Not implemented!" << LL_ENDL;
}
LLFontGL &LLFontGL::operator=(const LLFontGL &source)
{
- llerrs << "Not implemented" << llendl;
+ LL_ERRS() << "Not implemented" << LL_ENDL;
return *this;
}
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index 77aa3fcd2c..d003687415 100755
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -200,7 +200,7 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
if ( root.isNull() || ! root->hasName( "fonts" ) )
{
- llwarns << "Bad font info file: " << *path_it << llendl;
+ LL_WARNS() << "Bad font info file: " << *path_it << LL_ENDL;
continue;
}
@@ -353,10 +353,10 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
bool found_size = nameToSize(norm_desc.getSize(),point_size);
if (!found_size)
{
- llwarns << "createFont unrecognized size " << norm_desc.getSize() << llendl;
+ LL_WARNS() << "createFont unrecognized size " << norm_desc.getSize() << LL_ENDL;
return NULL;
}
- llinfos << "createFont " << norm_desc.getName() << " size " << norm_desc.getSize() << " style " << ((S32) norm_desc.getStyle()) << llendl;
+ LL_INFOS() << "createFont " << norm_desc.getName() << " size " << norm_desc.getSize() << " style " << ((S32) norm_desc.getStyle()) << LL_ENDL;
F32 fallback_scale = 1.0;
// Find corresponding font template (based on same descriptor with no size specified)
@@ -365,8 +365,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
const LLFontDescriptor *match_desc = getClosestFontTemplate(template_desc);
if (!match_desc)
{
- llwarns << "createFont failed, no template found for "
- << norm_desc.getName() << " style [" << ((S32)norm_desc.getStyle()) << "]" << llendl;
+ LL_WARNS() << "createFont failed, no template found for "
+ << norm_desc.getName() << " style [" << ((S32)norm_desc.getStyle()) << "]" << LL_ENDL;
return NULL;
}
@@ -379,7 +379,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
// This may not be the best solution, but it at least prevents a crash.
if (it != mFontMap.end() && it->second != NULL)
{
- llinfos << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << llendl;
+ LL_INFOS() << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << LL_ENDL;
// copying underlying Freetype font, and storing in LLFontGL with requested font descriptor
LLFontGL *font = new LLFontGL;
@@ -412,7 +412,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
// Load fonts based on names.
if (file_names.empty())
{
- llwarns << "createFont failed, no file names specified" << llendl;
+ LL_WARNS() << "createFont failed, no file names specified" << LL_ENDL;
return NULL;
}
@@ -480,7 +480,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
}
else
{
- llwarns << "createFont failed in some way" << llendl;
+ LL_WARNS() << "createFont failed in some way" << LL_ENDL;
}
mFontMap[desc] = result;
@@ -533,9 +533,9 @@ LLFontGL *LLFontRegistry::getFont(const LLFontDescriptor& desc)
LLFontGL *fontp = createFont(desc);
if (!fontp)
{
- llwarns << "getFont failed, name " << desc.getName()
+ LL_WARNS() << "getFont failed, name " << desc.getName()
<<" style=[" << ((S32) desc.getStyle()) << "]"
- << " size=[" << desc.getSize() << "]" << llendl;
+ << " size=[" << desc.getSize() << "]" << LL_ENDL;
}
return fontp;
}
@@ -638,28 +638,28 @@ const LLFontDescriptor *LLFontRegistry::getClosestFontTemplate(const LLFontDescr
void LLFontRegistry::dump()
{
- llinfos << "LLFontRegistry dump: " << llendl;
+ LL_INFOS() << "LLFontRegistry dump: " << LL_ENDL;
for (font_size_map_t::iterator size_it = mFontSizes.begin();
size_it != mFontSizes.end();
++size_it)
{
- llinfos << "Size: " << size_it->first << " => " << size_it->second << llendl;
+ LL_INFOS() << "Size: " << size_it->first << " => " << size_it->second << LL_ENDL;
}
for (font_reg_map_t::iterator font_it = mFontMap.begin();
font_it != mFontMap.end();
++font_it)
{
const LLFontDescriptor& desc = font_it->first;
- llinfos << "Font: name=" << desc.getName()
+ LL_INFOS() << "Font: name=" << desc.getName()
<< " style=[" << ((S32)desc.getStyle()) << "]"
<< " size=[" << desc.getSize() << "]"
<< " fileNames="
- << llendl;
+ << LL_ENDL;
for (string_vec_t::const_iterator file_it=desc.getFileNames().begin();
file_it != desc.getFileNames().end();
++file_it)
{
- llinfos << " file: " << *file_it <<llendl;
+ LL_INFOS() << " file: " << *file_it <<LL_ENDL;
}
}
}
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 088ba95b75..e20bd6cf9d 100755
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -82,20 +82,20 @@ void APIENTRY gl_debug_callback(GLenum source,
{
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
- llwarns << "----- GL ERROR --------" << llendl;
+ LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
}
else
{
- llwarns << "----- GL WARNING -------" << llendl;
+ LL_WARNS() << "----- GL WARNING -------" << LL_ENDL;
}
- llwarns << "Type: " << std::hex << type << llendl;
- llwarns << "ID: " << std::hex << id << llendl;
- llwarns << "Severity: " << std::hex << severity << llendl;
- llwarns << "Message: " << message << llendl;
- llwarns << "-----------------------" << llendl;
+ LL_WARNS() << "Type: " << std::hex << type << LL_ENDL;
+ LL_WARNS() << "ID: " << std::hex << id << LL_ENDL;
+ LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
+ LL_WARNS() << "Message: " << message << LL_ENDL;
+ LL_WARNS() << "-----------------------" << LL_ENDL;
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
- llerrs << "Halting on GL Error" << llendl;
+ LL_ERRS() << "Halting on GL Error" << LL_ENDL;
}
}
#endif
@@ -541,7 +541,7 @@ bool LLGLManager::initGL()
{
std::string ext((const char*) glGetStringi(GL_EXTENSIONS, i));
str << ext << " ";
- LL_DEBUGS("GLExtensions") << ext << llendl;
+ LL_DEBUGS("GLExtensions") << ext << LL_ENDL;
}
{
@@ -1009,7 +1009,7 @@ void LLGLManager::initExtensions()
#endif
#if LL_LINUX || LL_SOLARIS
- llinfos << "initExtensions() checking shell variables to adjust features..." << llendl;
+ LL_INFOS() << "initExtensions() checking shell variables to adjust features..." << LL_ENDL;
// Our extension support for the Linux Client is very young with some
// potential driver gotchas, so offer a semi-secret way to turn it off.
if (getenv("LL_GL_NOEXT"))
@@ -1202,7 +1202,7 @@ void LLGLManager::initExtensions()
}
if (mHasFramebufferObject)
{
- llinfos << "initExtensions() FramebufferObject-related procs..." << llendl;
+ LL_INFOS() << "initExtensions() FramebufferObject-related procs..." << LL_ENDL;
glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsRenderbuffer");
glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindRenderbuffer");
glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteRenderbuffers");
@@ -1270,7 +1270,7 @@ void LLGLManager::initExtensions()
if (mHasOcclusionQuery)
{
- llinfos << "initExtensions() OcclusionQuery-related procs..." << llendl;
+ LL_INFOS() << "initExtensions() OcclusionQuery-related procs..." << LL_ENDL;
glGenQueriesARB = (PFNGLGENQUERIESARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGenQueriesARB");
glDeleteQueriesARB = (PFNGLDELETEQUERIESARBPROC)GLH_EXT_GET_PROC_ADDRESS("glDeleteQueriesARB");
glIsQueryARB = (PFNGLISQUERYARBPROC)GLH_EXT_GET_PROC_ADDRESS("glIsQueryARB");
@@ -1282,14 +1282,14 @@ void LLGLManager::initExtensions()
}
if (mHasTimerQuery)
{
- llinfos << "initExtensions() TimerQuery-related procs..." << llendl;
+ LL_INFOS() << "initExtensions() TimerQuery-related procs..." << LL_ENDL;
glQueryCounter = (PFNGLQUERYCOUNTERPROC) GLH_EXT_GET_PROC_ADDRESS("glQueryCounter");
glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjecti64v");
glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) GLH_EXT_GET_PROC_ADDRESS("glGetQueryObjectui64v");
}
if (mHasPointParameters)
{
- llinfos << "initExtensions() PointParameters-related procs..." << llendl;
+ LL_INFOS() << "initExtensions() PointParameters-related procs..." << LL_ENDL;
glPointParameterfARB = (PFNGLPOINTPARAMETERFARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfARB");
glPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfvARB");
}
@@ -1337,7 +1337,7 @@ void LLGLManager::initExtensions()
}
if (mHasVertexShader)
{
- llinfos << "initExtensions() VertexShader-related procs..." << llendl;
+ LL_INFOS() << "initExtensions() VertexShader-related procs..." << LL_ENDL;
glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocationARB");
glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocationARB");
glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttribARB");
@@ -1438,13 +1438,13 @@ void log_glerror()
GLubyte const * gl_error_msg = gluErrorString(error);
if (NULL != gl_error_msg)
{
- llwarns << "GL Error: " << error << " GL Error String: " << gl_error_msg << llendl ;
+ LL_WARNS() << "GL Error: " << error << " GL Error String: " << gl_error_msg << LL_ENDL ;
}
else
{
// gluErrorString returns NULL for some extensions' error codes.
// you'll probably have to grep for the number in glext.h.
- llwarns << "GL Error: UNKNOWN 0x" << std::hex << error << std::dec << llendl;
+ LL_WARNS() << "GL Error: UNKNOWN 0x" << std::hex << error << std::dec << LL_ENDL;
}
error = glGetError();
}
@@ -1492,7 +1492,7 @@ void do_assert_glerror()
}
else
{
- llerrs << "One or more unhandled GL errors." << llendl;
+ LL_ERRS() << "One or more unhandled GL errors." << LL_ENDL;
}
}
}
@@ -1501,7 +1501,7 @@ void assert_glerror()
{
if (!gGLActive)
{
- //llwarns << "GL used while not active!" << llendl;
+ //LL_WARNS() << "GL used while not active!" << LL_ENDL;
if (gDebugSession)
{
@@ -1785,7 +1785,7 @@ void LLGLState::checkTextureChannels(const std::string& msg)
if (tex != 0)
{
error = TRUE;
- LL_WARNS("RenderState") << "Texture channel " << i << " still has texture " << tex << " bound." << llendl;
+ LL_WARNS("RenderState") << "Texture channel " << i << " still has texture " << tex << " bound." << LL_ENDL;
if (gDebugSession)
{
@@ -1829,7 +1829,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
if (active_texture != GL_TEXTURE0_ARB)
{
- llwarns << "Client active texture corrupted: " << active_texture << llendl;
+ LL_WARNS() << "Client active texture corrupted: " << active_texture << LL_ENDL;
if (gDebugSession)
{
gFailLog << "Client active texture corrupted: " << active_texture << std::endl;
@@ -1840,7 +1840,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
/*glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &active_texture);
if (active_texture != GL_TEXTURE0_ARB)
{
- llwarns << "Active texture corrupted: " << active_texture << llendl;
+ LL_WARNS() << "Active texture corrupted: " << active_texture << LL_ENDL;
if (gDebugSession)
{
gFailLog << "Active texture corrupted: " << active_texture << std::endl;
@@ -2337,11 +2337,11 @@ void LLGLNamePool::release(GLuint name)
}
else
{
- llerrs << "Attempted to release a pooled name that is not in use!" << llendl;
+ LL_ERRS() << "Attempted to release a pooled name that is not in use!" << LL_ENDL;
}
}
}
- llerrs << "Attempted to release a non pooled name!" << llendl;
+ LL_ERRS() << "Attempted to release a non pooled name!" << LL_ENDL;
#else
releaseName(name);
#endif
diff --git a/indra/llrender/llgldbg.cpp b/indra/llrender/llgldbg.cpp
index 4b68194db3..0f1d4ae742 100755
--- a/indra/llrender/llgldbg.cpp
+++ b/indra/llrender/llgldbg.cpp
@@ -112,112 +112,112 @@ void llgl_dump()
F32 fv[16];
GLboolean b;
- llinfos << "==========================" << llendl;
- llinfos << "OpenGL State" << llendl;
- llinfos << "==========================" << llendl;
+ LL_INFOS() << "==========================" << LL_ENDL;
+ LL_INFOS() << "OpenGL State" << LL_ENDL;
+ LL_INFOS() << "==========================" << LL_ENDL;
- llinfos << "-----------------------------------" << llendl;
- llinfos << "Current Values" << llendl;
- llinfos << "-----------------------------------" << llendl;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
+ LL_INFOS() << "Current Values" << LL_ENDL;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
glGetFloatv(GL_CURRENT_COLOR, fv);
- llinfos << "GL_CURRENT_COLOR : " << fv4(fv) << llendl;
+ LL_INFOS() << "GL_CURRENT_COLOR : " << fv4(fv) << LL_ENDL;
glGetFloatv(GL_CURRENT_NORMAL, fv);
- llinfos << "GL_CURRENT_NORMAL : " << fv3(fv) << llendl;
+ LL_INFOS() << "GL_CURRENT_NORMAL : " << fv3(fv) << LL_ENDL;
- llinfos << "-----------------------------------" << llendl;
- llinfos << "Lighting" << llendl;
- llinfos << "-----------------------------------" << llendl;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
+ LL_INFOS() << "Lighting" << LL_ENDL;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
- llinfos << "GL_LIGHTING : " << boolstr(glIsEnabled(GL_LIGHTING)) << llendl;
+ LL_INFOS() << "GL_LIGHTING : " << boolstr(glIsEnabled(GL_LIGHTING)) << LL_ENDL;
- llinfos << "GL_COLOR_MATERIAL : " << boolstr(glIsEnabled(GL_COLOR_MATERIAL)) << llendl;
+ LL_INFOS() << "GL_COLOR_MATERIAL : " << boolstr(glIsEnabled(GL_COLOR_MATERIAL)) << LL_ENDL;
glGetIntegerv(GL_COLOR_MATERIAL_PARAMETER, (GLint*)&i);
- llinfos << "GL_COLOR_MATERIAL_PARAMETER: " << cmstr(i) << llendl;
+ LL_INFOS() << "GL_COLOR_MATERIAL_PARAMETER: " << cmstr(i) << LL_ENDL;
glGetIntegerv(GL_COLOR_MATERIAL_FACE, (GLint*)&i);
- llinfos << "GL_COLOR_MATERIAL_FACE : " << facestr(i) << llendl;
+ LL_INFOS() << "GL_COLOR_MATERIAL_FACE : " << facestr(i) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_AMBIENT, fv);
- llinfos << "GL_AMBIENT material : " << fv4(fv) << llendl;
+ LL_INFOS() << "GL_AMBIENT material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_DIFFUSE, fv);
- llinfos << "GL_DIFFUSE material : " << fv4(fv) << llendl;
+ LL_INFOS() << "GL_DIFFUSE material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_SPECULAR, fv);
- llinfos << "GL_SPECULAR material : " << fv4(fv) << llendl;
+ LL_INFOS() << "GL_SPECULAR material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_EMISSION, fv);
- llinfos << "GL_EMISSION material : " << fv4(fv) << llendl;
+ LL_INFOS() << "GL_EMISSION material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_SHININESS, fv);
- llinfos << "GL_SHININESS material : " << fv1(fv) << llendl;
+ LL_INFOS() << "GL_SHININESS material : " << fv1(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetFloatv(GL_LIGHT_MODEL_AMBIENT, fv);
- llinfos << "GL_LIGHT_MODEL_AMBIENT : " << fv4(fv) << llendl;
+ LL_INFOS() << "GL_LIGHT_MODEL_AMBIENT : " << fv4(fv) << LL_ENDL;
glGetBooleanv(GL_LIGHT_MODEL_LOCAL_VIEWER, &b);
- llinfos << "GL_LIGHT_MODEL_LOCAL_VIEWER: " << boolstr(b) << llendl;
+ LL_INFOS() << "GL_LIGHT_MODEL_LOCAL_VIEWER: " << boolstr(b) << LL_ENDL;
glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &b);
- llinfos << "GL_LIGHT_MODEL_TWO_SIDE : " << boolstr(b) << llendl;
+ LL_INFOS() << "GL_LIGHT_MODEL_TWO_SIDE : " << boolstr(b) << LL_ENDL;
for (int l=0; l<8; l++)
{
b = glIsEnabled(GL_LIGHT0+l);
- llinfos << "GL_LIGHT" << l << " : " << boolstr(b) << llendl;
+ LL_INFOS() << "GL_LIGHT" << l << " : " << boolstr(b) << LL_ENDL;
if (!b)
continue;
glGetLightfv(GL_LIGHT0+l, GL_AMBIENT, fv);
- llinfos << " GL_AMBIENT light : " << fv4(fv) << llendl;
+ LL_INFOS() << " GL_AMBIENT light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_DIFFUSE, fv);
- llinfos << " GL_DIFFUSE light : " << fv4(fv) << llendl;
+ LL_INFOS() << " GL_DIFFUSE light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPECULAR, fv);
- llinfos << " GL_SPECULAR light : " << fv4(fv) << llendl;
+ LL_INFOS() << " GL_SPECULAR light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_POSITION, fv);
- llinfos << " GL_POSITION light : " << fv4(fv) << llendl;
+ LL_INFOS() << " GL_POSITION light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_CONSTANT_ATTENUATION, fv);
- llinfos << " GL_CONSTANT_ATTENUATION : " << fv1(fv) << llendl;
+ LL_INFOS() << " GL_CONSTANT_ATTENUATION : " << fv1(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_QUADRATIC_ATTENUATION, fv);
- llinfos << " GL_QUADRATIC_ATTENUATION : " << fv1(fv) << llendl;
+ LL_INFOS() << " GL_QUADRATIC_ATTENUATION : " << fv1(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPOT_DIRECTION, fv);
- llinfos << " GL_SPOT_DIRECTION : " << fv4(fv) << llendl;
+ LL_INFOS() << " GL_SPOT_DIRECTION : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPOT_EXPONENT, fv);
- llinfos << " GL_SPOT_EXPONENT : " << fv1(fv) << llendl;
+ LL_INFOS() << " GL_SPOT_EXPONENT : " << fv1(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPOT_CUTOFF, fv);
- llinfos << " GL_SPOT_CUTOFF : " << fv1(fv) << llendl;
+ LL_INFOS() << " GL_SPOT_CUTOFF : " << fv1(fv) << LL_ENDL;
}
- llinfos << "-----------------------------------" << llendl;
- llinfos << "Pixel Operations" << llendl;
- llinfos << "-----------------------------------" << llendl;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
+ LL_INFOS() << "Pixel Operations" << LL_ENDL;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
- llinfos << "GL_ALPHA_TEST : " << boolstr(glIsEnabled(GL_ALPHA_TEST)) << llendl;
- llinfos << "GL_DEPTH_TEST : " << boolstr(glIsEnabled(GL_DEPTH_TEST)) << llendl;
+ LL_INFOS() << "GL_ALPHA_TEST : " << boolstr(glIsEnabled(GL_ALPHA_TEST)) << LL_ENDL;
+ LL_INFOS() << "GL_DEPTH_TEST : " << boolstr(glIsEnabled(GL_DEPTH_TEST)) << LL_ENDL;
glGetBooleanv(GL_DEPTH_WRITEMASK, &b);
- llinfos << "GL_DEPTH_WRITEMASK : " << boolstr(b) << llendl;
+ LL_INFOS() << "GL_DEPTH_WRITEMASK : " << boolstr(b) << LL_ENDL;
- llinfos << "GL_BLEND : " << boolstr(glIsEnabled(GL_BLEND)) << llendl;
- llinfos << "GL_DITHER : " << boolstr(glIsEnabled(GL_DITHER)) << llendl;
+ LL_INFOS() << "GL_BLEND : " << boolstr(glIsEnabled(GL_BLEND)) << LL_ENDL;
+ LL_INFOS() << "GL_DITHER : " << boolstr(glIsEnabled(GL_DITHER)) << LL_ENDL;
}
// End
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index ac16e30796..dce74a9153 100755
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -137,10 +137,10 @@ void LLGLSLShader::finishProfile()
(*iter)->dumpStats();
}
- llinfos << "-----------------------------------" << llendl;
- llinfos << "Total rendering time: " << llformat("%.4f ms", sTotalTimeElapsed/1000000.f) << llendl;
- llinfos << "Total samples drawn: " << llformat("%.4f million", sTotalSamplesDrawn/1000000.f) << llendl;
- llinfos << "Total triangles drawn: " << llformat("%.3f million", sTotalTrianglesDrawn/1000000.f) << llendl;
+ LL_INFOS() << "-----------------------------------" << LL_ENDL;
+ LL_INFOS() << "Total rendering time: " << llformat("%.4f ms", sTotalTimeElapsed/1000000.f) << LL_ENDL;
+ LL_INFOS() << "Total samples drawn: " << llformat("%.4f million", sTotalSamplesDrawn/1000000.f) << LL_ENDL;
+ LL_INFOS() << "Total triangles drawn: " << llformat("%.3f million", sTotalTrianglesDrawn/1000000.f) << LL_ENDL;
}
void LLGLSLShader::clearStats()
@@ -158,11 +158,11 @@ void LLGLSLShader::dumpStats()
{
if (mDrawCalls > 0)
{
- llinfos << "=============================================" << llendl;
- llinfos << mName << llendl;
+ LL_INFOS() << "=============================================" << LL_ENDL;
+ LL_INFOS() << mName << LL_ENDL;
for (U32 i = 0; i < mShaderFiles.size(); ++i)
{
- llinfos << mShaderFiles[i].first << llendl;
+ LL_INFOS() << mShaderFiles[i].first << LL_ENDL;
}
for (U32 i = 0; i < mTexture.size(); ++i)
{
@@ -171,10 +171,10 @@ void LLGLSLShader::dumpStats()
if (idx >= 0)
{
GLint uniform_idx = getUniformLocation(i);
- llinfos << mUniformNameMap[uniform_idx] << " - " << std::hex << mTextureMagFilter[i] << "/" << mTextureMinFilter[i] << std::dec << llendl;
+ LL_INFOS() << mUniformNameMap[uniform_idx] << " - " << std::hex << mTextureMagFilter[i] << "/" << mTextureMinFilter[i] << std::dec << LL_ENDL;
}
}
- llinfos << "=============================================" << llendl;
+ LL_INFOS() << "=============================================" << LL_ENDL;
F32 ms = mTimeElapsed/1000000.f;
F32 seconds = ms/1000.f;
@@ -190,10 +190,10 @@ void LLGLSLShader::dumpStats()
F32 pct_calls = (F32) mDrawCalls/(F32)sTotalDrawCalls*100.f;
U32 avg_batch = mTrianglesDrawn/mDrawCalls;
- llinfos << "Triangles Drawn: " << mTrianglesDrawn << " " << llformat("(%.2f pct of total, %.3f million/sec)", pct_tris, tris_sec ) << llendl;
- llinfos << "Draw Calls: " << mDrawCalls << " " << llformat("(%.2f pct of total, avg %d tris/call)", pct_calls, avg_batch) << llendl;
- llinfos << "SamplesDrawn: " << mSamplesDrawn << " " << llformat("(%.2f pct of total, %.3f billion/sec)", pct_samples, samples_sec) << llendl;
- llinfos << "Time Elapsed: " << mTimeElapsed << " " << llformat("(%.2f pct of total, %.5f ms)\n", (F32) ((F64)mTimeElapsed/(F64)sTotalTimeElapsed)*100.f, ms) << llendl;
+ LL_INFOS() << "Triangles Drawn: " << mTrianglesDrawn << " " << llformat("(%.2f pct of total, %.3f million/sec)", pct_tris, tris_sec ) << LL_ENDL;
+ LL_INFOS() << "Draw Calls: " << mDrawCalls << " " << llformat("(%.2f pct of total, avg %d tris/call)", pct_calls, avg_batch) << LL_ENDL;
+ LL_INFOS() << "SamplesDrawn: " << mSamplesDrawn << " " << llformat("(%.2f pct of total, %.3f billion/sec)", pct_samples, samples_sec) << LL_ENDL;
+ LL_INFOS() << "Time Elapsed: " << mTimeElapsed << " " << llformat("(%.2f pct of total, %.5f ms)\n", (F32) ((F64)mTimeElapsed/(F64)sTotalTimeElapsed)*100.f, ms) << LL_ENDL;
}
}
@@ -703,7 +703,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<string> * uniforms)
unbind();
- LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << llendl;
+ LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << LL_ENDL;
return res;
}
@@ -849,7 +849,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode)
}
else
{
- llerrs << "Texture channel " << index << " texture type corrupted." << llendl;
+ LL_ERRS() << "Texture channel " << index << " texture type corrupted." << LL_ENDL;
}
}
gGL.getTexUnit(index)->disable();
@@ -1149,7 +1149,7 @@ GLint LLGLSLShader::getUniformLocation(const string& uniform)
stop_glerror();
if (iter->second != glGetUniformLocationARB(mProgramObject, uniform.c_str()))
{
- llerrs << "Uniform does not match." << llendl;
+ LL_ERRS() << "Uniform does not match." << LL_ENDL;
}
stop_glerror();
}
diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index e69b322d60..6b85f81aee 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -101,7 +101,7 @@ public:
LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ;
- virtual void dump(); // debug info to llinfos
+ virtual void dump(); // debug info to LL_INFOS()
virtual const LLUUID& getID() const = 0;
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 1d4be1f53c..1d1beafff8 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -117,7 +117,7 @@ void LLImageGL::checkTexSize(bool forced) const
BOOL error = FALSE;
if (texname != mTexName)
{
- llinfos << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << llendl;
+ LL_INFOS() << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << LL_ENDL;
error = TRUE;
if (gDebugSession)
@@ -126,7 +126,7 @@ void LLImageGL::checkTexSize(bool forced) const
}
else
{
- llerrs << "Invalid texture bound!" << llendl;
+ LL_ERRS() << "Invalid texture bound!" << LL_ENDL;
}
}
stop_glerror() ;
@@ -150,8 +150,8 @@ void LLImageGL::checkTexSize(bool forced) const
}
else
{
- llerrs << "wrong texture size and discard level: width: " <<
- mWidth << " Height: " << mHeight << " Current Level: " << (S32)mCurrentDiscardLevel << llendl ;
+ LL_ERRS() << "wrong texture size and discard level: width: " <<
+ mWidth << " Height: " << mHeight << " Current Level: " << (S32)mCurrentDiscardLevel << LL_ENDL ;
}
}
@@ -200,7 +200,7 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
case GL_RGBA: return 32;
case GL_BGRA: return 32; // Used for QuickTime media textures on the Mac
default:
- llerrs << "LLImageGL::Unknown format: " << dataformat << llendl;
+ LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL;
return 0;
}
}
@@ -235,7 +235,7 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
case GL_RGBA: return 4;
case GL_BGRA: return 4; // Used for QuickTime media textures on the Mac
default:
- llerrs << "LLImageGL::Unknown format: " << dataformat << llendl;
+ LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL;
return 0;
}
}
@@ -301,7 +301,7 @@ void LLImageGL::restoreGL()
LLImageGL* glimage = *iter;
if(glimage->getTexName())
{
- llerrs << "tex name is not 0." << llendl ;
+ LL_ERRS() << "tex name is not 0." << LL_ENDL ;
}
if (glimage->mSaveData.notNull())
{
@@ -490,12 +490,12 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
// Check if dimensions are a power of two!
if (!checkSize(width,height))
{
- llerrs << llformat("Texture has non power of two dimension: %dx%d",width,height) << llendl;
+ LL_ERRS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << LL_ENDL;
}
if (mTexName)
{
-// llwarns << "Setting Size of LLImageGL with existing mTexName = " << mTexName << llendl;
+// LL_WARNS() << "Setting Size of LLImageGL with existing mTexName = " << mTexName << LL_ENDL;
destroyGLTexture();
}
@@ -534,7 +534,7 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
// virtual
void LLImageGL::dump()
{
- llinfos << "mMaxDiscardLevel " << S32(mMaxDiscardLevel)
+ LL_INFOS() << "mMaxDiscardLevel " << S32(mMaxDiscardLevel)
<< " mLastBindTime " << mLastBindTime
<< " mTarget " << S32(mTarget)
<< " mBindTarget " << S32(mBindTarget)
@@ -549,12 +549,12 @@ void LLImageGL::dump()
#if DEBUG_MISS
<< " mMissed " << mMissed
#endif
- << llendl;
+ << LL_ENDL;
- llinfos << " mTextureMemory " << mTextureMemory
+ LL_INFOS() << " mTextureMemory " << mTextureMemory
<< " mTexNames " << mTexName
<< " mIsResident " << S32(mIsResident)
- << llendl;
+ << LL_ENDL;
}
//----------------------------------------------------------------------------
@@ -836,7 +836,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
}
else
{
- llerrs << "Compressed Image has mipmaps but data does not (can not auto generate compressed mips)" << llendl;
+ LL_ERRS() << "Compressed Image has mipmaps but data does not (can not auto generate compressed mips)" << LL_ENDL;
}
}
else
@@ -885,7 +885,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
if (gGLManager.mIsDisabled)
{
- llwarns << "Trying to create a texture while GL is disabled!" << llendl;
+ LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
return FALSE;
}
llassert(gGLManager.mInited);
@@ -931,7 +931,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
mFormatType = GL_UNSIGNED_BYTE;
break;
default:
- llerrs << "Bad number of components for texture: " << (U32)getComponents() << llendl;
+ LL_ERRS() << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL;
}
}
@@ -975,13 +975,13 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
if (mTexName == 0)
{
// *TODO: Re-enable warning? Ran into thread locking issues? DK 2011-02-18
- //llwarns << "Setting subimage on image without GL texture" << llendl;
+ //LL_WARNS() << "Setting subimage on image without GL texture" << LL_ENDL;
return FALSE;
}
if (datap == NULL)
{
// *TODO: Re-enable warning? Ran into thread locking issues? DK 2011-02-18
- //llwarns << "Setting subimage on image with NULL datap" << llendl;
+ //LL_WARNS() << "Setting subimage on image with NULL datap" << LL_ENDL;
return FALSE;
}
@@ -995,7 +995,7 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
if (mUseMipMaps)
{
dump();
- llerrs << "setSubImage called with mipmapped image (not supported)" << llendl;
+ LL_ERRS() << "setSubImage called with mipmapped image (not supported)" << LL_ENDL;
}
llassert_always(mCurrentDiscardLevel == 0);
llassert_always(x_pos >= 0 && y_pos >= 0);
@@ -1004,28 +1004,28 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
(y_pos + height) > getHeight())
{
dump();
- llerrs << "Subimage not wholly in target image!"
+ LL_ERRS() << "Subimage not wholly in target image!"
<< " x_pos " << x_pos
<< " y_pos " << y_pos
<< " width " << width
<< " height " << height
<< " getWidth() " << getWidth()
<< " getHeight() " << getHeight()
- << llendl;
+ << LL_ENDL;
}
if ((x_pos + width) > data_width ||
(y_pos + height) > data_height)
{
dump();
- llerrs << "Subimage not wholly in source image!"
+ LL_ERRS() << "Subimage not wholly in source image!"
<< " x_pos " << x_pos
<< " y_pos " << y_pos
<< " width " << width
<< " height " << height
<< " source_width " << data_width
<< " source_height " << data_height
- << llendl;
+ << LL_ENDL;
}
@@ -1041,7 +1041,7 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
datap += (y_pos * data_width + x_pos) * getComponents();
// Update the GL texture
BOOL res = gGL.getTexUnit(0)->bindManual(mBindTarget, mTexName);
- if (!res) llerrs << "LLImageGL::setSubImage(): bindTexture failed" << llendl;
+ if (!res) LL_ERRS() << "LLImageGL::setSubImage(): bindTexture failed" << LL_ENDL;
stop_glerror();
glTexSubImage2D(mTarget, 0, x_pos, y_pos,
@@ -1257,7 +1257,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
intformat = GL_COMPRESSED_ALPHA;
break;
default:
- llwarns << "Could not compress format: " << std::hex << intformat << llendl;
+ LL_WARNS() << "Could not compress format: " << std::hex << intformat << LL_ENDL;
break;
}
}
@@ -1280,7 +1280,7 @@ BOOL LLImageGL::createGLTexture()
LLFastTimer t(FTM_CREATE_GL_TEXTURE1);
if (gGLManager.mIsDisabled)
{
- llwarns << "Trying to create a texture while GL is disabled!" << llendl;
+ LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
return FALSE;
}
@@ -1299,7 +1299,7 @@ BOOL LLImageGL::createGLTexture()
stop_glerror();
if (!mTexName)
{
- llerrs << "LLImageGL::createGLTexture failed to make an empty texture" << llendl;
+ LL_ERRS() << "LLImageGL::createGLTexture failed to make an empty texture" << LL_ENDL;
}
return TRUE ;
@@ -1311,7 +1311,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
LLFastTimer t(FTM_CREATE_GL_TEXTURE2);
if (gGLManager.mIsDisabled)
{
- llwarns << "Trying to create a texture while GL is disabled!" << llendl;
+ LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
return FALSE;
}
@@ -1361,7 +1361,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
mFormatType = GL_UNSIGNED_BYTE;
break;
default:
- llerrs << "Bad number of components for texture: " << (U32)getComponents() << llendl;
+ LL_ERRS() << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL;
}
calcAlphaChannelOffsetAndStride() ;
@@ -1423,7 +1423,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
}
if (!mTexName)
{
- llerrs << "LLImageGL::createGLTexture failed to make texture" << llendl;
+ LL_ERRS() << "LLImageGL::createGLTexture failed to make texture" << LL_ENDL;
}
if (mUseMipMaps)
@@ -1472,7 +1472,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const
{
llassert_always(sAllowReadBackRaw) ;
- //llerrs << "should not call this function!" << llendl ;
+ //LL_ERRS() << "should not call this function!" << LL_ENDL ;
if (discard_level < 0)
{
@@ -1510,15 +1510,15 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
}
if(width < glwidth)
{
- llwarns << "texture size is smaller than it should be." << llendl ;
- llwarns << "width: " << width << " glwidth: " << glwidth << " mWidth: " << mWidth <<
- " mCurrentDiscardLevel: " << (S32)mCurrentDiscardLevel << " discard_level: " << (S32)discard_level << llendl ;
+ 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 ;
}
if (width <= 0 || width > 2048 || height <= 0 || height > 2048 || ncomponents < 1 || ncomponents > 4)
{
- llerrs << llformat("LLImageGL::readBackRaw: bogus params: %d x %d x %d",width,height,ncomponents) << llendl;
+ LL_ERRS() << llformat("LLImageGL::readBackRaw: bogus params: %d x %d x %d",width,height,ncomponents) << LL_ENDL;
}
LLGLint is_compressed = 0;
@@ -1531,7 +1531,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
GLenum error ;
while((error = glGetError()) != GL_NO_ERROR)
{
- llwarns << "GL Error happens before reading back texture. Error code: " << error << llendl ;
+ LL_WARNS() << "GL Error happens before reading back texture. Error code: " << error << LL_ENDL ;
}
//-----------------------------------------------------------------------------------------------
@@ -1541,8 +1541,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, (GLint*)&glbytes);
if(!imageraw->allocateDataSize(width, height, ncomponents, glbytes))
{
- llwarns << "Memory allocation failed for reading back texture. Size is: " << glbytes << llendl ;
- llwarns << "width: " << width << "height: " << height << "components: " << ncomponents << llendl ;
+ 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 ;
}
@@ -1553,8 +1553,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
{
if(!imageraw->allocateDataSize(width, height, ncomponents))
{
- llwarns << "Memory allocation failed for reading back texture." << llendl ;
- llwarns << "width: " << width << "height: " << height << "components: " << ncomponents << llendl ;
+ LL_WARNS() << "Memory allocation failed for reading back texture." << LL_ENDL ;
+ LL_WARNS() << "width: " << width << "height: " << height << "components: " << ncomponents << LL_ENDL ;
return FALSE ;
}
@@ -1565,12 +1565,12 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
//-----------------------------------------------------------------------------------------------
if((error = glGetError()) != GL_NO_ERROR)
{
- llwarns << "GL Error happens after reading back texture. Error code: " << error << llendl ;
+ LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ;
imageraw->deleteData() ;
while((error = glGetError()) != GL_NO_ERROR)
{
- llwarns << "GL Error happens after reading back texture. Error code: " << error << llendl ;
+ LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ;
}
return FALSE ;
@@ -1854,7 +1854,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride()
mAlphaOffset < 0 || //unsupported type
(mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE)) //unknown situation
{
- llwarns << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << llendl;
+ LL_WARNS() << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << LL_ENDL;
mNeedsAlphaAndPickMask = FALSE ;
mIsMask = FALSE;
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 227ccc90bd..c38b8d3cfa 100755
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -99,7 +99,7 @@ protected:
void calcAlphaChannelOffsetAndStride();
public:
- virtual void dump(); // debugging info to llinfos
+ virtual void dump(); // debugging info to LL_INFOS()
void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1);
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index e4279ea1e0..84caa045cc 100755
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -145,7 +145,7 @@ void LLPostProcess::saveEffect(std::string const & effectName)
mAllEffects[effectName] = tweaks;
std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
- //llinfos << "Saving PostProcess Effects settings to " << pathName << llendl;
+ //LL_INFOS() << "Saving PostProcess Effects settings to " << pathName << LL_ENDL;
llofstream effectsXML(pathName);
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 918f5585a8..c104a93773 100755
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -232,7 +232,7 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind)
LLImageGL* gl_tex = NULL ;
if (texture == NULL || !(gl_tex = texture->getGLTexture()))
{
- llwarns << "NULL LLTexUnit::bind texture" << llendl;
+ LL_WARNS() << "NULL LLTexUnit::bind texture" << LL_ENDL;
return false;
}
@@ -280,7 +280,7 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind)
if(!texture)
{
- llwarns << "NULL LLTexUnit::bind texture" << llendl;
+ LL_WARNS() << "NULL LLTexUnit::bind texture" << LL_ENDL;
return false;
}
@@ -330,7 +330,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
if (cubeMap == NULL)
{
- llwarns << "NULL LLTexUnit::bind cubemap" << llendl;
+ LL_WARNS() << "NULL LLTexUnit::bind cubemap" << LL_ENDL;
return false;
}
@@ -354,7 +354,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
}
else
{
- llwarns << "Using cube map without extension!" << llendl;
+ LL_WARNS() << "Using cube map without extension!" << LL_ENDL;
return false;
}
}
@@ -372,7 +372,7 @@ bool LLTexUnit::bind(LLRenderTarget* renderTarget, bool bindDepth)
{
if (renderTarget->hasStencil())
{
- llerrs << "Cannot bind a render buffer for sampling. Allocate render target without a stencil buffer if sampling of depth buffer is required." << llendl;
+ LL_ERRS() << "Cannot bind a render buffer for sampling. Allocate render target without a stencil buffer if sampling of depth buffer is required." << LL_ENDL;
}
bindManual(renderTarget->getUsage(), renderTarget->getDepth());
@@ -498,7 +498,7 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio
{
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gGL.mMaxAnisotropy);
- llinfos << "gGL.mMaxAnisotropy: " << gGL.mMaxAnisotropy << llendl ;
+ LL_INFOS() << "gGL.mMaxAnisotropy: " << gGL.mMaxAnisotropy << LL_ENDL ;
gGL.mMaxAnisotropy = llmax(1.f, gGL.mMaxAnisotropy) ;
}
glTexParameterf(sGLTextureType[mCurrTexType], GL_TEXTURE_MAX_ANISOTROPY_EXT, gGL.mMaxAnisotropy);
@@ -552,7 +552,7 @@ void LLTexUnit::setTextureBlendType(eTextureBlendType type)
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);
break;
default:
- llerrs << "Unknown Texture Blend Type: " << type << llendl;
+ LL_ERRS() << "Unknown Texture Blend Type: " << type << LL_ENDL;
break;
}
setColorScale(scale_amount);
@@ -592,7 +592,7 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src)
return GL_CONSTANT_ARB;
default:
- llwarns << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << llendl;
+ LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << LL_ENDL;
return GL_PRIMARY_COLOR_ARB;
}
}
@@ -630,7 +630,7 @@ GLint LLTexUnit::getTextureSourceType(eTextureBlendSrc src, bool isAlpha)
return GL_ONE_MINUS_SRC_ALPHA;
default:
- llwarns << "Unknown eTextureBlendSrc: " << src << ". Using Source Color or Alpha instead." << llendl;
+ LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Source Color or Alpha instead." << LL_ENDL;
return (isAlpha) ? GL_SRC_ALPHA: GL_SRC_COLOR;
}
}
@@ -771,7 +771,7 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT
break;
default:
- llwarns << "Unknown eTextureBlendOp: " << op << ". Setting op to replace." << llendl;
+ LL_WARNS() << "Unknown eTextureBlendOp: " << op << ". Setting op to replace." << LL_ENDL;
// Slightly special syntax (no second sources), just set all and return.
glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, src0_enum, source1);
@@ -819,7 +819,7 @@ void LLTexUnit::debugTextureUnit(void)
if ((GL_TEXTURE0_ARB + mIndex) != activeTexture)
{
U32 set_unit = (activeTexture - GL_TEXTURE0_ARB);
- llwarns << "Incorrect Texture Unit! Expected: " << set_unit << " Actual: " << mIndex << llendl;
+ LL_WARNS() << "Incorrect Texture Unit! Expected: " << set_unit << " Actual: " << mIndex << LL_ENDL;
}
}
@@ -1388,7 +1388,7 @@ void LLRender::pushMatrix()
}
else
{
- llwarns << "Matrix stack overflow." << llendl;
+ LL_WARNS() << "Matrix stack overflow." << LL_ENDL;
}
}
}
@@ -1404,7 +1404,7 @@ void LLRender::popMatrix()
}
else
{
- llwarns << "Matrix stack underflow." << llendl;
+ LL_WARNS() << "Matrix stack underflow." << LL_ENDL;
}
}
}
@@ -1477,7 +1477,7 @@ void LLRender::translateUI(F32 x, F32 y, F32 z)
{
if (mUIOffset.empty())
{
- llerrs << "Need to push a UI translation frame before offsetting" << llendl;
+ LL_ERRS() << "Need to push a UI translation frame before offsetting" << LL_ENDL;
}
mUIOffset.back().mV[0] += x;
@@ -1489,7 +1489,7 @@ void LLRender::scaleUI(F32 x, F32 y, F32 z)
{
if (mUIScale.empty())
{
- llerrs << "Need to push a UI transformation frame before scaling." << llendl;
+ LL_ERRS() << "Need to push a UI transformation frame before scaling." << LL_ENDL;
}
mUIScale.back().scaleVec(LLVector3(x,y,z));
@@ -1520,7 +1520,7 @@ void LLRender::popUIMatrix()
{
if (mUIOffset.empty())
{
- llerrs << "UI offset stack blown." << llendl;
+ LL_ERRS() << "UI offset stack blown." << LL_ENDL;
}
mUIOffset.pop_back();
mUIScale.pop_back();
@@ -1549,7 +1549,7 @@ void LLRender::loadUIIdentity()
{
if (mUIOffset.empty())
{
- llerrs << "Need to push UI translation frame before clearing offset." << llendl;
+ LL_ERRS() << "Need to push UI translation frame before clearing offset." << LL_ENDL;
}
mUIOffset.back().setVec(0,0,0);
mUIScale.back().setVec(1,1,1);
@@ -1607,7 +1607,7 @@ void LLRender::setSceneBlendType(eBlendType type)
blendFunc(BF_ONE, BF_ZERO);
break;
default:
- llerrs << "Unknown Scene Blend Type: " << type << llendl;
+ LL_ERRS() << "Unknown Scene Blend Type: " << type << LL_ENDL;
break;
}
}
@@ -1648,7 +1648,7 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
if (cur_func != sGLCompareFunc[func])
{
- llerrs << "Alpha test function corrupted!" << llendl;
+ LL_ERRS() << "Alpha test function corrupted!" << LL_ENDL;
}
F32 ref = 0.f;
@@ -1656,7 +1656,7 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
if (ref != value)
{
- llerrs << "Alpha test value corrupted!" << llendl;
+ LL_ERRS() << "Alpha test value corrupted!" << LL_ENDL;
}
}
}
@@ -1686,7 +1686,7 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor,
llassert(alpha_dfactor < BF_UNDEF);
if (!gGLManager.mHasBlendFuncSeparate)
{
- LL_WARNS_ONCE("render") << "no glBlendFuncSeparateEXT(), using color-only blend func" << llendl;
+ LL_WARNS_ONCE("render") << "no glBlendFuncSeparateEXT(), using color-only blend func" << LL_ENDL;
blendFunc(color_sfactor, color_dfactor);
return;
}
@@ -1711,7 +1711,7 @@ LLTexUnit* LLRender::getTexUnit(U32 index)
}
else
{
- lldebugs << "Non-existing texture unit layer requested: " << index << llendl;
+ LL_DEBUGS() << "Non-existing texture unit layer requested: " << index << LL_ENDL;
return mDummyTexUnit;
}
}
@@ -1747,7 +1747,7 @@ bool LLRender::verifyTexUnitActive(U32 unitToVerify)
}
else
{
- llwarns << "TexUnit currently active: " << mCurrTextureUnitIndex << " (expecting " << unitToVerify << ")" << llendl;
+ LL_WARNS() << "TexUnit currently active: " << mCurrTextureUnitIndex << " (expecting " << unitToVerify << ")" << LL_ENDL;
return false;
}
}
@@ -1778,7 +1778,7 @@ void LLRender::begin(const GLuint& mode)
}
else if (mCount != 0)
{
- llerrs << "gGL.begin() called redundantly." << llendl;
+ LL_ERRS() << "gGL.begin() called redundantly." << LL_ENDL;
}
mMode = mode;
@@ -1790,7 +1790,7 @@ void LLRender::end()
if (mCount == 0)
{
return;
- //IMM_ERRS << "GL begin and end called with no vertices specified." << llendl;
+ //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
}
if ((mMode != LLRender::QUADS &&
@@ -1809,22 +1809,22 @@ void LLRender::flush()
#if 0
if (!glIsEnabled(GL_VERTEX_ARRAY))
{
- llerrs << "foo 1" << llendl;
+ LL_ERRS() << "foo 1" << LL_ENDL;
}
if (!glIsEnabled(GL_COLOR_ARRAY))
{
- llerrs << "foo 2" << llendl;
+ LL_ERRS() << "foo 2" << LL_ENDL;
}
if (!glIsEnabled(GL_TEXTURE_COORD_ARRAY))
{
- llerrs << "foo 3" << llendl;
+ LL_ERRS() << "foo 3" << LL_ENDL;
}
if (glIsEnabled(GL_NORMAL_ARRAY))
{
- llerrs << "foo 7" << llendl;
+ LL_ERRS() << "foo 7" << LL_ENDL;
}
GLvoid* pointer;
@@ -1832,19 +1832,19 @@ void LLRender::flush()
glGetPointerv(GL_VERTEX_ARRAY_POINTER, &pointer);
if (pointer != &(mBuffer[0].v))
{
- llerrs << "foo 4" << llendl;
+ LL_ERRS() << "foo 4" << LL_ENDL;
}
glGetPointerv(GL_COLOR_ARRAY_POINTER, &pointer);
if (pointer != &(mBuffer[0].c))
{
- llerrs << "foo 5" << llendl;
+ LL_ERRS() << "foo 5" << LL_ENDL;
}
glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &pointer);
if (pointer != &(mBuffer[0].uv))
{
- llerrs << "foo 6" << llendl;
+ LL_ERRS() << "foo 6" << LL_ENDL;
}
#endif
@@ -1860,7 +1860,7 @@ void LLRender::flush()
{
if (mCount%4 != 0)
{
- llerrs << "Incomplete quad rendered." << llendl;
+ LL_ERRS() << "Incomplete quad rendered." << LL_ENDL;
}
}
@@ -1868,7 +1868,7 @@ void LLRender::flush()
{
if (mCount%3 != 0)
{
- llerrs << "Incomplete triangle rendered." << llendl;
+ LL_ERRS() << "Incomplete triangle rendered." << LL_ENDL;
}
}
@@ -1876,7 +1876,7 @@ void LLRender::flush()
{
if (mCount%2 != 0)
{
- llerrs << "Incomplete line rendered." << llendl;
+ LL_ERRS() << "Incomplete line rendered." << LL_ENDL;
}
}
}
@@ -1929,7 +1929,7 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
if (mCount > 4094)
{
- // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl;
+ // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL;
return;
}
@@ -1972,7 +1972,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
{
if (mCount + vert_count > 4094)
{
- // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl;
+ // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL;
return;
}
@@ -2029,7 +2029,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v
{
if (mCount + vert_count > 4094)
{
- // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl;
+ // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL;
return;
}
@@ -2087,7 +2087,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol
{
if (mCount + vert_count > 4094)
{
- // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl;
+ // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL;
return;
}
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index fe34c218a8..3ac2d0b809 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -348,7 +348,7 @@ void gl_draw_image( S32 x, S32 y, LLTexture* image, const LLColor4& color, const
{
if (NULL == image)
{
- llwarns << "image == NULL; aborting function" << llendl;
+ LL_WARNS() << "image == NULL; aborting function" << LL_ENDL;
return;
}
gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color, uv_rect );
@@ -363,7 +363,7 @@ void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image,
{
if (NULL == image)
{
- llwarns << "image == NULL; aborting function" << llendl;
+ LL_WARNS() << "image == NULL; aborting function" << LL_ENDL;
return;
}
gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color, uv_rect );
@@ -373,7 +373,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border
{
if (NULL == image)
{
- llwarns << "image == NULL; aborting function" << llendl;
+ LL_WARNS() << "image == NULL; aborting function" << LL_ENDL;
return;
}
@@ -391,7 +391,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (NULL == image)
{
- llwarns << "image == NULL; aborting function" << llendl;
+ LL_WARNS() << "image == NULL; aborting function" << LL_ENDL;
return;
}
@@ -649,7 +649,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
{
if (!image && !target)
{
- llwarns << "image == NULL; aborting function" << llendl;
+ LL_WARNS() << "image == NULL; aborting function" << LL_ENDL;
return;
}
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 6e22712b94..a4d77b00d6 100755
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -43,7 +43,7 @@ void check_framebuffer_status()
case GL_FRAMEBUFFER_COMPLETE:
break;
default:
- llwarns << "check_framebuffer_status failed -- " << std::hex << status << llendl;
+ LL_WARNS() << "check_framebuffer_status failed -- " << std::hex << status << LL_ENDL;
ll_fail("check_framebuffer_status failed");
break;
}
@@ -137,7 +137,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo
{
if (!allocateDepth())
{
- llwarns << "Failed to allocate depth buffer for render target." << llendl;
+ LL_WARNS() << "Failed to allocate depth buffer for render target." << LL_ENDL;
return false;
}
}
@@ -179,13 +179,13 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
if( offset >= 4 )
{
- llwarns << "Too many color attachments" << llendl;
+ LL_WARNS() << "Too many color attachments" << LL_ENDL;
llassert( offset < 4 );
return false;
}
if( offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers) )
{
- llwarns << "FBO not used or no drawbuffers available; mFBO=" << (U32)mFBO << " gGLManager.mHasDrawBuffers=" << (U32)gGLManager.mHasDrawBuffers << llendl;
+ LL_WARNS() << "FBO not used or no drawbuffers available; mFBO=" << (U32)mFBO << " gGLManager.mHasDrawBuffers=" << (U32)gGLManager.mHasDrawBuffers << LL_ENDL;
llassert( mFBO != 0 );
llassert( gGLManager.mHasDrawBuffers );
return false;
@@ -203,7 +203,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false);
if (glGetError() != GL_NO_ERROR)
{
- llwarns << "Could not allocate color buffer for render target." << llendl;
+ LL_WARNS() << "Could not allocate color buffer for render target." << LL_ENDL;
return false;
}
}
@@ -289,7 +289,7 @@ bool LLRenderTarget::allocateDepth()
if (glGetError() != GL_NO_ERROR)
{
- llwarns << "Unable to allocate depth buffer for render target." << llendl;
+ LL_WARNS() << "Unable to allocate depth buffer for render target." << LL_ENDL;
return false;
}
@@ -300,17 +300,17 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target)
{
if (!mFBO || !target.mFBO)
{
- llerrs << "Cannot share depth buffer between non FBO render targets." << llendl;
+ LL_ERRS() << "Cannot share depth buffer between non FBO render targets." << LL_ENDL;
}
if (target.mDepth)
{
- llerrs << "Attempting to override existing depth buffer. Detach existing buffer first." << llendl;
+ LL_ERRS() << "Attempting to override existing depth buffer. Detach existing buffer first." << LL_ENDL;
}
if (target.mUseDepth)
{
- llerrs << "Attempting to override existing shared depth buffer. Detach existing buffer first." << llendl;
+ LL_ERRS() << "Attempting to override existing shared depth buffer. Detach existing buffer first." << LL_ENDL;
}
if (mDepth)
@@ -461,7 +461,7 @@ U32 LLRenderTarget::getTexture(U32 attachment) const
{
if (attachment > mTex.size()-1)
{
- llerrs << "Invalid attachment index." << llendl;
+ LL_ERRS() << "Invalid attachment index." << LL_ENDL;
}
if (mTex.empty())
{
@@ -529,7 +529,7 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
gGL.flush();
if (!source.mFBO || !mFBO)
{
- llwarns << "Cannot copy framebuffer contents for non FBO render targets." << llendl;
+ LL_WARNS() << "Cannot copy framebuffer contents for non FBO render targets." << LL_ENDL;
return;
}
@@ -572,7 +572,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0
{
if (!source.mFBO)
{
- llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl;
+ LL_ERRS() << "Cannot copy framebuffer contents for non FBO render targets." << LL_ENDL;
}
{
GLboolean write_depth = mask & GL_DEPTH_BUFFER_BIT ? TRUE : FALSE;
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index fea4ee2819..e7e5327e16 100755
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -584,7 +584,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
{
//should NEVER get here -- if major version is 1 and minor version is less than 10,
// viewer should never attempt to use shaders, continuing will result in undefined behavior
- llerrs << "Unsupported GLSL Version." << llendl;
+ LL_ERRS() << "Unsupported GLSL Version." << LL_ENDL;
}
if (minor_version <= 19)
@@ -751,7 +751,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
else
{ //should never get here. Indexed texture rendering requires GLSL 1.30 or later
// (for passing integers between vertex and fragment shaders)
- llerrs << "Indexed texture rendering requires GLSL 1.30 or later." << llendl;
+ LL_ERRS() << "Indexed texture rendering requires GLSL 1.30 or later." << LL_ENDL;
}
}
else
@@ -824,13 +824,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (i % 128 == 0)
{ //dump every 128 lines
- LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
+ LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL;
ostr = std::stringstream();
}
}
- LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
+ LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL;
#else
std::string str;
@@ -839,7 +839,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (i % 128 == 0)
{
- LL_WARNS("ShaderLoading") << str << llendl;
+ LL_WARNS("ShaderLoading") << str << LL_ENDL;
str = "";
}
}
@@ -1150,7 +1150,7 @@ void LLShaderMgr::initAttribsAndUniforms()
{
if (dupe_check.find(mReservedUniforms[i]) != dupe_check.end())
{
- llerrs << "Duplicate reserved uniform name found: " << mReservedUniforms[i] << llendl;
+ LL_ERRS() << "Duplicate reserved uniform name found: " << mReservedUniforms[i] << LL_ENDL;
}
dupe_check.insert(mReservedUniforms[i]);
}
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 22ea96ee19..ed2ed081e9 100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -491,7 +491,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
}
else
{
- llerrs << "Bad client state! " << array[i] << " disabled." << llendl;
+ LL_ERRS() << "Bad client state! " << array[i] << " disabled." << LL_ENDL;
}
}
}
@@ -510,7 +510,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
}
else
{
- llerrs << "Bad client state! " << array[i] << " enabled." << llendl;
+ LL_ERRS() << "Bad client state! " << array[i] << " enabled." << LL_ENDL;
}
}
}
@@ -578,13 +578,13 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con
if( count == 0 )
{
- llwarns << "Called drawArrays with 0 vertices" << llendl;
+ LL_WARNS() << "Called drawArrays with 0 vertices" << LL_ENDL;
return;
}
if( norm.size() < pos.size() )
{
- llwarns << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << llendl;
+ LL_WARNS() << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << LL_ENDL;
return;
}
@@ -661,7 +661,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
if (start >= (U32) mNumVerts ||
end >= (U32) mNumVerts)
{
- llerrs << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << llendl;
+ LL_ERRS() << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << LL_ENDL;
}
llassert(mNumIndices >= 0);
@@ -669,7 +669,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
if (indices_offset >= (U32) mNumIndices ||
indices_offset + count > (U32) mNumIndices)
{
- llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl;
+ LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << LL_ENDL;
}
if (gDebugGL && !useVBOs())
@@ -679,7 +679,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
{
if (idx[i] < start || idx[i] > end)
{
- llerrs << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << llendl;
+ LL_ERRS() << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << LL_ENDL;
}
}
@@ -697,7 +697,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
S32 idx = (S32) (v[i][3]+0.25f);
if (idx < 0 || idx >= shader->mFeatures.mIndexedTextureChannels)
{
- llerrs << "Bad texture index found in vertex data stream." << llendl;
+ LL_ERRS() << "Bad texture index found in vertex data stream." << LL_ENDL;
}
}
}
@@ -717,19 +717,19 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
{
if (mGLArray != sGLRenderArray)
{
- llerrs << "Wrong vertex array bound." << llendl;
+ LL_ERRS() << "Wrong vertex array bound." << LL_ENDL;
}
}
else
{
if (mGLIndices != sGLRenderIndices)
{
- llerrs << "Wrong index buffer bound." << llendl;
+ LL_ERRS() << "Wrong index buffer bound." << LL_ENDL;
}
if (mGLBuffer != sGLRenderBuffer)
{
- llerrs << "Wrong vertex buffer bound." << llendl;
+ LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL;
}
}
@@ -740,13 +740,13 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
if (elem != mGLIndices)
{
- llerrs << "Wrong index buffer bound!" << llendl;
+ LL_ERRS() << "Wrong index buffer bound!" << LL_ENDL;
}
}
if (mode >= LLRender::NUM_MODES)
{
- llerrs << "Invalid draw mode: " << mode << llendl;
+ LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
return;
}
@@ -774,32 +774,32 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
if (indices_offset >= (U32) mNumIndices ||
indices_offset + count > (U32) mNumIndices)
{
- llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl;
+ LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << LL_ENDL;
}
if (mGLArray)
{
if (mGLArray != sGLRenderArray)
{
- llerrs << "Wrong vertex array bound." << llendl;
+ LL_ERRS() << "Wrong vertex array bound." << LL_ENDL;
}
}
else
{
if (mGLIndices != sGLRenderIndices)
{
- llerrs << "Wrong index buffer bound." << llendl;
+ LL_ERRS() << "Wrong index buffer bound." << LL_ENDL;
}
if (mGLBuffer != sGLRenderBuffer)
{
- llerrs << "Wrong vertex buffer bound." << llendl;
+ LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL;
}
}
if (mode >= LLRender::NUM_MODES)
{
- llerrs << "Invalid draw mode: " << mode << llendl;
+ LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
return;
}
@@ -823,27 +823,27 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
if (first >= (U32) mNumVerts ||
first + count > (U32) mNumVerts)
{
- llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl;
+ LL_ERRS() << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << LL_ENDL;
}
if (mGLArray)
{
if (mGLArray != sGLRenderArray)
{
- llerrs << "Wrong vertex array bound." << llendl;
+ LL_ERRS() << "Wrong vertex array bound." << LL_ENDL;
}
}
else
{
if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive)
{
- llerrs << "Wrong vertex buffer bound." << llendl;
+ LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL;
}
}
if (mode >= LLRender::NUM_MODES)
{
- llerrs << "Invalid draw mode: " << mode << llendl;
+ LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
return;
}
@@ -1269,7 +1269,7 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
if (nverts > 65536)
{
- llwarns << "Vertex buffer overflow!" << llendl;
+ LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL;
nverts = 65536;
}
@@ -1308,7 +1308,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
if (nverts < 0 || nindices < 0 ||
nverts > 65536)
{
- llerrs << "Bad vertex buffer allocation: " << nverts << " : " << nindices << llendl;
+ LL_ERRS() << "Bad vertex buffer allocation: " << nverts << " : " << nindices << LL_ENDL;
}
updateNumVerts(nverts);
@@ -1502,11 +1502,11 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
bindGLBuffer(true);
if (mFinal)
{
- llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl;
+ LL_ERRS() << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << LL_ENDL;
}
if (!useVBOs() && !mMappedData && !mMappedIndexData)
{
- llerrs << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << llendl;
+ LL_ERRS() << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << LL_ENDL;
}
if (useVBOs())
@@ -1543,7 +1543,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
if (mVertexLocked && map_range)
{
- llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl;
+ LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL;
}
if (!mVertexLocked)
@@ -1585,7 +1585,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
if (size < mSize)
{
- llerrs << "Invalid buffer size." << llendl;
+ LL_ERRS() << "Invalid buffer size." << LL_ENDL;
}
}
@@ -1636,25 +1636,25 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
{
//--------------------
//print out more debug info before crash
- llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl;
+ LL_INFOS() << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << LL_ENDL;
GLint size;
glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
- llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl;
+ LL_INFOS() << "GL_ARRAY_BUFFER_ARB size is " << size << LL_ENDL;
//--------------------
GLint buff;
glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
if ((GLuint)buff != mGLBuffer)
{
- llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
+ LL_ERRS() << "Invalid GL vertex buffer bound: " << buff << LL_ENDL;
}
- llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl;
+ LL_ERRS() << "glMapBuffer returned NULL (no vertex data)" << LL_ENDL;
}
else
{
- llerrs << "memory allocation for vertex data failed." << llendl;
+ LL_ERRS() << "memory allocation for vertex data failed." << LL_ENDL;
}
}
}
@@ -1683,11 +1683,11 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
bindGLIndices(true);
if (mFinal)
{
- llerrs << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << llendl;
+ LL_ERRS() << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << LL_ENDL;
}
if (!useVBOs() && !mMappedData && !mMappedIndexData)
{
- llerrs << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << llendl;
+ LL_ERRS() << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << LL_ENDL;
}
if (useVBOs())
@@ -1721,7 +1721,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
if (mIndexLocked && map_range)
{
- llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl;
+ LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL;
}
if (!mIndexLocked)
@@ -1737,7 +1737,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
if (elem != mGLIndices)
{
- llerrs << "Wrong index buffer bound!" << llendl;
+ LL_ERRS() << "Wrong index buffer bound!" << LL_ENDL;
}
}
@@ -1815,14 +1815,14 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff);
if ((GLuint)buff != mGLIndices)
{
- llerrs << "Invalid GL index buffer bound: " << buff << llendl;
+ LL_ERRS() << "Invalid GL index buffer bound: " << buff << LL_ENDL;
}
- llerrs << "glMapBuffer returned NULL (no index data)" << llendl;
+ LL_ERRS() << "glMapBuffer returned NULL (no index data)" << LL_ENDL;
}
else
{
- llerrs << "memory allocation for Index data failed. " << llendl;
+ LL_ERRS() << "memory allocation for Index data failed. " << LL_ENDL;
}
}
}
@@ -2018,7 +2018,7 @@ template <class T,S32 type> struct VertexBufferStrider
if (ptr == NULL)
{
- llwarns << "mapIndexBuffer failed!" << llendl;
+ LL_WARNS() << "mapIndexBuffer failed!" << LL_ENDL;
return false;
}
@@ -2034,7 +2034,7 @@ template <class T,S32 type> struct VertexBufferStrider
if (ptr == NULL)
{
- llwarns << "mapVertexBuffer failed!" << llendl;
+ LL_WARNS() << "mapVertexBuffer failed!" << LL_ENDL;
return false;
}
@@ -2044,7 +2044,7 @@ template <class T,S32 type> struct VertexBufferStrider
}
else
{
- llerrs << "VertexBufferStrider could not find valid vertex data." << llendl;
+ LL_ERRS() << "VertexBufferStrider could not find valid vertex data." << LL_ENDL;
}
return false;
}
@@ -2147,7 +2147,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
LLFastTimer t(FTM_BIND_GL_BUFFER);
/*if (sMapped)
{
- llerrs << "VBO bound while another VBO mapped!" << llendl;
+ LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
}*/
glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
sGLRenderBuffer = mGLBuffer;
@@ -2178,7 +2178,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind)
LLFastTimer t(FTM_BIND_GL_INDICES);
/*if (sMapped)
{
- llerrs << "VBO bound while another VBO mapped!" << llendl;
+ LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
}*/
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices);
sGLRenderIndices = mGLIndices;
@@ -2230,7 +2230,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
U32 required = 1 << i;
if ((data_mask & required) == 0)
{
- llwarns << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << llendl;
+ LL_WARNS() << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << LL_ENDL;
}
required_mask |= required;
@@ -2239,7 +2239,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
if ((data_mask & required_mask) != required_mask)
{
- llwarns << "Shader consumption mismatches data provision." << llendl;
+ LL_WARNS() << "Shader consumption mismatches data provision." << LL_ENDL;
}
}
}
@@ -2271,7 +2271,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
}
else
{
- llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
+ LL_ERRS() << "Invalid GL vertex buffer bound: " << buff << LL_ENDL;
}
}
@@ -2286,7 +2286,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
}
else
{
- llerrs << "Invalid GL index buffer bound: " << buff << llendl;
+ LL_ERRS() << "Invalid GL index buffer bound: " << buff << LL_ENDL;
}
}
}
@@ -2362,10 +2362,10 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
U32 mask = 1 << i;
if (mask & data_mask && !(mask & mTypeMask))
{ //bit set in data_mask, but not set in mTypeMask
- llwarns << "Missing required component " << vb_type_name[i] << llendl;
+ LL_WARNS() << "Missing required component " << vb_type_name[i] << LL_ENDL;
}
}
- llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl;
+ LL_ERRS() << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << LL_ENDL;
}
if (LLGLSLShader::sNoFixedFunction)
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 04806c1d8c..0b4b87f338 100755
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -119,7 +119,7 @@ public:
const LLVertexBuffer& operator=(const LLVertexBuffer& rhs)
{
- llerrs << "Illegal operation!" << llendl;
+ LL_ERRS() << "Illegal operation!" << LL_ENDL;
return *this;
}