Blender V4.3
draw_hair_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2017 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#define MAX_LAYER_NAME_CT 4 /* `u0123456789, u, au, a0123456789`. */
12#define MAX_LAYER_NAME_LEN (GPU_MAX_SAFE_ATTR_NAME + 2)
13#define MAX_THICKRES 2 /* see eHairType */
14#define MAX_HAIR_SUBDIV 4 /* see hair_subdiv rna */
15
20
21struct ModifierData;
22struct Object;
24struct ParticleSystem;
25
27 /* Output of the subdivision stage: vertex buff sized to subdiv level. */
29
30 /* Just contains a huge index buffer used to draw the final hair. */
31 blender::gpu::Batch *proc_hairs[MAX_THICKRES];
32
33 int strands_res; /* points per hair, at least 2 */
34};
35
69
70namespace blender::draw {
71
76 ParticleSystem *psys,
77 ModifierData *md,
78 ParticleHairCache **r_hair_cache,
79 GPUMaterial *gpu_material,
80 int subdiv,
81 int thickness_res);
82
83} // namespace blender::draw
#define MAX_MTFACE
#define MAX_THICKRES
ParticleRefineShader
@ PART_REFINE_MAX_SHADER
@ PART_REFINE_CATMULL_ROM
#define MAX_LAYER_NAME_LEN
#define MAX_LAYER_NAME_CT
#define MAX_HAIR_SUBDIV
bool particles_ensure_procedural_data(Object *object, ParticleSystem *psys, ModifierData *md, ParticleHairCache **r_hair_cache, GPUMaterial *gpu_material, int subdiv, int thickness_res)
GPUTexture * uv_tex[MAX_MTFACE]
blender::gpu::IndexBuf * indices
blender::gpu::VertBuf ** proc_col_buf
blender::gpu::VertBuf * proc_length_buf
blender::gpu::VertBuf * proc_strand_buf
blender::gpu::VertBuf * proc_uv_buf[MAX_MTFACE]
blender::gpu::VertBuf * proc_strand_seg_buf
char uv_layer_names[MAX_MTFACE][MAX_LAYER_NAME_CT][MAX_LAYER_NAME_LEN]
blender::gpu::Batch * hairs
blender::gpu::VertBuf * proc_point_buf
blender::gpu::VertBuf * pos
char(* col_layer_names)[MAX_LAYER_NAME_CT][MAX_LAYER_NAME_LEN]
blender::gpu::VertBuf * proc_buf
blender::gpu::Batch * proc_hairs[MAX_THICKRES]