diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 16:08:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 17:43:40 +0300 |
commit | 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 (patch) | |
tree | 63f1007a5262b4d6f1c1a96734c521d836eb6fc6 /source/blender/draw/intern | |
parent | 05f970847e12ce30e8c4c624677d94ae239ce2bc (diff) |
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
Diffstat (limited to 'source/blender/draw/intern')
22 files changed, 52 insertions, 52 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 5d5a506c1e7..ff3af9b28d1 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -82,7 +82,7 @@ typedef struct DRWShadingGroup DRWShadingGroup; typedef struct DRWUniform DRWUniform; typedef struct DRWView DRWView; -/* TODO Put it somewhere else? */ +/* TODO: Put it somewhere else? */ typedef struct BoundSphere { float center[3], radius; } BoundSphere; @@ -490,7 +490,7 @@ void DRW_shgroup_stencil_set(DRWShadingGroup *shgroup, uint write_mask, uint reference, uint compare_mask); -/* TODO remove this function. Obsolete version. mask is actually reference value. */ +/* TODO: remove this function. Obsolete version. mask is actually reference value. */ void DRW_shgroup_stencil_mask(DRWShadingGroup *shgroup, uint mask); /* Issue a clear command. */ diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index d55da3ed83b..5c83047b18f 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -580,7 +580,7 @@ static void circle_dashed_verts( } } -/* XXX TODO move that 1 unit cube to more common/generic place? */ +/* XXX TODO: move that 1 unit cube to more common/generic place? */ static const float bone_box_verts[8][3] = { {1.0f, 0.0f, 1.0f}, {1.0f, 0.0f, -1.0f}, @@ -762,7 +762,7 @@ GPUBatch *DRW_cache_normal_arrow_get(void) GPUVertBuf *vbo = GPU_vertbuf_create_with_format(&format); GPU_vertbuf_data_alloc(vbo, 2); - /* TODO real arrow. For now, it's a line positioned in the vertex shader. */ + /* TODO: real arrow. For now, it's a line positioned in the vertex shader. */ SHC.drw_normal_arrow = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO); } @@ -802,7 +802,7 @@ GPUBatch *DRW_cache_object_all_edges_get(Object *ob) case OB_MESH: return DRW_cache_mesh_all_edges_get(ob); - /* TODO, should match 'DRW_cache_object_surface_get' */ + /* TODO: should match #DRW_cache_object_surface_get. */ default: return NULL; } @@ -2181,7 +2181,7 @@ GPUBatch *DRW_cache_bone_envelope_solid_get(void) float lat = 0.0f; float co1[3], co2[3]; - /* Note: the poles are duplicated on purpose, to restart the strip. */ + /* NOTE: the poles are duplicated on purpose, to restart the strip. */ /* 1st sphere */ for (int j = 0; j < lat_res; j++, lat += lat_inc) { @@ -2627,7 +2627,7 @@ GPUBatch *DRW_cache_bone_dof_sphere_get(void) pz = z; } } - /* TODO allocate right count from the beginning. */ + /* TODO: allocate right count from the beginning. */ GPU_vertbuf_data_resize(vbo, v); SHC.drw_bone_dof_sphere = GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, NULL, GPU_BATCH_OWNS_VBO); @@ -3599,7 +3599,7 @@ void drw_batch_cache_generate_requested(Object *ob) } DRW_curve_batch_cache_create_requested(ob, scene); break; - /* TODO all cases */ + /* TODO: all cases. */ default: break; } @@ -3625,7 +3625,7 @@ void DRW_batch_cache_free_old(Object *ob, int ctime) DRW_mesh_batch_cache_free_old(mesh_eval, ctime); } break; - /* TODO all cases */ + /* TODO: all cases. */ default: break; } diff --git a/source/blender/draw/intern/draw_cache_impl_curve.cc b/source/blender/draw/intern/draw_cache_impl_curve.cc index c4cd547ef43..51bd4c535cd 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.cc +++ b/source/blender/draw/intern/draw_cache_impl_curve.cc @@ -363,7 +363,7 @@ static void curve_cd_calc_used_gpu_layers(CustomDataMask *cd_layers, int type = gpu_attr->type; /* Curves cannot have named layers. - * Note: We could relax this assumption later. */ + * NOTE: We could relax this assumption later. */ if (name[0] != '\0') { continue; } diff --git a/source/blender/draw/intern/draw_cache_impl_displist.c b/source/blender/draw/intern/draw_cache_impl_displist.c index 1d4f411c94d..1fed5d79697 100644 --- a/source/blender/draw/intern/draw_cache_impl_displist.c +++ b/source/blender/draw/intern/draw_cache_impl_displist.c @@ -365,7 +365,7 @@ static void surf_uv_quad(const DispList *dl, const uint quad[4], float r_uv[4][2 } for (int i = 0; i < 4; i++) { - /* Note: For some reason the shading U and V are swapped compared to the + /* NOTE: For some reason the shading U and V are swapped compared to the * one described in the surface format. */ /* find uv based on vertex index into grid array */ r_uv[i][0] = (quad[i] / dl->nr) / (float)orco_sizev; diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c index bea9ba1122b..233c3782855 100644 --- a/source/blender/draw/intern/draw_cache_impl_gpencil.c +++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c @@ -301,7 +301,7 @@ static void gpencil_buffer_add_point(gpStrokeVert *verts, int v, bool is_endpoint) { - /* Note: we use the sign of strength and thickness to pass cap flag. */ + /* NOTE: we use the sign of strength and thickness to pass cap flag. */ const bool round_cap0 = (gps->caps[0] == GP_STROKE_CAP_ROUND); const bool round_cap1 = (gps->caps[1] == GP_STROKE_CAP_ROUND); gpStrokeVert *vert = &verts[v]; diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.c b/source/blender/draw/intern/draw_cache_impl_lattice.c index eabef49fa22..0a1c7d9581a 100644 --- a/source/blender/draw/intern/draw_cache_impl_lattice.c +++ b/source/blender/draw/intern/draw_cache_impl_lattice.c @@ -84,7 +84,7 @@ static int lattice_render_verts_len_get(Lattice *lt) return vert_len_calc(u, v, w); } - /* TODO remove internal coords */ + /* TODO: remove internal coords. */ return vert_len_calc(u, v, w); } @@ -102,7 +102,7 @@ static int lattice_render_edges_len_get(Lattice *lt) return edge_len_calc(u, v, w); } - /* TODO remove internal coords */ + /* TODO: remove internal coords. */ return edge_len_calc(u, v, w); } @@ -305,7 +305,7 @@ void DRW_lattice_batch_cache_dirty_tag(Lattice *lt, int mode) cache->is_dirty = true; break; case BKE_LATTICE_BATCH_DIRTY_SELECT: - /* TODO Separate Flag vbo */ + /* TODO: Separate Flag VBO. */ GPU_BATCH_DISCARD_SAFE(cache->overlay_verts); break; default: diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 2fcbce2440e..41047191efe 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -1278,7 +1278,7 @@ GPUBatch *DRW_mesh_batch_cache_get_surface_edges(Mesh *me) * \{ */ /* Thread safety need to be assured by caller. Don't call this during drawing. - * Note: For now this only free the shading batches / vbo if any cd layers is + * NOTE: For now this only free the shading batches / vbo if any cd layers is * not needed anymore. */ void DRW_mesh_batch_cache_free_old(Mesh *me, int ctime) { @@ -1305,7 +1305,7 @@ static void drw_mesh_batch_cache_check_available(struct TaskGraph *task_graph, M { MeshBatchCache *cache = mesh_batch_cache_get(me); /* Make sure all requested batches have been setup. */ - /* Note: The next line creates a different scheduling than during release builds what can lead to + /* NOTE: The next line creates a different scheduling than during release builds what can lead to * some issues (See T77867 where we needed to disable this function in order to debug what was * happening in release builds). */ BLI_task_graph_work_and_wait(task_graph); diff --git a/source/blender/draw/intern/draw_cache_impl_metaball.c b/source/blender/draw/intern/draw_cache_impl_metaball.c index ff969f920da..4d3a990ec72 100644 --- a/source/blender/draw/intern/draw_cache_impl_metaball.c +++ b/source/blender/draw/intern/draw_cache_impl_metaball.c @@ -140,7 +140,7 @@ static void metaball_batch_cache_clear(MetaBall *mb) GPU_BATCH_DISCARD_SAFE(cache->edge_detection); GPU_VERTBUF_DISCARD_SAFE(cache->pos_nor_in_order); GPU_INDEXBUF_DISCARD_SAFE(cache->edges_adj_lines); - /* Note: shaded_triangles[0] is already freed by cache->batch */ + /* NOTE: shaded_triangles[0] is already freed by `cache->batch`. */ MEM_SAFE_FREE(cache->shaded_triangles); cache->mat_len = 0; cache->is_manifold = false; diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c index a9febcedbf9..879b73eab27 100644 --- a/source/blender/draw/intern/draw_cache_impl_particles.c +++ b/source/blender/draw/intern/draw_cache_impl_particles.c @@ -181,7 +181,7 @@ static void particle_batch_cache_clear_point(ParticlePointCache *point_cache) void particle_batch_cache_clear_hair(ParticleHairCache *hair_cache) { - /* TODO more granular update tagging. */ + /* TODO: more granular update tagging. */ GPU_VERTBUF_DISCARD_SAFE(hair_cache->proc_point_buf); DRW_TEXTURE_FREE_SAFE(hair_cache->point_tex); @@ -560,7 +560,7 @@ static int particle_batch_cache_fill_segments(ParticleSystem *psys, (is_simple && is_child) ? (*r_parent_uvs)[psys->child[i].parent][k] : uv[k]); } for (int k = 0; k < num_col_layers; k++) { - /* TODO Put the conversion outside the loop */ + /* TODO: Put the conversion outside the loop. */ ushort scol[4]; particle_pack_mcol( (is_simple && is_child) ? &(*r_parent_mcol)[psys->child[i].parent][k] : &mcol[k], @@ -587,7 +587,7 @@ static int particle_batch_cache_fill_segments(ParticleSystem *psys, uv[k]); } for (int k = 0; k < num_col_layers; k++) { - /* TODO Put the conversion outside the loop */ + /* TODO: Put the conversion outside the loop. */ ushort scol[4]; particle_pack_mcol((is_simple && is_child) ? &(*r_parent_mcol)[psys->child[i].parent][k] : &mcol[k], diff --git a/source/blender/draw/intern/draw_cache_inline.h b/source/blender/draw/intern/draw_cache_inline.h index 6e537a3bffa..b977d0cdda2 100644 --- a/source/blender/draw/intern/draw_cache_inline.h +++ b/source/blender/draw/intern/draw_cache_inline.h @@ -74,7 +74,7 @@ BLI_INLINE void DRW_ibo_request(GPUBatch *batch, GPUIndexBuf **ibo) BLI_INLINE bool DRW_ibo_requested(GPUIndexBuf *ibo) { - /* TODO do not rely on data uploaded. This prevents multithreading. + /* TODO: do not rely on data uploaded. This prevents multithreading. * (need access to a gl context) */ return (ibo != NULL && !GPU_indexbuf_is_init(ibo)); } diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index d3a90ccfbd0..62d715460bb 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -192,7 +192,7 @@ void DRW_globals_update(void) (max_ff(1.0f, UI_GetThemeValuef(TH_VERTEX_SIZE) * (float)M_SQRT2 / 2.0f)); gb->sizeVertexGpencil = U.pixelsize * UI_GetThemeValuef(TH_GP_VERTEX_SIZE); gb->sizeFaceDot = U.pixelsize * UI_GetThemeValuef(TH_FACEDOT_SIZE); - gb->sizeEdge = U.pixelsize * (1.0f / 2.0f); /* TODO Theme */ + gb->sizeEdge = U.pixelsize * (1.0f / 2.0f); /* TODO: Theme. */ gb->sizeEdgeFix = U.pixelsize * (0.5f + 2.0f * (2.0f * (gb->sizeEdge * (float)M_SQRT1_2))); const float(*screen_vecs)[3] = (float(*)[3])DRW_viewport_screenvecs_get(); @@ -210,7 +210,7 @@ void DRW_globals_update(void) { float *color = gb->UBO_FIRST_COLOR; do { - /* TODO more accurate transform. */ + /* TODO: more accurate transform. */ srgb_to_linearrgb_v4(color, color); color += 4; } while (color <= gb->UBO_LAST_COLOR); @@ -291,7 +291,7 @@ DRWView *DRW_view_create_with_zoffset(const DRWView *parent_view, /* ******************************************** COLOR UTILS ************************************ */ -/* TODO FINISH */ +/* TODO: FINISH. */ /** * Get the wire color theme_id of an object based on its state * \a r_color is a way to get a pointer to the static color var associated @@ -304,7 +304,7 @@ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color /* confusing logic here, there are 2 methods of setting the color * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id. * - * note: no theme yet for 'colindex' */ + * NOTE: no theme yet for 'colindex'. */ int theme_id = is_edit ? TH_WIRE_EDIT : TH_WIRE; if (is_edit) { diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h index 7e6e1f03f8a..1eaf2bee236 100644 --- a/source/blender/draw/intern/draw_common.h +++ b/source/blender/draw/intern/draw_common.h @@ -35,7 +35,7 @@ struct ViewLayer; /* Used as ubo but colors can be directly referenced as well */ /* Keep in sync with: common_globals_lib.glsl (globalsBlock) */ -/* NOTE! Also keep all color as vec4 and between UBO_FIRST_COLOR and UBO_LAST_COLOR */ +/* NOTE: Also keep all color as vec4 and between #UBO_FIRST_COLOR and #UBO_LAST_COLOR. */ typedef struct GlobalsUboStorage { /* UBOs data needs to be 16 byte aligned (size of vec4) */ float colorWire[4]; @@ -141,7 +141,7 @@ typedef struct GlobalsUboStorage { float colorUVShadow[4]; - /* NOTE! Put all color before UBO_LAST_COLOR */ + /* NOTE: Put all color before #UBO_LAST_COLOR. */ float screenVecs[2][4]; /* Padded as vec4. */ float sizeViewport[2], sizeViewportInv[2]; /* Packed as vec4 in GLSL. */ diff --git a/source/blender/draw/intern/draw_fluid.c b/source/blender/draw/intern/draw_fluid.c index a21402e6392..9cfdbf7c688 100644 --- a/source/blender/draw/intern/draw_fluid.c +++ b/source/blender/draw/intern/draw_fluid.c @@ -589,7 +589,7 @@ void DRW_fluid_ensure_range_field(FluidModifierData *fmd) #endif /* WITH_FLUID */ } -/* TODO Unify with the other GPU_free_smoke. */ +/* TODO: Unify with the other #GPU_free_smoke. */ void DRW_smoke_free_velocity(FluidModifierData *fmd) { if (fmd->type & MOD_FLUID_TYPE_DOMAIN && fmd->domain) { diff --git a/source/blender/draw/intern/draw_hair.c b/source/blender/draw/intern/draw_hair.c index d101df737ff..c2e25389091 100644 --- a/source/blender/draw/intern/draw_hair.c +++ b/source/blender/draw/intern/draw_hair.c @@ -197,7 +197,7 @@ static ParticleHairCache *drw_hair_particle_cache_get( return cache; } -/* Note: Only valid after DRW_hair_update(). */ +/* NOTE: Only valid after DRW_hair_update(). */ GPUVertBuf *DRW_hair_pos_buffer_get(Object *object, ParticleSystem *psys, ModifierData *md) { const DRWContextState *draw_ctx = DRW_context_state_get(); @@ -262,7 +262,7 @@ DRWShadingGroup *DRW_shgroup_hair_create_sub(Object *object, DRWShadingGroup *shgrp = DRW_shgroup_create_sub(shgrp_parent); - /* TODO optimize this. Only bind the ones GPUMaterial needs. */ + /* TODO: optimize this. Only bind the ones GPUMaterial needs. */ for (int i = 0; i < hair_cache->num_uv_layers; i++) { for (int n = 0; n < MAX_LAYER_NAME_CT && hair_cache->uv_layer_names[i][n][0] != '\0'; n++) { DRW_shgroup_uniform_texture(shgrp, hair_cache->uv_layer_names[i][n], hair_cache->uv_tex[i]); diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index db64c7deb63..62742d082ca 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -2315,7 +2315,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, } if (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT) { if (!(v3d->flag2 & V3D_HIDE_OVERLAYS)) { - /* Note: don't use "BKE_object_pose_armature_get" here, it breaks selection. */ + /* NOTE: don't use "BKE_object_pose_armature_get" here, it breaks selection. */ Object *obpose = OBPOSE_FROM_OBACT(obact); if (obpose == NULL) { Object *obweight = OBWEIGHTPAINT_FROM_OBACT(obact); @@ -3147,7 +3147,7 @@ void DRW_opengl_render_context_enable(void *re_gl_context) /* If thread is main you should use DRW_opengl_context_enable(). */ BLI_assert(!BLI_thread_is_main()); - /* TODO get rid of the blocking. Only here because of the static global DST. */ + /* TODO: get rid of the blocking. Only here because of the static global DST. */ BLI_ticket_mutex_lock(DST.gl_context_mutex); WM_opengl_context_activate(re_gl_context); } @@ -3155,7 +3155,7 @@ void DRW_opengl_render_context_enable(void *re_gl_context) void DRW_opengl_render_context_disable(void *re_gl_context) { WM_opengl_context_release(re_gl_context); - /* TODO get rid of the blocking. */ + /* TODO: get rid of the blocking. */ BLI_ticket_mutex_unlock(DST.gl_context_mutex); } diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 373b51a67e0..c4e8d0a980d 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -467,7 +467,7 @@ typedef struct DRWCommandSmallChunk { uint32_t command_len; uint32_t command_used; /* 4bits for each command. */ - /* TODO reduce size of command_type. */ + /* TODO: reduce size of command_type. */ uint64_t command_type[6]; DRWCommand commands[6]; } DRWCommandSmallChunk; @@ -498,7 +498,7 @@ typedef struct DRWDebugSphere { #define STENCIL_UNDEFINED 256 #define DRW_DRAWLIST_LEN 256 typedef struct DRWManager { - /* TODO clean up this struct a bit */ + /* TODO: clean up this struct a bit. */ /* Cache generation */ ViewportMemoryPool *vmempool; DRWInstanceDataList *idatalist; diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 5eedca4507e..0a0e1ba9ac3 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -94,7 +94,7 @@ void drw_resource_buffer_finish(ViewportMemoryPool *vmempool) int ubo_len = 1 + chunk_id - ((elem_id == 0) ? 1 : 0); size_t list_size = sizeof(GPUUniformBuf *) * ubo_len; - /* TODO find a better system. currently a lot of obinfos UBO are going to be unused + /* TODO: find a better system. currently a lot of obinfos UBO are going to be unused * if not rendering with Eevee. */ if (vmempool->matrices_ubo == NULL) { @@ -782,7 +782,7 @@ static void drw_command_set_mutable_state(DRWShadingGroup *shgroup, DRWState enable, DRWState disable) { - /* TODO Restrict what state can be changed. */ + /* TODO: Restrict what state can be changed. */ DRWCommandSetMutableState *cmd = drw_command_create(shgroup, DRW_CMD_DRWSTATE); cmd->enable = enable; cmd->disable = disable; @@ -1263,7 +1263,7 @@ static void drw_shgroup_init(DRWShadingGroup *shgroup, GPUShader *shader) shgroup, model_ubo_location, DRW_UNIFORM_BLOCK_OBMATS, NULL, 0, 0, 1); } else { - /* Note: This is only here to support old hardware fallback where uniform buffer is still + /* NOTE: This is only here to support old hardware fallback where uniform buffer is still * too slow or buggy. */ int model = GPU_shader_get_builtin_uniform(shader, GPU_UNIFORM_MODEL); int modelinverse = GPU_shader_get_builtin_uniform(shader, GPU_UNIFORM_MODEL_INV); @@ -1456,7 +1456,7 @@ void DRW_shgroup_stencil_set(DRWShadingGroup *shgroup, drw_command_set_stencil_mask(shgroup, write_mask, reference, compare_mask); } -/* TODO remove this function. */ +/* TODO: remove this function. */ void DRW_shgroup_stencil_mask(DRWShadingGroup *shgroup, uint mask) { drw_command_set_stencil_mask(shgroup, 0xFF, mask, 0xFF); diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index f29caebeb84..03679c51469 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -225,7 +225,7 @@ void drw_state_set(DRWState state) GPU_shadow_offset(false); } - /* TODO this should be part of shader state. */ + /* TODO: this should be part of shader state. */ if (state & DRW_STATE_CLIP_PLANES) { GPU_clip_distances(DST.view_active->clip_planes_len); } @@ -383,10 +383,10 @@ static bool draw_culling_sphere_test(const BoundSphere *frustum_bsphere, if (center_dist_sq > square_f(radius_sum)) { return false; } - /* TODO we could test against the inscribed sphere of the frustum to early out positively. */ + /* TODO: we could test against the inscribed sphere of the frustum to early out positively. */ /* Test against the 6 frustum planes. */ - /* TODO order planes with sides first then far then near clip. Should be better culling + /* TODO: order planes with sides first then far then near clip. Should be better culling * heuristic when sculpting. */ for (int p = 0; p < 6; p++) { float dist = plane_point_side_v3(frustum_planes[p], bsphere->center); @@ -818,7 +818,7 @@ static void draw_call_single_do(DRWShadingGroup *shgroup, draw_call_resource_bind(state, &handle); - /* TODO This is Legacy. Need to be removed. */ + /* TODO: This is Legacy. Need to be removed. */ if (state->obmats_loc == -1 && (state->obmat_loc != -1 || state->obinv_loc != -1)) { draw_legacy_matrix_update(shgroup, &handle, state->obmat_loc, state->obinv_loc); } @@ -1076,7 +1076,7 @@ static void drw_update_view(void) /* 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. */ + /* TODO: get rid of this. */ DST.view_storage_cpy = DST.view_active->storage; draw_compute_culling(DST.view_active); diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 2fb44d0030b..ae2c66881ff 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -266,7 +266,7 @@ void DRW_draw_gizmo_3d(void) ARegion *region = draw_ctx->region; /* draw depth culled gizmos - gizmos need to be updated *after* view matrix was set up */ - /* TODO depth culling gizmos is not yet supported, just drawing _3D here, should + /* TODO: depth culling gizmos is not yet supported, just drawing _3D here, should * later become _IN_SCENE (and draw _3D separate) */ WM_gizmomap_draw(region->gizmo_map, draw_ctx->evil_C, WM_GIZMOMAP_DRAWSTEP_3D); } diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc index 43ad28c2618..bdb9af1faf3 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc @@ -89,7 +89,7 @@ BLI_INLINE void lines_adjacency_triangle( *pval = POINTER_FROM_INT(NO_EDGE); bool inv_opposite = (v_data < 0); uint l_opposite = (uint)abs(v_data) - 1; - /* TODO Make this part thread-safe. */ + /* TODO: Make this part thread-safe. */ if (inv_opposite == inv_indices) { /* Don't share edge if triangles have non matching winding. */ GPU_indexbuf_add_line_adj_verts(elb, l1, l2, l3, l1); diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc index 5c78cc0b731..ac44e97f229 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc @@ -37,7 +37,7 @@ static void extract_select_idx_init_impl(const MeshRenderData *UNUSED(mr), GPUVertBuf *vbo = static_cast<GPUVertBuf *>(buf); static GPUVertFormat format = {0}; if (format.attr_len == 0) { - /* TODO rename "color" to something more descriptive. */ + /* TODO: rename "color" to something more descriptive. */ GPU_vertformat_attr_add(&format, "color", GPU_COMP_U32, 1, GPU_FETCH_INT); } GPU_vertbuf_init_with_format(vbo, &format); @@ -53,7 +53,7 @@ static void extract_select_idx_init(const MeshRenderData *mr, extract_select_idx_init_impl(mr, mr->loop_len + mr->loop_loose_len, buf, tls_data); } -/* TODO Use #glVertexID to get loop index and use the data structure on the CPU to retrieve the +/* TODO: Use #glVertexID to get loop index and use the data structure on the CPU to retrieve the * select element associated with this loop ID. This would remove the need for this separate * index VBO's. We could upload the p/e/v_origindex as a buffer texture and sample it inside the * shader to output original index. */ diff --git a/source/blender/draw/intern/shaders/common_view_lib.glsl b/source/blender/draw/intern/shaders/common_view_lib.glsl index 4012de4f95b..a980b87821a 100644 --- a/source/blender/draw/intern/shaders/common_view_lib.glsl +++ b/source/blender/draw/intern/shaders/common_view_lib.glsl @@ -18,7 +18,7 @@ layout(std140) uniform viewBlock * Fourth components are near and far values. */ vec4 ViewVecs[2]; - /* TODO move it elsewhere. */ + /* TODO: move it elsewhere. */ vec4 CameraTexCoFactors; }; @@ -45,7 +45,7 @@ float mul_project_m4_v3_zfac(in vec3 co) #endif /* Not the right place but need to be common to all overlay's. - * TODO Split to an overlay lib. */ + * TODO: Split to an overlay lib. */ mat4 extract_matrix_packed_data(mat4 mat, out vec4 dataA, out vec4 dataB) { const float div = 1.0 / 255.0; @@ -61,7 +61,7 @@ mat4 extract_matrix_packed_data(mat4 mat, out vec4 dataA, out vec4 dataB) } /* Same here, Not the right place but need to be common to all overlay's. - * TODO Split to an overlay lib. */ + * TODO: Split to an overlay lib. */ /* edge_start and edge_pos needs to be in the range [0..sizeViewport]. */ vec4 pack_line_data(vec2 frag_co, vec2 edge_start, vec2 edge_pos) { |