Revision: 48421
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48421
Author:   nicholasbishop
Date:     2012-06-30 00:57:58 +0000 (Sat, 30 Jun 2012)
Log Message:
-----------
Fix black colors in edit mode

Modified draw_dm_faces_sel() to set the DM_DRAW_USE_COLORS flag when
drawing selected faces, updated EMDM's drawMappedFaces() to add colors
to the gpu immediate format when needed.

Modified Paths:
--------------
    
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/editderivedmesh.c
    
branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c

Modified: 
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/editderivedmesh.c
===================================================================
--- 
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/editderivedmesh.c
   2012-06-29 23:09:19 UTC (rev 48420)
+++ 
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/editderivedmesh.c
   2012-06-30 00:57:58 UTC (rev 48421)
@@ -596,10 +596,16 @@
        (void)compareDrawOptions;
 
        if (skip_normals) {
-               gpuImmediateFormat_V3();
+               if (flag & DM_DRAW_USE_COLORS)
+                       gpuImmediateFormat_C4_V3();
+               else
+                       gpuImmediateFormat_V3();
        }
        else {
-               gpuImmediateFormat_N3_V3();
+               if (flag & DM_DRAW_USE_COLORS)
+                       gpuImmediateFormat_C4_N3_V3();
+               else
+                       gpuImmediateFormat_N3_V3();
        }
 
        if (bmdm->vertexCos) {

Modified: 
branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- 
branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c 
    2012-06-29 23:09:19 UTC (rev 48420)
+++ 
branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c 
    2012-06-30 00:57:58 UTC (rev 48421)
@@ -2586,7 +2586,7 @@
        data.efa_act = efa_act;
        data.orig_index = DM_get_tessface_data_layer(dm, CD_ORIGINDEX);
 
-       dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, 
GPU_enable_material, draw_dm_faces_sel__compareDrawOptions, &data, 0);
+       dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, 
GPU_enable_material, draw_dm_faces_sel__compareDrawOptions, &data, 
DM_DRAW_USE_COLORS);
 }
 
 static DMDrawOption draw_dm_creases__setDrawOptions(void *userData, int index)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to