Change texface draw to always use glShadeModel(GL_SMOOTH), with texface draw.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 19 Feb 2012 03:10:11 +0000 (03:10 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 19 Feb 2012 03:10:11 +0000 (03:10 +0000)
without this each face would get a solid color, this is the same method used in object mode.

also copy BLI_array.h fix from bmesh branch.

source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenlib/BLI_array.h
source/blender/blenlib/BLI_threads.h

index bb1d20f0187a6fa55a57edbee275d8baa5324b9a..62f11eb263110d9a144c290bad4bf7a29a7326d0 100644 (file)
@@ -488,9 +488,6 @@ static void emDM_drawFacesTex_common(
                                                cp= (unsigned char*)mcol;
                                        }
                                }
-                               else {
-                                       glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
-                               }
 
                                glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
                                if (!drawSmooth) {
@@ -564,9 +561,6 @@ static void emDM_drawFacesTex_common(
                                                cp= (unsigned char*)mcol;
                                        }
                                }
-                               else {
-                                       glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
-                               }
 
                                glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
                                if (!drawSmooth) {
@@ -617,6 +611,8 @@ static void emDM_drawFacesTex_common(
                        }
                }
        }
+
+       glShadeModel(GL_FLAT);
 }
 
 static void emDM_drawFacesTex(
index a5453f1537b27e812708ad4be6098261f3f56d0f..9fa66e913934b1f3aa4223660aff7f6faad6294c 100644 (file)
  * same purpose as BLI_array_staticdeclare()
  * but use when the max size is known ahead of time */
 #define BLI_array_fixedstack_declare(arr, maxstatic, realsize, allocstr)      \
-       char _##arr##_static[maxstatic*sizeof(*arr)];                             \
+       char _##arr##_static[maxstatic*sizeof(*(arr))];                           \
        const int _##arr##_is_static= ((void *)_##arr##_static) != (              \
-           arr= (realsize <= maxstatic) ?                                        \
+           arr= ((realsize) <= maxstatic) ?                                      \
                (void *)_##arr##_static :                                         \
-               MEM_mallocN(sizeof(*arr)*realsize, allocstr)                      \
+               MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr)                \
            )                                                                     \
 
 #define BLI_array_fixedstack_free(arr)                                        \
index 8e75a2db6290f02c6f366d1d0497e12339ecbc37..03bf375a8942f698ea5ff22ef46182ed0817dada 100644 (file)
@@ -76,6 +76,7 @@ int           BLI_system_thread_count(void); /* gets the number of threads the system can
 #define LOCK_OPENGL            5
 #define LOCK_NODES             6
 #define LOCK_MOVIECLIP 7
+#define LOCK_SCANFILL  8
 
 void   BLI_lock_thread(int type);
 void   BLI_unlock_thread(int type);