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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-14 12:47:20 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-15 23:09:29 +0300
commit322dc723165a705c34df1e3246e500da1a9927de (patch)
treed82e780e36c89b327d58aa2b8ee215ee8a9fd514 /source/blender/draw/intern/draw_cache_impl_curve.c
parent007f1b74a67302fb4c164eb26969419434a98aee (diff)
Cleanup: refactor GPU material attribute and texture requests
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_curve.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curve.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index 1c3996e2290..20eff0fb6b8 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -307,16 +307,16 @@ static void curve_cd_calc_used_gpu_layers(int *cd_layers,
struct GPUMaterial **gpumat_array,
int gpumat_array_len)
{
- GPUVertAttrLayers gpu_attrs = {{{0}}};
for (int i = 0; i < gpumat_array_len; i++) {
struct GPUMaterial *gpumat = gpumat_array[i];
if (gpumat == NULL) {
continue;
}
- GPU_material_vertex_attrs(gpumat, &gpu_attrs);
- for (int j = 0; j < gpu_attrs.totlayer; j++) {
- const char *name = gpu_attrs.layer[j].name;
- int type = gpu_attrs.layer[j].type;
+
+ ListBase gpu_attrs = GPU_material_attributes(gpumat);
+ for (GPUMaterialAttribute *gpu_attr = gpu_attrs.first; gpu_attr; gpu_attr = gpu_attr->next) {
+ const char *name = gpu_attr->name;
+ int type = gpu_attr->type;
/* Curves cannot have named layers.
* Note: We could relax this assumption later. */