Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-06-05 13:04:42 +0300
committerHans Goudey <h.goudey@me.com>2022-06-05 13:04:58 +0300
commit176d7bcc2eb47b9820861037f90a7fb26de8c9a0 (patch)
tree6ca43f27d9ab8ad4a711a9d58214324c24dd7351 /source/blender/draw/intern/draw_attributes.cc
parent31da775ec292731790e79d09b76e92ae36ac34f3 (diff)
Cleanup: Move remaining mesh draw code to C++
After this commit, all mesh data extraction and drawing code is in C++, including headers, making it possible to use improved types for future performance improvements and simplifications. The only non-trivial changes are in `draw_cache_impl_mesh.cc`, where use of certain features and macros in C necessitated larger changes. Differential Revision: https://developer.blender.org/D15088
Diffstat (limited to 'source/blender/draw/intern/draw_attributes.cc')
-rw-r--r--source/blender/draw/intern/draw_attributes.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_attributes.cc b/source/blender/draw/intern/draw_attributes.cc
index f84a6c86fac..8fb4210901f 100644
--- a/source/blender/draw/intern/draw_attributes.cc
+++ b/source/blender/draw/intern/draw_attributes.cc
@@ -84,9 +84,9 @@ DRW_AttributeRequest *drw_attributes_add_request(DRW_Attributes *attrs,
bool drw_custom_data_match_attribute(const CustomData *custom_data,
const char *name,
int *r_layer_index,
- int *r_type)
+ eCustomDataType *r_type)
{
- const int possible_attribute_types[7] = {
+ const eCustomDataType possible_attribute_types[7] = {
CD_PROP_BOOL,
CD_PROP_INT8,
CD_PROP_INT32,
@@ -97,7 +97,7 @@ bool drw_custom_data_match_attribute(const CustomData *custom_data,
};
for (int i = 0; i < ARRAY_SIZE(possible_attribute_types); i++) {
- const int attr_type = possible_attribute_types[i];
+ const eCustomDataType attr_type = possible_attribute_types[i];
int layer_index = CustomData_get_named_layer(custom_data, attr_type, name);
if (layer_index == -1) {
continue;