diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 12 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 1 |
3 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index c053baf9f7e..94e88bdaca6 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -138,6 +138,15 @@ typedef struct Mesh_Runtime { int64_t cd_dirty_loop; int64_t cd_dirty_poly; + /** + * Settings for lazily evaluating the subdivision on the CPU if needed. These are + * set in the modifier when GPU subdivision can be performed. + */ + char subsurf_apply_render; + char subsurf_use_optimal_display; + char _pad[2]; + int subsurf_resolution; + } Mesh_Runtime; typedef struct Mesh { @@ -356,7 +365,8 @@ typedef enum eMeshWrapperType { ME_WRAPPER_TYPE_MDATA = 0, /** Use edit-mesh data (#Mesh.edit_mesh, #Mesh_Runtime.edit_data). */ ME_WRAPPER_TYPE_BMESH = 1, - /* ME_WRAPPER_TYPE_SUBD = 2, */ /* TODO */ + /** Use subdivision mesh data (#Mesh_Runtime.mesh_eval). */ + ME_WRAPPER_TYPE_SUBD = 2, } eMeshWrapperType; /** #Mesh.texflag */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 85cc1361adf..fc041e257b0 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -196,6 +196,13 @@ typedef enum { SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS = 1, } eSubsurfBoundarySmooth; +typedef struct SubsurfRuntimeData { + /* Cached subdivision surface descriptor, with topology and settings. */ + struct Subdiv *subdiv; + char set_by_draw_code; + char _pad[7]; +} SubsurfRuntimeData; + typedef struct SubsurfModifierData { ModifierData modifier; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index c99651f0717..34415308ef6 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -1145,6 +1145,7 @@ typedef enum eUserpref_GPU_Flag { USER_GPU_FLAG_NO_DEPT_PICK = (1 << 0), USER_GPU_FLAG_NO_EDIT_MODE_SMOOTH_WIRE = (1 << 1), USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE = (1 << 2), + USER_GPU_FLAG_SUBDIVISION_EVALUATION = (1 << 3), } eUserpref_GPU_Flag; /** #UserDef.tablet_api */ |