From c355fb98d3f4040196b7b8586dc9328fccb906d2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 3 Sep 2012 06:12:50 +0000 Subject: Extracted texture baking system into llappearance library. --- indra/newview/llviewerjointmesh.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerjointmesh.h') diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index dd5dae1dc1..ff6bed4f0f 100755 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -35,7 +35,7 @@ class LLDrawable; class LLFace; class LLCharacter; -class LLTexLayerSet; +class LLViewerTexLayerSet; typedef enum e_avatar_render_pass { @@ -67,7 +67,7 @@ protected: // LLColor4 mSpecular; // specular color (always white for now) F32 mShiny; // shiny value LLPointer mTexture; // ptr to a global texture - LLTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar + LLViewerTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar U32 mTestImageName; // handle to a temporary texture for previewing uploads LLPolyMesh* mMesh; // ptr to a global polymesh BOOL mCullBackFaces; // true by default @@ -109,7 +109,7 @@ public: void setTestTexture( U32 name ) { mTestImageName = name; } // Sets layer set responsible for a dynamic shape texture (takes precedence over normal texture) - void setLayerSet( LLTexLayerSet* layer_set ); + void setLayerSet( LLViewerTexLayerSet* layer_set ); // Gets the poly mesh LLPolyMesh *getMesh(); -- cgit v1.2.3 From 77b33d9623c08152932282048fe847d79fcf43cd Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 7 Sep 2012 23:17:34 -0400 Subject: SH-3264 Porting over the XML loading of the avatar structure to llappearance Moved over the necessary classes to llappearance to support the loading of the avatar's structure & params from file. --- indra/newview/llviewerjointmesh.h | 86 +-------------------------------------- 1 file changed, 2 insertions(+), 84 deletions(-) (limited to 'indra/newview/llviewerjointmesh.h') diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index ff6bed4f0f..039175830f 100755 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -29,6 +29,7 @@ #include "llviewerjoint.h" #include "llviewertexture.h" +#include "llavatarjointmesh.h" #include "llpolymesh.h" #include "v4color.h" @@ -37,56 +38,12 @@ class LLFace; class LLCharacter; class LLViewerTexLayerSet; -typedef enum e_avatar_render_pass -{ - AVATAR_RENDER_PASS_SINGLE, - AVATAR_RENDER_PASS_CLOTHING_INNER, - AVATAR_RENDER_PASS_CLOTHING_OUTER -} EAvatarRenderPass; - -class LLSkinJoint -{ -public: - LLSkinJoint(); - ~LLSkinJoint(); - BOOL setupSkinJoint( LLViewerJoint *joint); - - LLViewerJoint *mJoint; - LLVector3 mRootToJointSkinOffset; - LLVector3 mRootToParentJointSkinOffset; -}; - //----------------------------------------------------------------------------- // class LLViewerJointMesh //----------------------------------------------------------------------------- -class LLViewerJointMesh : public LLViewerJoint +class LLViewerJointMesh : public LLAvatarJointMesh { friend class LLVOAvatar; -protected: - LLColor4 mColor; // color value -// LLColor4 mSpecular; // specular color (always white for now) - F32 mShiny; // shiny value - LLPointer mTexture; // ptr to a global texture - LLViewerTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar - U32 mTestImageName; // handle to a temporary texture for previewing uploads - LLPolyMesh* mMesh; // ptr to a global polymesh - BOOL mCullBackFaces; // true by default - LLFace* mFace; // ptr to a face w/ AGP copy of mesh - - U32 mFaceIndexCount; - BOOL mIsTransparent; - - U32 mNumSkinJoints; - LLSkinJoint* mSkinJoints; - S32 mMeshID; - -public: - static BOOL sPipelineRender; - //RN: this is here for testing purposes - static U32 sClothingMaskImageName; - static EAvatarRenderPass sRenderPass; - static LLColor4 sClothingInnerColor; - public: // Constructor LLViewerJointMesh(); @@ -94,41 +51,9 @@ public: // Destructor virtual ~LLViewerJointMesh(); - // Gets the shape color - void getColor( F32 *red, F32 *green, F32 *blue, F32 *alpha ); - - // Sets the shape color - void setColor( F32 red, F32 green, F32 blue, F32 alpha ); - - // Sets the shininess - void setSpecular( const LLColor4& color, F32 shiny ) { /*mSpecular = color;*/ mShiny = shiny; }; - - // Sets the shape texture - void setTexture( LLViewerTexture *texture ); - - void setTestTexture( U32 name ) { mTestImageName = name; } - - // Sets layer set responsible for a dynamic shape texture (takes precedence over normal texture) - void setLayerSet( LLViewerTexLayerSet* layer_set ); - - // Gets the poly mesh - LLPolyMesh *getMesh(); - - // Sets the poly mesh - void setMesh( LLPolyMesh *mesh ); - - // Sets up joint matrix data for rendering - void setupJoint(LLViewerJoint* current_joint); - // Render time method to upload batches of joint matrices void uploadJointMatrices(); - // Sets ID for picking - void setMeshID( S32 id ) {mMeshID = id;} - - // Gets ID for picking - S32 getMeshID() { return mMeshID; } - // overloaded from base class /*virtual*/ void drawBone(); /*virtual*/ BOOL isTransparent(); @@ -148,13 +73,6 @@ private: //copy mesh into given face's vertex buffer, applying current animation pose static void updateGeometry(LLFace* face, LLPolyMesh* mesh); - -private: - // Allocate skin data - BOOL allocateSkinData( U32 numSkinJoints ); - - // Free skin data - void freeSkinData(); }; #endif // LL_LLVIEWERJOINTMESH_H -- cgit v1.2.3 From e1580128ab2a42ecd4019ef35069f9e939dc4ff2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Sun, 9 Sep 2012 12:12:19 +0000 Subject: Fixed crashes on login. Moved most of the remaining character/skeleton generation code into llappearance. Moved non-rendering related LLViewerJoint functionality into LLAvatarJoint. --- indra/newview/llviewerjointmesh.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/newview/llviewerjointmesh.h') diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 039175830f..64887152a6 100755 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -41,9 +41,8 @@ class LLViewerTexLayerSet; //----------------------------------------------------------------------------- // class LLViewerJointMesh //----------------------------------------------------------------------------- -class LLViewerJointMesh : public LLAvatarJointMesh +class LLViewerJointMesh : public LLAvatarJointMesh, public LLViewerJoint { - friend class LLVOAvatar; public: // Constructor LLViewerJointMesh(); @@ -55,8 +54,6 @@ public: void uploadJointMatrices(); // overloaded from base class - /*virtual*/ void drawBone(); - /*virtual*/ BOOL isTransparent(); /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ); /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); @@ -65,8 +62,6 @@ public: /*virtual*/ void updateJointGeometry(); /*virtual*/ void dump(); - void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; } - /*virtual*/ BOOL isAnimatable() const { return FALSE; } private: -- cgit v1.2.3 From da1a303fc33b098f133cb72a8bac9d8e886d65df Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 13 Sep 2012 02:09:21 +0000 Subject: Moved most of the appearance utility application level logic into LLAppAppearanceUtility. Added LLBakingProcess class for adding new process modes. Create a couple concrete classes for llappearance base classes. --- indra/newview/llviewerjointmesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerjointmesh.h') diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 64887152a6..ac5aab4ef2 100755 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -1,6 +1,6 @@ /** * @file llviewerjointmesh.h - * @brief Implementation of LLViewerJointMesh class + * @brief Declaration of LLViewerJointMesh class * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code -- cgit v1.2.3 From 8b2cb3766e3ed546994f81518983283e68263b09 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 14 Sep 2012 11:29:17 -0400 Subject: BUILDFIX: WIN fixing up windows building issues Cleaned up a couple of things that the windows compiler was warning about, with our inheritance structure --- indra/newview/llviewerjointmesh.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewerjointmesh.h') diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index ac5aab4ef2..0db2836e15 100755 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -56,6 +56,10 @@ public: // overloaded from base class /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ); + // necessary because MS's compiler warns on function inheritance via dominance in the diamond inheritance here. + // warns even though LLViewerJoint holds the only non virtual implementation. + /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) { return LLViewerJoint::render(pixelArea,first_pass,is_dummy);} + /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false); /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate); -- cgit v1.2.3