Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-15 00:06:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-15 00:06:28 +0300
commiteac31a2eceb6601967484301c5f25b7a138f623b (patch)
treeb70d5c1eced98e472d0c204ca3a126424a2ec57d /source/blender/gpu
parent94b9d2da547d88d5ca904351c04f5b00a6c0b278 (diff)
remove unused vars & avoid some clang warnings.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index f7ca1c5bfe0..eae5ca1b4b9 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -918,6 +918,8 @@ void GPU_buffer_copy_normal(DerivedMesh *dm, float *varray, int *index, int *red
numfaces= dm->getNumFaces(dm);
for( i=0; i < numfaces; i++ ) {
+ const int smoothnormal = (mface[i].flag & ME_SMOOTH);
+
start = index[redir[mface[i].mat_nr+16383]];
if( mface[i].v4 )
index[redir[mface[i].mat_nr+16383]] += 18;
@@ -925,7 +927,7 @@ void GPU_buffer_copy_normal(DerivedMesh *dm, float *varray, int *index, int *red
index[redir[mface[i].mat_nr+16383]] += 9;
/* v1 v2 v3 */
- if( mface[i].flag & ME_SMOOTH ) {
+ if(smoothnormal) {
VECCOPY(&varray[start],mvert[mface[i].v1].no);
VECCOPY(&varray[start+3],mvert[mface[i].v2].no);
VECCOPY(&varray[start+6],mvert[mface[i].v3].no);
@@ -947,7 +949,7 @@ void GPU_buffer_copy_normal(DerivedMesh *dm, float *varray, int *index, int *red
if( mface[i].v4 ) {
/* v3 v4 v1 */
- if( mface[i].flag & ME_SMOOTH ) {
+ if(smoothnormal) {
VECCOPY(&varray[start+9],mvert[mface[i].v3].no);
VECCOPY(&varray[start+12],mvert[mface[i].v4].no);
VECCOPY(&varray[start+15],mvert[mface[i].v1].no);