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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-03-08 10:47:05 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-03-08 10:47:05 +0400
commit640b0adb9844f506ed68f99f8761a1f4daa288b0 (patch)
tree957737baac66b88d79f1f24b6d7a262dcbfc4b7e /source/blender/blenkernel/BKE_DerivedMesh.h
parentee84084f990da866c15a7b24e7c5945050c4a720 (diff)
Code cleanup: use named values for options in DerivedMesh drawing.
The DMSetDrawOptions[Tex] callbacks return 0 (skip), 1 (draw), or 2 (either stipple or skip mcols.) In the CDDM, EDDM, and CCGDM draw functions, as well as the callbacks in drawmesh/drawobject, replace these numbers with values from an enum, DMDrawOptions.
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 6b49235a0b7..199b2d751a8 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -124,12 +124,23 @@ typedef enum DerivedMeshType {
DM_TYPE_CCGDM
} DerivedMeshType;
+typedef enum DMDrawOption {
+ /* the element is hidden or otherwise non-drawable */
+ DM_DRAW_OPTION_SKIP = 0,
+ /* normal drawing */
+ DM_DRAW_OPTION_NORMAL = 1,
+ /* draw, but don't set the color from mcol */
+ DM_DRAW_OPTION_NO_MCOL = 2,
+ /* used in drawMappedFaces, use GL stipple for the face */
+ DM_DRAW_OPTION_STIPPLE = 3,
+} DMDrawOption;
+
/* Drawing callback types */
typedef int (*DMSetMaterial)(int mat_nr, void *attribs);
typedef int (*DMCompareDrawOptions)(void *userData, int cur_index, int next_index);
typedef void (*DMSetDrawInterpOptions)(void *userData, int index, float t);
-typedef int (*DMSetDrawOptions)(void *userData, int index);
-typedef int (*DMSetDrawOptionsTex)(struct MTFace *tface, int has_vcol, int matnr);
+typedef DMDrawOption (*DMSetDrawOptions)(void *userData, int index);
+typedef DMDrawOption (*DMSetDrawOptionsTex)(struct MTFace *tface, int has_vcol, int matnr);
typedef enum DMDrawFlag {
DM_DRAW_USE_COLORS = 1,