No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.

This commit is contained in:
Shyotl
2015-06-19 03:54:20 -05:00
parent 283f5298d5
commit 1c627317ec
634 changed files with 8200 additions and 12214 deletions

View File

@@ -101,7 +101,7 @@ void LLCubeMap::initGL()
}
else
{
llwarns << "Using cube map without extension!" << llendl;
LL_WARNS() << "Using cube map without extension!" << LL_ENDL;
}
}

View File

@@ -77,7 +77,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);
}
}
@@ -140,7 +140,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, const F32 point_size,
mFTFace = NULL;
}
llinfos << "Loading font file: " << filename << llendl;
LL_INFOS() << "Loading font file: " << filename << LL_ENDL;
int error;
@@ -191,7 +191,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, const F32 point_size,
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]);
}
@@ -310,7 +310,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;
@@ -318,7 +318,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++)
{
@@ -491,7 +491,7 @@ void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi)
//loadFace(mName,mPointSize,vert_dpi,horz_dpi,mFontBitmapCachep->getNumComponents(),mIsFallback);
if (mFallbackFonts.empty())
{
llwarns << "LLFontGL::reset(), no fallback fonts present" << llendl;
LL_WARNS() << "LLFontGL::reset(), no fallback fonts present" << LL_ENDL;
}
else
{

View File

@@ -359,7 +359,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.
@@ -1224,7 +1224,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
@@ -1269,12 +1269,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;
}

View File

@@ -198,8 +198,8 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
if ( root.isNull() || ! root->hasName( "fonts" ) )
{
llwarns << "Bad font info file: "
<< full_filename << llendl;
LL_WARNS() << "Bad font info file: "
<< full_filename << LL_ENDL;
continue;
}
@@ -352,10 +352,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)
@@ -364,8 +364,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,11 +379,11 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
if (it != mFontMap.end() && it->second != NULL)
{
if (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;
return it->second;
} else {
llwarns << "Failed to find font" << llendl;
LL_WARNS() << "Failed to find font" << LL_ENDL;
}
//Haven't plugged free-type in yet.
// copying underlying Freetype font, and storing in LLFontGL with requested font descriptor
@@ -406,7 +406,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
file_names.insert(file_names.end(),
match_default_desc->getFileNames().begin(),
match_default_desc->getFileNames().end());
llinfos << "Found matching fallback fonts: " << match_default_desc->getFileNames().size() << llendl;
LL_INFOS() << "Found matching fallback fonts: " << match_default_desc->getFileNames().size() << LL_ENDL;
}
// Add ultimate fallback list - generated dynamically on linux,
@@ -418,7 +418,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;
}
@@ -488,7 +488,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[norm_desc] = result;
return result;
@@ -542,9 +542,9 @@ LLFontGL *LLFontRegistry::getFont(const LLFontDescriptor& orig_desc)
LLFontGL *fontp = createFont(orig_desc);
if (!fontp)
{
llwarns << "getFont failed, name " << orig_desc.getName()
LL_WARNS() << "getFont failed, name " << orig_desc.getName()
<<" style=[" << ((S32) orig_desc.getStyle()) << "]"
<< " size=[" << orig_desc.getSize() << "]" << llendl;
<< " size=[" << orig_desc.getSize() << "]" << LL_ENDL;
}
return fontp;
}
@@ -647,28 +647,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;
}
}
}

View File

