Make gcc happier.
This commit is contained in:
@@ -1990,7 +1990,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
|
||||
|
||||
image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black);
|
||||
}
|
||||
tex->createGLTexture(0, image_raw, LLImageGL::GLTextureName(), TRUE, LLGLTexture::LOCAL);
|
||||
tex->createGLTexture(0, image_raw, nullptr, TRUE, LLGLTexture::LOCAL);
|
||||
|
||||
gGL.getTexUnit(0)->bind(tex);
|
||||
tex->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
reverse_iterator rend() { return mVector.rend(); }
|
||||
const_reverse_iterator rend() const { return mVector.rend(); }
|
||||
|
||||
void reset() { mVector.resize(0); mIndexMap.resize(0); }
|
||||
void reset() { mVector.resize(0); }
|
||||
bool empty() const { return mVector.empty(); }
|
||||
size_type size() const { return mVector.size(); }
|
||||
|
||||
|
||||
@@ -80,14 +80,14 @@ void LLCubeMap::initGL()
|
||||
// Not initialized, do stuff.
|
||||
if (mImages[0].isNull())
|
||||
{
|
||||
auto texname = LLImageGL::createTextureName();
|
||||
LLImageGL::GLTextureName texname = LLImageGL::createTextureName();
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE));
|
||||
mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
|
||||
mRawImages[i] = new LLImageRaw(64, 64, 4);
|
||||
mImages[i]->createGLTexture(0, mRawImages[i], texname);
|
||||
mImages[i]->createGLTexture(0, mRawImages[i], &texname);
|
||||
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname->getTexName());
|
||||
mImages[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
|
||||
@@ -73,9 +73,9 @@ void* gl_get_proc_address(const char *pStr)
|
||||
#undef GLH_EXT_GET_PROC_ADDRESS
|
||||
#define GLH_EXT_GET_PROC_ADDRESS(p) gl_get_proc_address(p)
|
||||
#undef GLH_EXT_GET_PROC_ADDRESS_CORE
|
||||
#define GLH_EXT_GET_PROC_ADDRESS_CORE(ver, p) gl_get_proc_address((mGLVersion >= ver) ? p : p##"ARB")
|
||||
#define GLH_EXT_GET_PROC_ADDRESS_CORE(ver, p) gl_get_proc_address((mGLVersion >= ver) ? p : p"ARB")
|
||||
#undef GLH_EXT_GET_PROC_ADDRESS_CORE_EXT
|
||||
#define GLH_EXT_GET_PROC_ADDRESS_CORE_EXT(ver, p) gl_get_proc_address((mGLVersion >= ver) ? p : p##"EXT")
|
||||
#define GLH_EXT_GET_PROC_ADDRESS_CORE_EXT(ver, p) gl_get_proc_address((mGLVersion >= ver) ? p : p"EXT")
|
||||
#undef GLH_EXT_GET_PROC_ADDRESS_CORE_OR_ARB
|
||||
#define GLH_EXT_GET_PROC_ADDRESS_CORE_OR_ARB(ver, p, arb) gl_get_proc_address((mGLVersion >= ver) ? p : arb)
|
||||
#endif //!LL_DARWIN
|
||||
|
||||
@@ -349,6 +349,7 @@ private:
|
||||
}
|
||||
};
|
||||
#define initLLGLState(state, value, disabler_ptr) \
|
||||
template <> \
|
||||
LLGLStateStaticData LLGLState<state>::staticData = {#state, state, value, 0, nullptr, disabler_ptr}; \
|
||||
bool registered_##state = LLGLStateValidator::registerStateData(LLGLState<state>::staticData);
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ BOOL LLGLTexture::createGLTexture()
|
||||
return mGLTexturep->createGLTexture() ;
|
||||
}
|
||||
|
||||
BOOL LLGLTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, LLImageGL::GLTextureName& usename, BOOL to_create, S32 category)
|
||||
BOOL LLGLTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, LLImageGL::GLTextureName* usename, BOOL to_create, S32 category)
|
||||
{
|
||||
llassert(mGLTexturep.notNull()) ;
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
BOOL hasGLTexture() const ;
|
||||
LLGLuint getTexName() const ;
|
||||
BOOL createGLTexture() ;
|
||||
BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, LLImageGL::GLTextureName& usename = LLImageGL::GLTextureName(), BOOL to_create = TRUE, S32 category = LLGLTexture::OTHER);
|
||||
BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, LLImageGL::GLTextureName* usename = nullptr, BOOL to_create = TRUE, S32 category = LLGLTexture::OTHER);
|
||||
void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
|
||||
void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
|
||||
void setAddressMode(LLTexUnit::eTextureAddressMode mode);
|
||||
|
||||
@@ -222,7 +222,7 @@ void LLImageGL::setHighlightTexture(S32 category)
|
||||
}
|
||||
}
|
||||
}
|
||||
sHighlightTexturep->createGLTexture(0, image_raw, LLImageGL::GLTextureName(), TRUE, category);
|
||||
sHighlightTexturep->createGLTexture(0, image_raw, nullptr, TRUE, category);
|
||||
image_raw = NULL;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ void LLImageGL::restoreGL()
|
||||
if (data.notNull() && glimage->getComponents() &&
|
||||
data->getComponents() &&
|
||||
glimage->mSaveDiscardLevel >= 0 &&
|
||||
glimage->createGLTexture(glimage->mSaveDiscardLevel, data, LLImageGL::GLTextureName(), TRUE, glimage->getCategory()))
|
||||
glimage->createGLTexture(glimage->mSaveDiscardLevel, data, nullptr, TRUE, glimage->getCategory()))
|
||||
{
|
||||
stop_glerror();
|
||||
/*if (glimage->getHasGLTexture())
|
||||
@@ -1633,7 +1633,7 @@ BOOL LLImageGL::createGLTexture()
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)");
|
||||
BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, GLTextureName& usename, BOOL to_create, S32 category)
|
||||
BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, GLTextureName* usename, BOOL to_create, S32 category)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE2);
|
||||
if (gGLManager.mIsDisabled)
|
||||
@@ -1710,7 +1710,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, G
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)");
|
||||
BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, GLTextureName& usename)
|
||||
BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, GLTextureName* usename)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE3);
|
||||
llassert(data_in);
|
||||
@@ -1733,9 +1733,9 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
|
||||
|
||||
// S32 old_discard = mCurrentDiscardLevel;
|
||||
|
||||
if (usename)
|
||||
if (usename && *usename)
|
||||
{
|
||||
mTexName = usename;
|
||||
mTexName = *usename;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -155,9 +155,9 @@ public:
|
||||
static void setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression = true);
|
||||
|
||||
BOOL createGLTexture() ;
|
||||
BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, GLTextureName& usename = GLTextureName(), BOOL to_create = TRUE,
|
||||
BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, GLTextureName* usename = nullptr, BOOL to_create = TRUE,
|
||||
S32 category = sMaxCategories-1);
|
||||
BOOL createGLTexture(S32 discard_level, const U8* data, BOOL data_hasmips = FALSE, GLTextureName& usename = GLTextureName());
|
||||
BOOL createGLTexture(S32 discard_level, const U8* data, BOOL data_hasmips = FALSE, GLTextureName* usename = nullptr);
|
||||
void setImage(const LLImageRaw* imageraw);
|
||||
void setImage(const U8* data_in, BOOL data_hasmips = FALSE);
|
||||
BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE);
|
||||
|
||||
@@ -2139,7 +2139,7 @@ void LLRender::setAmbientLightColor(const LLColor4& color)
|
||||
|
||||
void LLRender::setLineWidth(F32 line_width)
|
||||
{
|
||||
//if (LLRender::sGLCoreProfile)
|
||||
if (LLRender::sGLCoreProfile)
|
||||
{
|
||||
mNewContext.lineWidth = 1.f;
|
||||
return;
|
||||
|
||||
@@ -295,9 +295,9 @@ protected:
|
||||
ptrdiff_t mAlignedOffset;
|
||||
ptrdiff_t mAlignedIndexOffset;
|
||||
S32 mSize;
|
||||
S32 mResidentSize;
|
||||
U32 mResidentSize;
|
||||
S32 mIndicesSize;
|
||||
S32 mResidentIndicesSize;
|
||||
U32 mResidentIndicesSize;
|
||||
U32 mTypeMask;
|
||||
|
||||
const S32 mUsage; // GL usage
|
||||
|
||||
@@ -97,11 +97,10 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const std::string& name, const LLRect& rect,
|
||||
/*std::string local_label = label;
|
||||
if(local_label.empty())
|
||||
{
|
||||
|
||||
//local_label = " ";
|
||||
local_label = " ";
|
||||
}*/
|
||||
|
||||
mLabel = new LLTextBox( std::string("CheckboxCtrl Label"), label_rect, local_label, mFont );
|
||||
mLabel = new LLTextBox( std::string("CheckboxCtrl Label"), label_rect, label, mFont );
|
||||
mLabel->setFollowsLeft();
|
||||
mLabel->setFollowsBottom();
|
||||
addChild(mLabel);
|
||||
|
||||
@@ -1650,8 +1650,6 @@ bool LLAppViewer::cleanup()
|
||||
|
||||
LLViewerObject::cleanupVOClasses();
|
||||
|
||||
LLAvatarAppearance::cleanupClass();
|
||||
|
||||
LLAvatarAppearance::cleanupClass();
|
||||
|
||||
LLTracker::cleanupInstance();
|
||||
|
||||
@@ -109,7 +109,7 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum
|
||||
}
|
||||
if(fill_color)
|
||||
raw_image->fill(*fill_color);
|
||||
createGLTexture(0, raw_image, LLImageGL::GLTextureName(), TRUE, LLViewerTexture::DYNAMIC_TEX);
|
||||
createGLTexture(0, raw_image, nullptr, TRUE, LLViewerTexture::DYNAMIC_TEX);
|
||||
setAddressMode((mClamp) ? LLTexUnit::TAM_CLAMP : LLTexUnit::TAM_WRAP);
|
||||
mGLTexturep->setGLTextureCreated(false);
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ void LLFloaterReporter::takeScreenshot()
|
||||
// store in the image list so it doesn't try to fetch from the server
|
||||
LLPointer<LLViewerFetchedTexture> image_in_list =
|
||||
LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::FETCHED_TEXTURE);
|
||||
image_in_list->createGLTexture(0, raw, LLImageGL::GLTextureName(), TRUE, LLViewerTexture::OTHER);
|
||||
image_in_list->createGLTexture(0, raw, nullptr, TRUE, LLViewerTexture::OTHER);
|
||||
|
||||
// the texture picker then uses that texture
|
||||
LLTexturePicker* texture = getChild<LLTextureCtrl>("screenshot");
|
||||
|
||||
@@ -1297,7 +1297,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
|
||||
if(isForSculptOnly())
|
||||
{
|
||||
//just update some variables, not to create a real GL texture.
|
||||
createGLTexture(mRawDiscardLevel, mRawImage, LLImageGL::GLTextureName(), FALSE);
|
||||
createGLTexture(mRawDiscardLevel, mRawImage, nullptr, FALSE);
|
||||
mNeedsCreateTexture = FALSE;
|
||||
destroyRawImage();
|
||||
}
|
||||
@@ -1360,7 +1360,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
|
||||
}
|
||||
|
||||
// ONLY called from LLViewerTextureList
|
||||
BOOL LLViewerFetchedTexture::createTexture(LLImageGL::GLTextureName& usename)
|
||||
BOOL LLViewerFetchedTexture::createTexture(LLImageGL::GLTextureName* usename)
|
||||
{
|
||||
if (!mNeedsCreateTexture)
|
||||
{
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
void addToCreateTexture();
|
||||
|
||||
// ONLY call from LLViewerTextureList
|
||||
BOOL createTexture(LLImageGL::GLTextureName& usename = LLImageGL::GLTextureName());
|
||||
BOOL createTexture(LLImageGL::GLTextureName* usename = nullptr);
|
||||
void destroyTexture() ;
|
||||
|
||||
virtual void processTextureStats() ;
|
||||
|
||||
@@ -298,7 +298,7 @@ void LLSkyTex::create(const F32 brightness)
|
||||
|
||||
void LLSkyTex::createGLImage(S32 which)
|
||||
{
|
||||
mTexture[which]->createGLTexture(0, mImageRaw[which], LLImageGL::GLTextureName(), TRUE, LLGLTexture::LOCAL);
|
||||
mTexture[which]->createGLTexture(0, mImageRaw[which], nullptr, TRUE, LLGLTexture::LOCAL);
|
||||
mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user