From 68cab3aff63aea95830aa082a160200768d0e826 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 29 Jan 2019 07:46:25 +1100 Subject: Cleanup: replace attrib w/ attr Also rename GPUVertexAttribs to GPUVertAttrLayers, avoids confusion with GPUVertAttr which isn't closely related. --- source/blender/draw/intern/draw_cache_impl_curve.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/draw/intern/draw_cache_impl_curve.c') diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c index b18168a6816..742ca20ba83 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.c +++ b/source/blender/draw/intern/draw_cache_impl_curve.c @@ -304,16 +304,16 @@ static int curve_render_data_normal_len_get(const CurveRenderData *rdata) static void curve_cd_calc_used_gpu_layers(int *cd_layers, struct GPUMaterial **gpumat_array, int gpumat_array_len) { - GPUVertexAttribs gattribs = {{{0}}}; + 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_attributes(gpumat, &gattribs); - for (int j = 0; j < gattribs.totlayer; j++) { - const char *name = gattribs.layer[j].name; - int type = gattribs.layer[j].type; + 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; /* Curves cannot have named layers. * Note: We could relax this assumption later. */ @@ -662,7 +662,7 @@ static void curve_create_edit_curves_nor(CurveRenderData *rdata, GPUVertBuf *vbo GPUPackedNormal pnor = GPU_normal_convert_i10_v3(nor); GPUPackedNormal ptan = GPU_normal_convert_i10_v3(bevp->dir); - /* Only set attribs for one vertex. */ + /* Only set attributes for one vertex. */ GPU_vertbuf_attr_set(vbo_curves_nor, attr_id.pos, vbo_len_used, bevp->vec); GPU_vertbuf_attr_set(vbo_curves_nor, attr_id.rad, vbo_len_used, &bevp->radius); GPU_vertbuf_attr_set(vbo_curves_nor, attr_id.nor, vbo_len_used, &pnor); @@ -897,7 +897,7 @@ void DRW_curve_batch_cache_create_requested(Object *ob) Curve *cu = ob->data; CurveBatchCache *cache = curve_batch_cache_get(cu); - /* Verify that all surface batches have needed attrib layers. */ + /* Verify that all surface batches have needed attribute layers. */ /* TODO(fclem): We could be a bit smarter here and only do it per material. */ for (int i = 0; i < cache->mat_len; ++i) { if ((cache->cd_used & cache->cd_needed) != cache->cd_needed) { -- cgit v1.2.3