@@ -67,7 +67,7 @@ void* gl_get_proc_address(const char *pStr)
{
void* pPtr = (void*)GLH_EXT_GET_PROC_ADDRESS(pStr);
if(!pPtr)
llinfos << "Failed to find symbol '" << pStr << "'" << llendl;
LL_INFOS() << "Failed to find symbol '" << pStr << "'" << LL_ENDL;
return pPtr;
}
#undef GLH_EXT_GET_PROC_ADDRESS
@@ -90,20 +90,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 << std::dec << llendl;
llwarns << "ID: " << std::hex << id << std::dec<< llendl;
llwarns << "Severity: " << std::hex << severity << std::dec << llendl;
llwarns << "Message: " << message << llendl;
llwarns << "-----------------------" << llendl;
LL_WARNS() << "Type: " << std::hex << type << std::dec << LL_ENDL;
LL_WARNS() << "ID: " << std::hex << id << std::dec<< LL_ENDL;
LL_WARNS() << "Severity: " << std::hex << severity << std::dec << 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
@@ -545,7 +545,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;
}
{
@@ -978,7 +978,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")) /* Flawfinder: ignore */
@@ -1175,7 +1175,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");
@@ -1236,7 +1236,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");
@@ -1248,7 +1248,7 @@ void LLGLManager::initExtensions()
}
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");
}
@@ -1297,7 +1297,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");
@@ -1425,7 +1425,7 @@ void log_glerror()
while (LL_UNLIKELY(error))
{
std::string gl_error_msg = getGLErrorString(error);
llwarns << "GL Error: 0x" << std::hex << error << std::dec << " GL Error String: " << gl_error_msg << llendl;
LL_WARNS() << "GL Error: 0x" << std::hex << error << std::dec << " GL Error String: " << gl_error_msg << LL_ENDL;
error = glGetError();
}
}
@@ -1458,7 +1458,7 @@ void do_assert_glerror()
}
else
{
llerrs << "One or more unhandled GL errors." << llendl;
LL_ERRS() << "One or more unhandled GL errors." << LL_ENDL;
}
}
}
@@ -1469,7 +1469,7 @@ void assert_glerror()
return;
if (!gGLActive)
{
//llwarns << "GL used while not active!" << llendl;
//LL_WARNS() << "GL used while not active!" << LL_ENDL;
if (gDebugSession)
{
@@ -1740,7 +1740,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)
{
@@ -1784,7 +1784,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;
@@ -1795,7 +1795,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;
@@ -2307,11 +2307,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

View File

@@ -118,112 +118,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

View File

@@ -275,13 +275,13 @@ void LLGLSLShader::attachObject(GLhandleARB object)
{
if((*it).second.mHandle == object)
{
LL_DEBUGS("ShaderLoading") << "Attached: " << (*it).first << llendl;
LL_INFOS("ShaderLoading") << "Attached: " << (*it).first << LL_ENDL;
break;
}
}
if(it == LLShaderMgr::instance()->mShaderObjects.end())
{
LL_WARNS("ShaderLoading") << "Attached unknown shader!" << llendl;
LL_WARNS("ShaderLoading") << "Attached unknown shader!" << LL_ENDL;
}
stop_glerror();
@@ -511,7 +511,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
unbind();
LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << llendl;
LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << LL_ENDL;
return res;
}
@@ -657,7 +657,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();

View File

@@ -332,7 +332,7 @@ public:
stop_glerror();
if (iter->second != glGetUniformLocationARB(mProgramObject, uniform.String().c_str()))
{
llerrs << "Uniform does not match." << llendl;
LL_ERRS() << "Uniform does not match." << LL_ENDL;
}
stop_glerror();
}

View File

