diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 07:32:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 07:34:32 +0300 |
commit | 17a2820da8ad8ea23d336129f32e060e5746b047 (patch) | |
tree | 21f965c6f2d15a53fc67cd6dcad1a3a2a09df833 /source/blender/draw/intern | |
parent | a78130c6101517c09eed14215087ab3dfe36bc5c (diff) |
Cleanup: consistent TODO/FIXME formatting for names
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_pointcloud.c | 3 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/shaders/common_pointcloud_lib.glsl | 2 |
8 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 2744c55a231..6f40e04ab7e 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -423,7 +423,7 @@ void DRW_shgroup_call_ex(DRWShadingGroup *shgroup, #define DRW_shgroup_call_obmat(shgroup, geom, obmat) \ DRW_shgroup_call_ex(shgroup, NULL, obmat, geom, false, NULL) -/* TODO(fclem) remove this when we have DRWView */ +/* TODO(fclem): remove this when we have DRWView */ /* user_data is used by DRWCallVisibilityFn defined in DRWView. */ #define DRW_shgroup_call_with_callback(shgroup, geom, ob, user_data) \ DRW_shgroup_call_ex(shgroup, ob, NULL, geom, false, user_data) diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 4d7440a3276..0fbc9e2ed82 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -159,7 +159,7 @@ void DRW_shape_cache_free(void) GPUBatch *drw_cache_procedural_points_get(void) { if (!SHC.drw_procedural_verts) { - /* TODO(fclem) get rid of this dummy VBO. */ + /* TODO(fclem): get rid of this dummy VBO. */ GPUVertFormat format = {0}; GPU_vertformat_attr_add(&format, "dummy", GPU_COMP_F32, 1, GPU_FETCH_FLOAT); GPUVertBuf *vbo = GPU_vertbuf_create_with_format(&format); @@ -173,7 +173,7 @@ GPUBatch *drw_cache_procedural_points_get(void) GPUBatch *drw_cache_procedural_lines_get(void) { if (!SHC.drw_procedural_lines) { - /* TODO(fclem) get rid of this dummy VBO. */ + /* TODO(fclem): get rid of this dummy VBO. */ GPUVertFormat format = {0}; GPU_vertformat_attr_add(&format, "dummy", GPU_COMP_F32, 1, GPU_FETCH_FLOAT); GPUVertBuf *vbo = GPU_vertbuf_create_with_format(&format); @@ -187,7 +187,7 @@ GPUBatch *drw_cache_procedural_lines_get(void) GPUBatch *drw_cache_procedural_triangles_get(void) { if (!SHC.drw_procedural_tris) { - /* TODO(fclem) get rid of this dummy VBO. */ + /* TODO(fclem): get rid of this dummy VBO. */ GPUVertFormat format = {0}; GPU_vertformat_attr_add(&format, "dummy", GPU_COMP_F32, 1, GPU_FETCH_FLOAT); GPUVertBuf *vbo = GPU_vertbuf_create_with_format(&format); diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.c b/source/blender/draw/intern/draw_cache_impl_pointcloud.c index 5c25ccec314..74020a228e7 100644 --- a/source/blender/draw/intern/draw_cache_impl_pointcloud.c +++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.c @@ -179,7 +179,8 @@ static void pointcloud_batch_cache_ensure_pos(Object *ob, PointCloudBatchCache * float(*vbo_data)[4] = (float(*)[4])GPU_vertbuf_get_data(cache->pos); for (int i = 0; i < pointcloud->totpoint; i++) { copy_v3_v3(vbo_data[i], pointcloud->co[i]); - /* TODO(fclem) remove multiplication here. Here only for keeping the size correct for now. */ + /* TODO(fclem): remove multiplication here. + * Here only for keeping the size correct for now. */ vbo_data[i][3] = pointcloud->radius[i] * 100.0f; } } diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index f6585550842..df1f4d8f405 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -308,7 +308,7 @@ struct DupliObject *DRW_object_get_dupli(const Object *UNUSED(ob)) /** \name Color Management * \{ */ -/* TODO(fclem) This should be a render engine callback to determine if we need CM or not. */ +/* TODO(fclem): This should be a render engine callback to determine if we need CM or not. */ static void drw_viewport_colormanagement_set(void) { Scene *scene = DST.draw_ctx.scene; @@ -525,7 +525,7 @@ static void draw_unit_state_create(void) infos->ob_flag = 1.0f; copy_v3_fl(infos->ob_color, 1.0f); - /* TODO(fclem) get rid of this. */ + /* TODO(fclem): get rid of this. */ culling->bsphere.radius = -1.0f; culling->user_data = NULL; @@ -2594,7 +2594,7 @@ void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, cons GPUViewport *viewport = WM_draw_region_get_viewport(region); if (!viewport) { /* Selection engine requires a viewport. - * TODO (germano): This should be done internally in the engine. */ + * TODO(germano): This should be done internally in the engine. */ sel_ctx->is_dirty = true; sel_ctx->objects_drawn_len = 0; sel_ctx->index_drawn_len = 1; diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 9f6a970ea22..e40328c0f2e 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -495,7 +495,7 @@ typedef struct DRWManager { struct Object *dupli_origin; /** Ghash containing original objects. */ struct GHash *dupli_ghash; - /** TODO(fclem) try to remove usage of this. */ + /** TODO(fclem): try to remove usage of this. */ DRWInstanceData *object_instance_data[MAX_INSTANCE_DATA_SIZE]; /* Array of dupli_data (one for each enabled engine) to handle duplis. */ void **dupli_datas; @@ -542,7 +542,7 @@ typedef struct DRWManager { DRWView *view_active; DRWView *view_previous; uint primary_view_ct; - /** TODO(fclem) Remove this. Only here to support + /** TODO(fclem): Remove this. Only here to support * shaders without common_view_lib.glsl */ DRWViewUboStorage view_storage_cpy; @@ -567,7 +567,7 @@ typedef struct DRWManager { GPUDrawList *draw_list; struct { - /* TODO(fclem) optimize: use chunks. */ + /* TODO(fclem): optimize: use chunks. */ DRWDebugLine *lines; DRWDebugSphere *spheres; } debug; diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 7fe3bc0f071..5f394804bcf 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -510,7 +510,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, Object *ob) /* Random float value. */ uint random = (DST.dupli_source) ? DST.dupli_source->random_id : - /* TODO(fclem) this is rather costly to do at runtime. Maybe we can + /* TODO(fclem): this is rather costly to do at runtime. Maybe we can * put it in ob->runtime and make depsgraph ensure it is up to date. */ BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0); ob_infos->ob_random = random * (1.0f / (float)0xFFFFFFFF); diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 444ecbc1e54..808b5cc675b 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -483,8 +483,8 @@ static void draw_compute_culling(DRWView *view) { view = view->parent ? view->parent : view; - /* TODO(fclem) multithread this. */ - /* TODO(fclem) compute all dirty views at once. */ + /* TODO(fclem): multi-thread this. */ + /* TODO(fclem): compute all dirty views at once. */ if (!view->is_dirty) { return; } @@ -1042,7 +1042,7 @@ static void draw_shgroup(DRWShadingGroup *shgroup, DRWState pass_state) static void drw_update_view(void) { - /* TODO(fclem) update a big UBO and only bind ranges here. */ + /* TODO(fclem): update a big UBO and only bind ranges here. */ GPU_uniformbuf_update(G_draw.view_ubo, &DST.view_active->storage); /* TODO get rid of this. */ diff --git a/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl b/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl index 625e8bb1ff8..f007a8c2322 100644 --- a/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl +++ b/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl @@ -25,7 +25,7 @@ void pointcloud_get_pos_and_nor(out vec3 outpos, out vec3 outnor) mat3 facing_mat = pointcloud_get_facing_matrix(p); float radius = dot(abs(mat3(ModelMatrix) * pos.www), vec3(1.0 / 3.0)); - /* TODO(fclem) remove multiplication here. Here only for keeping the size correct for now. */ + /* TODO(fclem): remove multiplication here. Here only for keeping the size correct for now. */ radius *= 0.01; outpos = p + (facing_mat * pos_inst) * radius; outnor = facing_mat * nor; |