diff options
Diffstat (limited to 'source/blender/draw/intern/draw_common.h')
-rw-r--r-- | source/blender/draw/intern/draw_common.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h index ec646693207..3d498cba8b6 100644 --- a/source/blender/draw/intern/draw_common.h +++ b/source/blender/draw/intern/draw_common.h @@ -26,10 +26,15 @@ #ifndef __DRAW_COMMON_H__ #define __DRAW_COMMON_H__ +struct DerivedMesh; struct DRWPass; struct DRWShadingGroup; struct Gwn_Batch; +struct GPUTexture; +struct HairDrawSettings; +struct HairSystem; struct Object; +struct Scene; struct ViewLayer; /* Used as ubo but colors can be directly referenced as well */ @@ -145,4 +150,27 @@ void DRW_shgroup_armature_edit( bool DRW_pose_mode_armature( struct Object *ob, struct Object *active_ob); +/* hair drawing */ +typedef struct DRWHairFiberTextureBuffer { + void *data; + int strand_map_start; + int strand_vertex_start; + int fiber_start; + int width; + int height; +} DRWHairFiberTextureBuffer; + +const char* DRW_hair_shader_defines(void); + +void DRW_hair_shader_uniforms(struct DRWShadingGroup *shgrp, struct Scene *scene, + struct GPUTexture **fibertex, const struct DRWHairFiberTextureBuffer *texbuffer); + +void DRW_shgroup_hair( + struct Object *ob, + struct HairSystem *hsys, + struct HairDrawSettings *draw_settings, + struct DerivedMesh *scalp, + struct DRWShadingGroup *shgrp_verts, + struct DRWShadingGroup *shgrp_edges); + #endif /* __DRAW_COMMON_H__ */ |