@@ -120,7 +120,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)
@@ -129,7 +129,7 @@ void LLImageGL::checkTexSize(bool forced) const
}
else
{
llerrs << "Invalid texture bound!" << llendl;
LL_ERRS() << "Invalid texture bound!" << LL_ENDL;
}
}
stop_glerror() ;
@@ -153,8 +153,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 ;
}
}
@@ -242,7 +242,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;
}
}
@@ -279,7 +279,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;
}
}
@@ -360,7 +360,7 @@ void LLImageGL::destroyGL(BOOL save_state)
}
}
sImageList = stored_images;
llinfos << "Storing " << stored_images.size() << " images..." << llendl;
LL_INFOS() << "Storing " << stored_images.size() << " images..." << LL_ENDL;
sAllowReadBackRaw = false ;
}
@@ -375,7 +375,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() && glimage->getComponents() &&
glimage->mSaveData->getComponents() &&
@@ -392,7 +392,7 @@ void LLImageGL::restoreGL()
}
restored_images = restored_images;
llinfos << "Restored " << restored_images.size() << " images" << llendl;
LL_INFOS() << "Restored " << restored_images.size() << " images" << LL_ENDL;
}
//static
@@ -571,12 +571,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))
{
llwarns << llformat("Texture has non power of two dimension: %dx%d",width,height) << " Unless on Aurora-Sim, beware." << llendl;
LL_WARNS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << " Unless on Aurora-Sim, beware." << 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();
}
@@ -615,7 +615,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)
@@ -630,12 +630,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;
}
//----------------------------------------------------------------------------
@@ -910,7 +910,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
@@ -961,13 +961,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;
}
@@ -981,7 +981,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);
@@ -990,28 +990,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;
}
@@ -1027,7 +1027,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,
@@ -1215,7 +1215,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 << std::dec << llendl;
LL_WARNS() << "Could not compress format: " << std::hex << intformat << std::dec << LL_ENDL;
break;
}
}
@@ -1233,7 +1233,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;
}
@@ -1252,7 +1252,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 ;
@@ -1264,7 +1264,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;
}
@@ -1378,7 +1378,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)
@@ -1436,7 +1436,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
{
// VWR-13505 : Merov : Allow gl texture read back so save texture works again (temporary)
//llassert_always(sAllowReadBackRaw) ;
//llerrs << "should not call this function!" << llendl ;
//LL_ERRS() << "should not call this function!" << LL_ENDL ;
if (discard_level < 0)
{
@@ -1476,15 +1476,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;
@@ -1497,7 +1497,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 ;
}
//-----------------------------------------------------------------------------------------------
@@ -1507,8 +1507,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 ;
}
@@ -1519,8 +1519,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 ;
}
@@ -1531,12 +1531,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 ;
@@ -1792,7 +1792,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;
setNeedsAlphaAndPickMask(FALSE);
}

View File

@@ -353,7 +353,7 @@ LLPostProcess::LLPostProcess(void) :
/* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.*/
std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;
LL_DEBUGS("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;
llifstream effectsXML(pathName);
@@ -702,7 +702,7 @@ void LLPostProcess::saveEffectAs(std::string const & effectName)
mAllEffectInfo[effectName] = mSelectedEffectInfo;
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);

View File

