From ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 30 Apr 2009 13:04:20 -0500 Subject: Second Life viewer sources 1.23.0-RC --- linden/indra/newview/llvotree.h | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'linden/indra/newview/llvotree.h') diff --git a/linden/indra/newview/llvotree.h b/linden/indra/newview/llvotree.h index f34371e..473f1c3 100644 --- a/linden/indra/newview/llvotree.h +++ b/linden/indra/newview/llvotree.h @@ -17,7 +17,8 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,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); @@ -78,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& vertices, + LLStrider& normals, + LLStrider& tex_coords, + LLStrider& indices, + U16& idx_offset, + LLMatrix4& matrix, + LLMatrix4& norm_mat, + S32 vertex_offset, + S32 vertex_count, + S32 index_count, + S32 index_offset); + + void genBranchPipeline(LLStrider& vertices, + LLStrider& normals, + LLStrider& tex_coords, + LLStrider& 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); @@ -126,6 +159,7 @@ protected: LLVector3 mTrunkVel; // LLVector3 mWind; + LLPointer mReferenceBuffer; //reference geometry for generating tree mesh LLPointer mTreeImagep; // Pointer to proper tree image U8 mSpecies; // Species of tree @@ -137,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? -- cgit v1.1