Blender V4.3
draw_curves_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#include "GPU_shader.hh"
12
13#include "draw_attributes.hh"
14
15struct Curves;
16namespace blender::gpu {
17class Batch;
18class VertBuf;
19} // namespace blender::gpu
20struct GPUMaterial;
21
22namespace blender::draw {
23
24#define MAX_THICKRES 2 /* see eHairType */
25#define MAX_HAIR_SUBDIV 4 /* see hair_subdiv rna */
26
31#define CURVES_EVAL_SHADER_NUM 3
32
36 /* The "strand or strip" setting from the scene. See #MAX_THICKRES. */
38
39 /* Output of the subdivision stage: vertex buffer sized to subdiv level. */
41
43 gpu::Batch *proc_hairs;
44
47
50
56
63
64 /* Output of the subdivision stage: vertex buffers sized to subdiv level. This is only attributes
65 * on point domain. */
67};
68
69/* Curves procedural display: Evaluation is done on the GPU. */
71 /* Control point positions on evaluated data-block combined with parameter data. */
73
76
77 /* Curve length data. */
79
81
83
84 /* For point attributes, which need subdivision, these buffers contain the input data.
85 * For curve domain attributes, which do not need subdivision, these are the final data. */
87
90};
91
96 CurvesEvalCache **r_cache,
97 const GPUMaterial *gpu_material,
98 int subdiv,
99 int thickness_res);
100
101void drw_curves_get_attribute_sampler_name(const char *layer_name, char r_sampler_name[32]);
102
103} // namespace blender::draw
#define GPU_MAX_ATTR
Definition GPU_shader.hh:29
Utilities for rendering attributes.
void drw_curves_get_attribute_sampler_name(const char *layer_name, char r_sampler_name[32])
bool curves_ensure_procedural_data(Curves *curves_id, CurvesEvalCache **r_cache, const GPUMaterial *gpu_material, const int subdiv, const int thickness_res)
gpu::VertBuf * proc_attributes_buf[GPU_MAX_ATTR]
gpu::VertBuf * attributes_buf[GPU_MAX_ATTR]