@@ -233,7 +233,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;
}
@@ -285,7 +285,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;
}
@@ -335,13 +335,13 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
if (cubeMap == NULL)
{
llwarns << "NULL LLTexUnit::bind cubemap" << llendl;
LL_WARNS() << "NULL LLTexUnit::bind cubemap" << LL_ENDL;
return false;
}
if (cubeMap->mImages[0].isNull())
{
llwarns << "NULL LLTexUnit::bind cubeMap->mImages[0]" << llendl;
LL_WARNS() << "NULL LLTexUnit::bind cubeMap->mImages[0]" << LL_ENDL;
return false;
}
if (mCurrTexture != cubeMap->mImages[0]->getTexName())
@@ -364,7 +364,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;
}
}
@@ -383,7 +383,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());
@@ -510,7 +510,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);
@@ -564,7 +564,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);
@@ -604,7 +604,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;
}
}
@@ -642,7 +642,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;
}
}
@@ -783,7 +783,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);
@@ -831,7 +831,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;
}
}
@@ -1660,7 +1660,7 @@ void LLRender::pushMatrix()
}
else
{
llwarns << "Matrix stack overflow." << llendl;
LL_WARNS() << "Matrix stack overflow." << LL_ENDL;
}
}
}
@@ -1676,7 +1676,7 @@ void LLRender::popMatrix()
}
else
{
llwarns << "Matrix stack underflow." << llendl;
LL_WARNS() << "Matrix stack underflow." << LL_ENDL;
}
}
}
@@ -1684,7 +1684,6 @@ void LLRender::popMatrix()
void LLRender::loadMatrix(const LLMatrix4a& mat)
{
flush();
mMatrix[mMatrixMode][mMatIdx[mMatrixMode]] = mat;
mMatHash[mMatrixMode]++;
}
@@ -1742,7 +1741,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;
}
LLVector4a add(x,y,z);
@@ -1753,7 +1752,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;
}
LLVector4a scale(x,y,z);
@@ -1785,7 +1784,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();
@@ -1814,7 +1813,7 @@ void LLRender::loadUIIdentity()
{
if (mUIOffset.empty() || mUIScale.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().splat(0.f);
mUIScale.back().splat(1.f);
@@ -1872,7 +1871,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;
}
}
@@ -1913,7 +1912,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;
@@ -1921,7 +1920,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;
}
}
}
@@ -1961,7 +1960,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;
}
@@ -1990,7 +1989,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;
}
}
@@ -2026,7 +2025,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;
}
}
@@ -2057,7 +2056,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;
@@ -2069,7 +2068,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 &&
@@ -2088,22 +2087,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;
@@ -2111,19 +2110,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
@@ -2139,7 +2138,7 @@ void LLRender::flush()
{
if (mCount%4 != 0)
{
llerrs << "Incomplete quad rendered." << llendl;
LL_ERRS() << "Incomplete quad rendered." << LL_ENDL;
}
}
@@ -2147,7 +2146,7 @@ void LLRender::flush()
{
if (mCount%3 != 0)
{
llerrs << "Incomplete triangle rendered." << llendl;
LL_ERRS() << "Incomplete triangle rendered." << LL_ENDL;
}
}
@@ -2155,7 +2154,7 @@ void LLRender::flush()
{
if (mCount%2 != 0)
{
llerrs << "Incomplete line rendered." << llendl;
LL_ERRS() << "Incomplete line rendered." << LL_ENDL;
}
}
}
@@ -2208,7 +2207,7 @@ void LLRender::vertex4a(const LLVector4a& vertex)
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;
}
@@ -2252,7 +2251,7 @@ void LLRender::vertexBatchPreTransformed(LLVector4a* 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;
}
@@ -2309,7 +2308,7 @@ void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, S32
{
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;
}
@@ -2367,7 +2366,7 @@ void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, LLCo
{
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;
}

View File

@@ -342,7 +342,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 );
@@ -352,7 +352,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 );
@@ -362,7 +362,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;
}
@@ -380,7 +380,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;
}
@@ -639,7 +639,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
{
if (NULL == image)
{
llwarns << "image == NULL; aborting function" << llendl;
LL_WARNS() << "image == NULL; aborting function" << LL_ENDL;
return;
}

View File

@@ -43,7 +43,7 @@ void check_framebuffer_status()
case GL_FRAMEBUFFER_COMPLETE:
break;
default:
llwarns << "check_framebuffer_status failed -- " << std::hex << status << std::dec << llendl;
LL_WARNS() << "check_framebuffer_status failed -- " << std::hex << status << std::dec << LL_ENDL;
ll_fail("check_framebuffer_status failed");
break;
}
@@ -143,7 +143,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;
}
}
@@ -183,13 +183,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;
@@ -207,7 +207,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;
}
}
@@ -294,7 +294,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;
}
@@ -307,17 +307,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)
@@ -481,7 +481,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())
{
@@ -605,7 +605,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;
}
@@ -660,7 +660,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0
{
if (!source.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;
}
{
@@ -783,7 +783,7 @@ bool LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth
if(color_fmt != GL_RGBA)
{
llwarns << "Unsupported color format: " << color_fmt << llendl;
LL_WARNS() << "Unsupported color format: " << color_fmt << LL_ENDL;
return false;
}
@@ -887,7 +887,7 @@ bool LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
if (offset >= 4 ||
(offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers)))
{
llerrs << "Too many color attachments!" << llendl;
LL_ERRS() << "Too many color attachments!" << LL_ENDL;
}
U32 tex;
@@ -898,7 +898,7 @@ bool LLMultisampleBuffer::addColorAttachment(U32 color_fmt)
glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, color_fmt, mResX, mResY);
if (glGetError() != GL_NO_ERROR)
{
llwarns << "Unable to allocate color buffer for multisample render target." << llendl;
LL_WARNS() << "Unable to allocate color buffer for multisample render target." << LL_ENDL;
release();
return false;
}
@@ -934,7 +934,7 @@ bool LLMultisampleBuffer::allocateDepth()
if (glGetError() != GL_NO_ERROR)
{
llwarns << "Unable to allocate depth buffer for multisample render target." << llendl;
LL_WARNS() << "Unable to allocate depth buffer for multisample render target." << LL_ENDL;
return false;
}

