Merge branch 'meshupload' of git://github.com/LightDrake/SingularityViewer into meshupload

This commit is contained in:
Siana Gearz
2013-01-13 20:37:04 +01:00
3 changed files with 2 additions and 36 deletions

View File

@@ -1539,7 +1539,6 @@ LLSD LLModel::writeModel(
mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
mdl[model_names[idx]][i]["TexCoord0"] = tc;
}
mdl[model_names[idx]][i]["TriangleList"] = indices;
if (skinning)

View File

@@ -155,8 +155,7 @@ bool LLPrimitive::cleanupVolumeManager()
LLPrimitive::LLPrimitive()
: mTextureList(),
mNumTEs(0),
mMiscFlags(0),
mNumBumpmapTEs(0)
mMiscFlags(0)
{
mPrimitiveCode = 0;
@@ -244,10 +243,7 @@ void LLPrimitive::setAllTETextures(const LLUUID &tex_id)
//===============================================================
void LLPrimitive::setTE(const U8 index, const LLTextureEntry& te)
{
if(mTextureList.copyTexture(index, te) != TEM_CHANGE_NONE && te.getBumpmap() > 0)
{
mNumBumpmapTEs++;
}
mTextureList.copyTexture(index, te);
}
S32 LLPrimitive::setTETexture(const U8 index, const LLUUID &id)
@@ -326,7 +322,6 @@ S32 LLPrimitive::setTERotation(const U8 index, const F32 r)
//===============================================================
S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
{
updateNumBumpmap(index, bump);
return mTextureList.setBumpShinyFullbright(index, bump);
}
@@ -337,13 +332,11 @@ S32 LLPrimitive::setTEMediaTexGen(const U8 index, const U8 media)
S32 LLPrimitive::setTEBumpmap(const U8 index, const U8 bump)
{
updateNumBumpmap(index, bump);
return mTextureList.setBumpMap(index, bump);
}
S32 LLPrimitive::setTEBumpShiny(const U8 index, const U8 bump_shiny)
{
updateNumBumpmap(index, bump_shiny);
return mTextureList.setBumpShiny(index, bump_shiny);
}
@@ -1458,26 +1451,6 @@ void LLPrimitive::takeTextureList(LLPrimTextureList& other_list)
mTextureList.take(other_list);
}
void LLPrimitive::updateNumBumpmap(const U8 index, const U8 bump)
{
LLTextureEntry* te = getTE(index);
if(!te)
{
return;
}
U8 old_bump = te->getBumpmap();
if(old_bump > 0)
{
mNumBumpmapTEs--;
}
if((bump & TEM_BUMP_MASK) > 0)
{
mNumBumpmapTEs++;
}
return;
}
//============================================================================
// Moved from llselectmgr.cpp

View File

@@ -427,7 +427,6 @@ public:
inline BOOL isAvatar() const;
inline BOOL isSittingAvatar() const;
inline BOOL isSittingAvatarOnGround() const;
inline bool hasBumpmap() const { return mNumBumpmapTEs > 0;}
void setFlags(U32 flags) { mMiscFlags = flags; }
void addFlags(U32 flags) { mMiscFlags |= flags; }
@@ -442,9 +441,6 @@ public:
inline static BOOL isPrimitive(const LLPCode pcode);
inline static BOOL isApp(const LLPCode pcode);
private:
void updateNumBumpmap(const U8 index, const U8 bump);
protected:
LLPCode mPrimitiveCode; // Primitive code
LLVector3 mVelocity; // how fast are we moving?
@@ -454,10 +450,8 @@ protected:
LLPrimTextureList mTextureList; // list of texture GUIDs, scales, offsets
U8 mMaterial; // Material code
U8 mNumTEs; // # of faces on the primitve
U8 mNumBumpmapTEs; // number of bumpmap TEs.
U32 mMiscFlags; // home for misc bools
public:
static LLVolumeMgr* sVolumeManager;
};