diff options
Diffstat (limited to 'indra/newview/llvotree.h')
-rw-r--r-- | indra/newview/llvotree.h | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index 7e81dc3e08..473f1c340e 100644 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -51,7 +51,7 @@ public: { VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | (1 << LLVertexBuffer::TYPE_NORMAL) | - (1 << LLVertexBuffer::TYPE_TEXCOORD) + (1 << LLVertexBuffer::TYPE_TEXCOORD0) }; LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); @@ -79,6 +79,38 @@ public: void updateRadius(); + void calcNumVerts(U32& vert_count, U32& index_count, S32 trunk_LOD, S32 stop_level, U16 depth, U16 trunk_depth, F32 branches); + + void updateMesh(); + + void appendMesh(LLStrider<LLVector3>& vertices, + LLStrider<LLVector3>& normals, + LLStrider<LLVector2>& tex_coords, + LLStrider<U16>& indices, + U16& idx_offset, + LLMatrix4& matrix, + LLMatrix4& norm_mat, + S32 vertex_offset, + S32 vertex_count, + S32 index_count, + S32 index_offset); + + void genBranchPipeline(LLStrider<LLVector3>& vertices, + LLStrider<LLVector3>& normals, + LLStrider<LLVector2>& tex_coords, + LLStrider<U16>& indices, + U16& index_offset, + LLMatrix4& matrix, + S32 trunk_LOD, + S32 stop_level, + U16 depth, + U16 trunk_depth, + F32 scale, + F32 twist, + F32 droop, + F32 branches, + F32 alpha); + U32 drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD, S32 stop_level, U16 depth, U16 trunk_depth, F32 scale, F32 twist, F32 droop, F32 branches, F32 alpha); @@ -127,6 +159,7 @@ protected: LLVector3 mTrunkVel; // LLVector3 mWind; + LLPointer<LLVertexBuffer> mReferenceBuffer; //reference geometry for generating tree mesh LLPointer<LLViewerImage> mTreeImagep; // Pointer to proper tree image U8 mSpecies; // Species of tree @@ -138,7 +171,7 @@ protected: U8 mDepth; // Number of recursions to tips of branches F32 mScaleStep; // Multiplier for scale at each recursion level U8 mTrunkDepth; - + U32 mTrunkLOD; F32 mLeafScale; // Scales leaf texture when rendering F32 mBillboardScale; // How big to draw the billboard? |