Blender  V3.3
draw_attributes.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2022 Blender Foundation. All rights reserved. */
3 
10 #pragma once
11 
12 #include "DNA_customdata_types.h"
13 #include "DNA_meshdata_types.h"
14 
15 #include "BKE_attribute.h"
16 
17 #include "BLI_sys_types.h"
18 #include "BLI_threads.h"
19 
20 #include "GPU_shader.h"
21 #include "GPU_vertex_format.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef struct DRW_AttributeRequest {
31  char attribute_name[64];
33 
34 typedef struct DRW_Attributes {
38 
39 void drw_attributes_clear(DRW_Attributes *attributes);
40 
42  const DRW_Attributes *src,
43  ThreadMutex *render_mutex);
44 
45 /* Return true if all requests in b are in a. */
47 
49  const char *name,
50  eCustomDataType data_type,
51  int layer_index,
52  eAttrDomain domain);
53 
54 bool drw_custom_data_match_attribute(const CustomData *custom_data,
55  const char *name,
56  int *r_layer_index,
57  eCustomDataType *r_type);
58 
59 #ifdef __cplusplus
60 }
61 #endif
Generic geometry attributes built on CustomData.
eAttrDomain
Definition: BKE_attribute.h:25
pthread_mutex_t ThreadMutex
Definition: BLI_threads.h:82
eCustomDataType
#define GPU_MAX_ATTR
Definition: GPU_shader.h:388
SyclQueue void void * src
void drw_attributes_merge(DRW_Attributes *dst, const DRW_Attributes *src, ThreadMutex *render_mutex)
bool drw_custom_data_match_attribute(const CustomData *custom_data, const char *name, int *r_layer_index, eCustomDataType *r_type)
struct DRW_Attributes DRW_Attributes
bool drw_attributes_overlap(const DRW_Attributes *a, const DRW_Attributes *b)
DRW_AttributeRequest * drw_attributes_add_request(DRW_Attributes *attrs, const char *name, eCustomDataType data_type, int layer_index, eAttrDomain domain)
void drw_attributes_clear(DRW_Attributes *attributes)
struct DRW_AttributeRequest DRW_AttributeRequest
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
eCustomDataType cd_type
DRW_AttributeRequest requests[GPU_MAX_ATTR]