View File

@@ -601,7 +601,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)
@@ -786,7 +786,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
@@ -875,13 +875,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;
@@ -890,7 +890,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 = "";
}
}
@@ -1273,7 +1273,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]);
}

View File

@@ -486,7 +486,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;
}
}
}
@@ -505,7 +505,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;
}
}
}
@@ -571,13 +571,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;
}
@@ -643,7 +643,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);
@@ -651,7 +651,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())
@@ -661,7 +661,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;
}
}
@@ -679,7 +679,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;
}
}
}
@@ -699,19 +699,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;
}
}
@@ -722,13 +722,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;
}
@@ -751,32 +751,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;
}
@@ -798,27 +798,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;
}
@@ -1241,7 +1241,7 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
if (nverts > 65536)
{
llwarns << "Vertex buffer overflow!" << llendl;
LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL;
nverts = 65536;
}
@@ -1280,7 +1280,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
if (nverts < 0 || nindices < 0 ||
nverts > 65536)
{
llwarns << "Bad vertex buffer allocation: " << nverts << " : " << nindices << llendl;
LL_WARNS() << "Bad vertex buffer allocation: " << nverts << " : " << nindices << LL_ENDL;
}
updateNumVerts(nverts);
@@ -1474,11 +1474,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())
@@ -1515,7 +1515,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)
@@ -1557,7 +1557,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;
}
}
@@ -1606,25 +1606,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;
}
}
}
@@ -1653,11 +1653,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())
@@ -1691,7 +1691,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)
@@ -1707,7 +1707,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;
}
}
@@ -1783,14 +1783,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;
}
}
}
@@ -1984,7 +1984,7 @@ template <class T,S32 type> struct VertexBufferStrider
if (ptr == NULL)
{
llwarns << "mapIndexBuffer failed!" << llendl;
LL_WARNS() << "mapIndexBuffer failed!" << LL_ENDL;
return false;
}
@@ -2000,7 +2000,7 @@ template <class T,S32 type> struct VertexBufferStrider
if (ptr == NULL)
{
llwarns << "mapVertexBuffer failed!" << llendl;
LL_WARNS() << "mapVertexBuffer failed!" << LL_ENDL;
return false;
}
@@ -2010,7 +2010,7 @@ template <class T,S32 type> struct VertexBufferStrider
}
else
{
llwarns << "VertexBufferStrider could not find valid vertex data." << llendl;
LL_WARNS() << "VertexBufferStrider could not find valid vertex data." << LL_ENDL;
}
return false;
}
@@ -2117,7 +2117,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;
@@ -2148,7 +2148,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;
@@ -2200,7 +2200,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;
@@ -2209,7 +2209,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
if ((data_mask & required_mask) != required_mask)
{
llerrs << "Shader consumption mismatches data provision." << llendl;
LL_ERRS() << "Shader consumption mismatches data provision." << LL_ENDL;
}
}
}
@@ -2241,7 +2241,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;
}
}
@@ -2256,7 +2256,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;
}
}
}
@@ -2332,10 +2332,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)

View File

@@ -115,7 +115,7 @@ public:
const LLVertexBuffer& operator=(const LLVertexBuffer& rhs)
{
llerrs << "Illegal operation!" << llendl;
LL_ERRS() << "Illegal operation!" << LL_ENDL;
return *this;
}