Blender V4.3
draw_attributes.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11#pragma once
12
13#include <mutex>
14
16
17#include "BLI_sys_types.h"
18
19#include "GPU_shader.hh"
20
21namespace blender::bke {
22enum class AttrDomain : int8_t;
23}
24
25namespace blender::draw {
26
33
38
50
51/* Keep `DRW_MeshCDMask` struct within a `uint32_t`.
52 * bit-wise and atomic operations are used to compare and update the struct.
53 * See `mesh_cd_layers_type_*` functions. */
54static_assert(sizeof(DRW_MeshCDMask) <= sizeof(uint32_t), "DRW_MeshCDMask exceeds 32 bits");
55
56void drw_attributes_clear(DRW_Attributes *attributes);
57
59 const DRW_Attributes *src,
60 std::mutex &render_mutex);
61
62/* Return true if all requests in b are in a. */
64
66 const char *name,
67 eCustomDataType data_type,
68 int layer_index,
70
71bool drw_custom_data_match_attribute(const CustomData &custom_data,
72 const char *name,
73 int *r_layer_index,
74 eCustomDataType *r_type);
75
76} // namespace blender::draw
#define GPU_MAX_ATTR
Definition GPU_shader.hh:29
local_group_size(16, 16) .push_constant(Type b
void drw_attributes_clear(DRW_Attributes *attributes)
bool drw_custom_data_match_attribute(const CustomData &custom_data, const char *name, int *r_layer_index, eCustomDataType *r_type)
void drw_attributes_merge(DRW_Attributes *dst, const DRW_Attributes *src, std::mutex &render_mutex)
void drw_attributes_add_request(DRW_Attributes *attrs, const char *name, const eCustomDataType type, const int layer_index, const blender::bke::AttrDomain domain)
bool drw_attributes_overlap(const DRW_Attributes *a, const DRW_Attributes *b)
unsigned int uint32_t
Definition stdint.h:80
signed char int8_t
Definition stdint.h:75
DRW_AttributeRequest requests[GPU_MAX_ATTR]