Blender
V4.5
source
blender
draw
intern
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
10
11
#pragma once
12
13
#include <string>
14
15
#include "
DNA_customdata_types.h
"
16
17
#include "
BLI_mutex.hh
"
18
#include "
BLI_string_ref.hh
"
19
#include "
BLI_sys_types.h
"
20
21
#include "
BLI_vector_set.hh
"
22
23
namespace
blender::bke
{
24
enum class
AttrDomain
:
int8_t
;
25
}
26
27
namespace
blender::draw
{
28
29
struct
DRW_MeshCDMask
{
30
uint32_t
uv
: 8;
31
uint32_t
tan
: 8;
32
uint32_t
orco
: 1;
33
uint32_t
tan_orco
: 1;
34
uint32_t
sculpt_overlays
: 1;
38
uint32_t
edit_uv
: 1;
39
};
40
41
/* Keep `DRW_MeshCDMask` struct within a `uint32_t`.
42
* bit-wise and atomic operations are used to compare and update the struct.
43
* See `mesh_cd_layers_type_*` functions. */
44
static_assert
(
sizeof
(
DRW_MeshCDMask
) <=
sizeof
(uint32_t),
"DRW_MeshCDMask exceeds 32 bits"
);
45
46
void
drw_attributes_merge
(
VectorSet<std::string>
*dst,
47
const
VectorSet<std::string>
*src,
48
Mutex
&render_mutex);
49
50
/* Return true if all requests in b are in a. */
51
bool
drw_attributes_overlap
(
const
VectorSet<std::string>
*a,
const
VectorSet<std::string>
*
b
);
52
53
void
drw_attributes_add_request
(
VectorSet<std::string>
*attrs,
StringRef
name);
54
55
bool
drw_custom_data_match_attribute
(
const
CustomData
&custom_data,
56
StringRef
name,
57
int
*r_layer_index,
58
eCustomDataType
*r_type);
59
60
}
// namespace blender::draw
BLI_mutex.hh
BLI_string_ref.hh
BLI_sys_types.h
BLI_vector_set.hh
DNA_customdata_types.h
eCustomDataType
eCustomDataType
Definition
DNA_customdata_types.h:86
blender::StringRef
Definition
BLI_string_ref.hh:150
blender::VectorSet
Definition
BLI_vector_set.hh:92
b
b
Definition
compositor_morphological_distance_info.hh:24
blender::bke
Definition
AS_asset_library.hh:27
blender::bke::AttrDomain
AttrDomain
Definition
BKE_attribute.hh:63
blender::draw::gpencil::int8_t
signed char int8_t
Definition
gpencil_cache_utils.cc:76
blender::draw
Definition
DRW_engine.hh:170
blender::draw::drw_attributes_add_request
void drw_attributes_add_request(VectorSet< std::string > *attrs, const StringRef name)
Definition
draw_attributes.cc:35
blender::draw::drw_attributes_merge
void drw_attributes_merge(VectorSet< std::string > *dst, const VectorSet< std::string > *src, Mutex &render_mutex)
Definition
draw_attributes.cc:13
blender::draw::drw_attributes_overlap
bool drw_attributes_overlap(const VectorSet< std::string > *a, const VectorSet< std::string > *b)
Definition
draw_attributes.cc:24
blender::draw::drw_custom_data_match_attribute
bool drw_custom_data_match_attribute(const CustomData &custom_data, const StringRef name, int *r_layer_index, eCustomDataType *r_type)
Definition
draw_attributes.cc:43
blender::Mutex
std::mutex Mutex
Definition
BLI_mutex.hh:47
CustomData
Definition
DNA_customdata_types.h:67
blender::draw::DRW_MeshCDMask
Definition
draw_attributes.hh:29
blender::draw::DRW_MeshCDMask::sculpt_overlays
uint32_t sculpt_overlays
Definition
draw_attributes.hh:34
blender::draw::DRW_MeshCDMask::tan_orco
uint32_t tan_orco
Definition
draw_attributes.hh:33
blender::draw::DRW_MeshCDMask::edit_uv
uint32_t edit_uv
Definition
draw_attributes.hh:38
blender::draw::DRW_MeshCDMask::uv
uint32_t uv
Definition
draw_attributes.hh:30
blender::draw::DRW_MeshCDMask::tan
uint32_t tan
Definition
draw_attributes.hh:31
blender::draw::DRW_MeshCDMask::orco
uint32_t orco
Definition
draw_attributes.hh:32
Generated on
for Blender by
doxygen
1.16.1