diff options
author | Nicky <nicky.dasmijn@posteo.nl> | 2022-06-05 14:27:28 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@posteo.nl> | 2022-06-05 14:27:28 +0200 |
commit | 95d5938eefa26f4814154219315db50aa511fc4f (patch) | |
tree | f4b964ee1723645d6a43668cb59b988d56523ac9 /indra/newview/llface.h | |
parent | 6b0427dbc2e88271f7704a6c65f2bc2ea11a5928 (diff) | |
parent | 027dbc2ccfe3a94db10fc1f85f7c0ee58c4eed4f (diff) |
Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into DRTVWR-543-maint_cmake
Diffstat (limited to 'indra/newview/llface.h')
-rw-r--r-- | indra/newview/llface.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 3611539ff8..aa00c9d052 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -47,18 +47,18 @@ class LLTextureEntry; class LLVertexProgram; class LLViewerTexture; class LLGeometryManager; -class LLTextureAtlasSlot; class LLDrawInfo; +class LLMeshSkinInfo; const F32 MIN_ALPHA_SIZE = 1024.f; const F32 MIN_TEX_ANIM_SIZE = 512.f; const U8 FACE_DO_NOT_BATCH_TEXTURES = 255; -class LLFace : public LLTrace::MemTrackableNonVirtual<LLFace, 16> +class alignas(16) LLFace { + LL_ALIGN_NEW public: LLFace(const LLFace& rhs) - : LLTrace::MemTrackableNonVirtual<LLFace, 16>("LLFace") { *this = rhs; } @@ -85,8 +85,8 @@ public: public: LLFace(LLDrawable* drawablep, LLViewerObject* objp) - : LLTrace::MemTrackableNonVirtual<LLFace, 16>("LLFace") { + LL_PROFILE_ZONE_SCOPED; init(drawablep, objp); } ~LLFace() { destroy(); } @@ -143,7 +143,7 @@ public: LLViewerObject* getViewerObject() const { return mVObjp; } S32 getLOD() const { return mVObjp.notNull() ? mVObjp->getLOD() : 0; } void setPoolType(U32 type) { mPoolType = type; } - S32 getTEOffset() { return mTEOffset; } + S32 getTEOffset() const { return mTEOffset; } LLViewerTexture* getTexture(U32 ch = LLRender::DIFFUSE_MAP) const; void setViewerObject(LLViewerObject* object); @@ -228,15 +228,17 @@ public: void setVertexBuffer(LLVertexBuffer* buffer); void clearVertexBuffer(); //sets mVertexBuffer to NULL LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; } - U32 getRiggedVertexBufferDataMask() const; S32 getRiggedIndex(U32 type) const; - void setRiggedIndex(U32 type, S32 index); - - static U32 getRiggedDataMask(U32 type); void notifyAboutCreatingTexture(LLViewerTexture *texture); void notifyAboutMissingAsset(LLViewerTexture *texture); + // used to preserve draw order of faces that are batched together. + // Allows content creators to manipulate linked sets and face ordering + // for consistent alpha sorting results, particularly for rigged attachments + void setDrawOrderIndex(U32 index) { mDrawOrderIndex = index; } + U32 getDrawOrderIndex() const { return mDrawOrderIndex; } + public: //aligned members LLVector4a mExtents[2]; @@ -261,6 +263,11 @@ public: LLMatrix4* mSpecMapMatrix; LLMatrix4* mNormalMapMatrix; LLDrawInfo* mDrawInfo; + LLVOAvatar* mAvatar = nullptr; + LLMeshSkinInfo* mSkinInfo = nullptr; + + // return mSkinInfo->mHash or 0 if mSkinInfo is null + U64 getSkinHash(); private: LLPointer<LLVertexBuffer> mVertexBuffer; @@ -271,10 +278,10 @@ private: LLColor4 mFaceColor; // overrides material color if state |= USE_FACE_COLOR U16 mGeomCount; // vertex count for this face - U16 mGeomIndex; // index into draw pool + U16 mGeomIndex; // starting index into mVertexBuffer's vertex array U8 mTextureIndex; // index of texture channel to use for pseudo-atlasing U32 mIndicesCount; - U32 mIndicesIndex; // index into draw pool for indices (yeah, I know!) + U32 mIndicesIndex; // index into mVertexBuffer's index array S32 mIndexInTex[LLRender::NUM_TEXTURE_CHANNELS]; LLXformMatrix* mXform; @@ -304,6 +311,7 @@ private: bool mHasMedia ; bool mIsMediaAllowed; + U32 mDrawOrderIndex = 0; // see setDrawOrderIndex protected: static BOOL sSafeRenderSelect; |