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

@@ -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;
}