diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-10-29 12:06:20 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-10-29 12:06:20 -0500 | 
| commit | 78e62d00306f55c4f04366bf8f89fd7b3ccdf489 (patch) | |
| tree | e750e45ee5aa0bdc5764f371133f99f8e786f0c4 /indra | |
| parent | cae054451982e9b5a2f4203e58d566c8799c7aaa (diff) | |
Fix for bad normals on some prim faces.
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llmath/llvolume.cpp | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index a0874e859c..2411bb7900 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -92,11 +92,13 @@ extern BOOL gDebugGL;  void assert_aligned(void* ptr, U32 alignment)  { +#if 0  	U32 t = (U32) ptr;  	if (t%alignment != 0)  	{  		llerrs << "WTF?" << llendl;  	} +#endif  }  BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm) @@ -6600,6 +6602,12 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)  		}  	} +	//clear normals +	for (U32 i = 0; i < mNumVertices; i++) +	{ +		mNormals[i].clear(); +	} +  	//generate normals   	for (U32 i = 0; i < mNumIndices/3; i++) //for each triangle  	{ | 
