[Bf-blender-cvs] [1d90785] temp-derivedmesh-looptri: Use mloopcol to check if we want to enable colors for drawing
Antony Riakiotakis
noreply at git.blender.org
Wed Jul 15 16:07:20 CEST 2015
Commit: 1d9078535056891db6f568cbc48a58b91070f39d
Author: Antony Riakiotakis
Date: Wed Jul 15 16:06:50 2015 +0200
Branches: temp-derivedmesh-looptri
https://developer.blender.org/rB1d9078535056891db6f568cbc48a58b91070f39d
Use mloopcol to check if we want to enable colors for drawing
===================================================================
M source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 083fe95..11ca69a 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -488,7 +488,6 @@ static void cdDM_drawFacesTex_common(
const MLoopTri *looptri = dm->looptris.array;
const MLoopCol *mloopcol;
MTexPoly *mtexpoly = DM_get_poly_data_layer(dm, CD_MTEXPOLY);
- MCol *mcol;
int i;
int colType, start_element, tot_drawn;
bool use_tface = (uvflag & DM_DRAW_USE_ACTIVE_UV) != 0;
@@ -536,7 +535,7 @@ static void cdDM_drawFacesTex_common(
GPU_texpaint_uv_setup(dm);
else
GPU_uv_setup(dm);
- if (mcol) {
+ if (mloopcol) {
GPU_color_setup(dm, colType);
}
@@ -560,7 +559,7 @@ static void cdDM_drawFacesTex_common(
next_actualFace = looptri[bufmat->polys[i + 1]].poly;
if (drawParams) {
- draw_option = drawParams(use_tface && mtexpoly ? &mtexpoly[actualFace] : NULL, (mcol != NULL), mpoly[actualFace].mat_nr);
+ draw_option = drawParams(use_tface && mtexpoly ? &mtexpoly[actualFace] : NULL, (mloopcol != NULL), mpoly[actualFace].mat_nr);
}
else {
if (index_mp_to_orig) {
@@ -596,7 +595,7 @@ static void cdDM_drawFacesTex_common(
tot_drawn += 3;
if (tot_drawn) {
- if (mcol && draw_option != DM_DRAW_OPTION_NO_MCOL)
+ if (mloopcol && draw_option != DM_DRAW_OPTION_NO_MCOL)
GPU_color_switch(1);
else
GPU_color_switch(0);
More information about the Bf-blender-cvs
mailing list