diff options
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache.h | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_displist.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_hair.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_common.c | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_hair.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 26 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 8 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_texture.c | 2 |
13 files changed, 36 insertions, 36 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 4a43107c612..2545cfa65dc 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -93,7 +93,7 @@ typedef char DRWViewportEmptyList; #define DRW_VIEWPORT_LIST_SIZE(list) \ (sizeof(list) == sizeof(DRWViewportEmptyList) ? 0 : ((sizeof(list)) / sizeof(void *))) -/* Unused members must be either pass list or 'char *' when not usd. */ +/* Unused members must be either pass list or 'char *' when not used. */ #define DRW_VIEWPORT_DATA_SIZE(ty) \ { \ DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->fbl)), DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->txl)), \ @@ -327,14 +327,14 @@ typedef enum { /** Culling test */ DRW_STATE_CULL_BACK = (1 << 7), DRW_STATE_CULL_FRONT = (1 << 8), - /** Stencil test . These options are mutal exclusive and packed into 2 bits*/ + /** Stencil test . These options are mutually exclusive and packed into 2 bits. */ DRW_STATE_STENCIL_ALWAYS = (1 << 9), DRW_STATE_STENCIL_EQUAL = (2 << 9), DRW_STATE_STENCIL_NEQUAL = (3 << 9), /** Blend state. These options are mutual exclusive and packed into 4 bits */ DRW_STATE_BLEND_ADD = (1 << 11), - /** Same as additive but let alpha accumulate without premult. */ + /** Same as additive but let alpha accumulate without pre-multiply. */ DRW_STATE_BLEND_ADD_FULL = (2 << 11), /** Standard alpha blending. */ DRW_STATE_BLEND_ALPHA = (3 << 11), diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 5333f59bf38..fcd626eb92b 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -1325,7 +1325,7 @@ GPUBatch *DRW_cache_field_vortex_get(void) #undef SPIRAL_RESOL } -/* Screenaligned circle. */ +/* Screen-aligned circle. */ GPUBatch *DRW_cache_field_curve_get(void) { #define CIRCLE_RESOL 32 @@ -1414,7 +1414,7 @@ GPUBatch *DRW_cache_field_cone_limit_get(void) #undef CIRCLE_RESOL } -/* Screenaligned dashed circle */ +/* Screen-aligned dashed circle */ GPUBatch *DRW_cache_field_sphere_limit_get(void) { #define CIRCLE_RESOL 32 @@ -3385,7 +3385,7 @@ GPUBatch *DRW_cache_particles_get_prim(int type) int v = 0; int flag = VCLASS_EMPTY_AXES; - /* Set minimum to 0.001f so we can easilly normalize to get the color. */ + /* Set minimum to 0.001f so we can easily normalize to get the color. */ GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0f, 0.0001f, 0.0f}, flag}); GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0f, 2.0f, 0.0f}, flag}); GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0001f, 0.0f, 0.0f}, flag}); diff --git a/source/blender/draw/intern/draw_cache.h b/source/blender/draw/intern/draw_cache.h index 9fd7ffd4692..c15c246992d 100644 --- a/source/blender/draw/intern/draw_cache.h +++ b/source/blender/draw/intern/draw_cache.h @@ -239,7 +239,7 @@ typedef struct DRWVolumeGrid { float texture_to_object[4][4]; float object_to_texture[4][4]; - /* Transfrom from bounds to texture space. */ + /* Transform from bounds to texture space. */ float object_to_bounds[4][4]; float bounds_to_texture[4][4]; } DRWVolumeGrid; diff --git a/source/blender/draw/intern/draw_cache_impl_displist.c b/source/blender/draw/intern/draw_cache_impl_displist.c index 72f3e7b0fa8..d606f70db9e 100644 --- a/source/blender/draw/intern/draw_cache_impl_displist.c +++ b/source/blender/draw/intern/draw_cache_impl_displist.c @@ -774,7 +774,7 @@ void DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan(ListBase *lb, } } -/* Edge detection/adjecency */ +/* Edge detection/adjacency. */ #define NO_EDGE INT_MAX static void set_edge_adjacency_lines_indices( EdgeHash *eh, GPUIndexBufBuilder *elb, bool *r_is_manifold, uint v1, uint v2, uint v3) diff --git a/source/blender/draw/intern/draw_cache_impl_hair.c b/source/blender/draw/intern/draw_cache_impl_hair.c index 327a92a997e..fd28ac00186 100644 --- a/source/blender/draw/intern/draw_cache_impl_hair.c +++ b/source/blender/draw/intern/draw_cache_impl_hair.c @@ -318,7 +318,7 @@ bool hair_ensure_procedural_data(Object *object, HairBatchCache *cache = hair_batch_cache_get(hair); *r_hair_cache = &cache->hair; - const int steps = 2; /* TODO: don't hardcode? */ + const int steps = 2; /* TODO: don't hard-code? */ (*r_hair_cache)->final[subdiv].strands_res = 1 << (steps + subdiv); /* Refreshed on combing and simulation. */ diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 3f014a01680..1a1caa2943a 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -405,7 +405,7 @@ static void drw_mesh_weight_state_extract(Object *ob, &wstate->defgroup_sel_count); } } - /* With only one selected bone Multipaint reverts to regular mode. */ + /* With only one selected bone Multi-paint reverts to regular mode. */ else { wstate->defgroup_sel_count = 0; MEM_SAFE_FREE(wstate->defgroup_sel); diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 5029e71cac8..fef8ba4b606 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -161,7 +161,7 @@ void DRW_globals_update(void) /* Grid */ UI_GetThemeColorShade4fv(TH_GRID, 10, gb->colorGrid); - /* emphasise division lines lighter instead of darker, if background is darker than grid */ + /* Emphasize division lines lighter instead of darker, if background is darker than grid. */ UI_GetThemeColorShade4fv( TH_GRID, (gb->colorGrid[0] + gb->colorGrid[1] + gb->colorGrid[2] + 0.12f > @@ -333,7 +333,7 @@ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color theme_id = TH_EMPTY; break; case OB_LIGHTPROBE: - /* TODO add lightprobe color */ + /* TODO: add light-probe color. */ theme_id = TH_EMPTY; break; default: diff --git a/source/blender/draw/intern/draw_hair.c b/source/blender/draw/intern/draw_hair.c index 86f1b0e0ebb..bca227a24e2 100644 --- a/source/blender/draw/intern/draw_hair.c +++ b/source/blender/draw/intern/draw_hair.c @@ -320,7 +320,7 @@ void DRW_hair_update(void) max_size = max_ii(max_size, pr_call->vert_len); } - /* Create target Texture / Framebuffer */ + /* Create target Texture / Frame-buffer */ /* Don't use max size as it can be really heavy and fail. * Do chunks of maximum 2048 * 2048 hair points. */ int width = 2048; diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index cf78959e712..8f8a863f721 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1570,13 +1570,13 @@ void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, drw_engines_enable(view_layer, engine_type, gpencil_engine_needed); drw_engines_data_validate(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); drw_debug_init(); DRW_hair_init(); - /* No framebuffer allowed before drawing. */ + /* No frame-buffer allowed before drawing. */ BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); /* Init engines */ @@ -1642,7 +1642,7 @@ void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, DRW_draw_callbacks_post_scene(); if (WM_draw_region_get_bound_viewport(region)) { - /* Don't unbind the framebuffer yet in this case and let + /* Don't unbind the frame-buffer yet in this case and let * GPU_viewport_unbind do it, so that we can still do further * drawing of action zones on top. */ } @@ -2083,12 +2083,12 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, drw_engines_enable_editors(); drw_engines_data_validate(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); drw_debug_init(); - /* No framebuffer allowed before drawing. */ + /* No frame-buffer allowed before drawing. */ BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); GPU_framebuffer_bind(DST.default_framebuffer); GPU_framebuffer_clear_depth_stencil(DST.default_framebuffer, 1.0f, 0xFF); @@ -2186,7 +2186,7 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, GPU_depth_test(GPU_DEPTH_LESS_EQUAL); if (WM_draw_region_get_bound_viewport(region)) { - /* Don't unbind the framebuffer yet in this case and let + /* Don't unbind the frame-buffer yet in this case and let * GPU_viewport_unbind do it, so that we can still do further * drawing of action zones on top. */ } @@ -2368,7 +2368,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, drw_context_state_init(); drw_viewport_var_init(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); /* Init engines */ @@ -2440,7 +2440,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, DRW_render_instance_buffer_finish(); } - /* Setup framebuffer */ + /* Setup frame-buffer. */ draw_select_framebuffer_depth_only_setup(viewport_size); GPU_framebuffer_bind(g_select_buffer.framebuffer_depth_only); GPU_framebuffer_clear_depth(g_select_buffer.framebuffer_depth_only, 1.0f); @@ -2516,7 +2516,7 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph, drw_task_graph_init(); drw_engines_data_validate(); - /* Setup framebuffer */ + /* Setup frame-buffer. */ DefaultFramebufferList *fbl = (DefaultFramebufferList *)GPU_viewport_framebuffer_list_get( DST.viewport); GPU_framebuffer_bind(fbl->depth_only_fb); @@ -2526,7 +2526,7 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph, drw_context_state_init(); drw_viewport_var_init(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); /* Init engines */ @@ -2582,7 +2582,7 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph, drw_state_ensure_not_reused(&DST); #endif - /* Changin context */ + /* Changing context. */ if (use_opengl_context) { DRW_opengl_context_disable(); } @@ -2666,7 +2666,7 @@ void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, cons DST.viewport = viewport; drw_viewport_var_init(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); /* Init Select Engine */ @@ -2723,7 +2723,7 @@ void DRW_draw_depth_object( GPU_matrix_set(rv3d->viewmat); GPU_matrix_mul(object->obmat); - /* Setup framebuffer */ + /* Setup frame-buffer. */ DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport); GPU_framebuffer_bind(fbl->depth_only_fb); diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 3ab60bc3c96..f540ff09032 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -266,14 +266,14 @@ typedef union DRWCommand { DRWCommandClear clear; } DRWCommand; -/* Used for agregating calls into GPUVertBufs. */ +/** Used for aggregating calls into #GPUVertBuf's. */ struct DRWCallBuffer { GPUVertBuf *buf; GPUVertBuf *buf_select; int count; }; -/* Used by DRWUniform.type */ +/** Used by #DRWUniform.type */ typedef enum { DRW_UNIFORM_INT = 0, DRW_UNIFORM_INT_COPY, @@ -324,8 +324,8 @@ struct DRWUniform { /* DRW_UNIFORM_BLOCK_OBATTRS */ struct GPUUniformAttrList *uniform_attrs; }; - int location; /* Uniform location or binding point for textures and ubos. */ - uint8_t type; /* DRWUniformType */ + int location; /* Uniform location or binding point for textures and UBO's. */ + uint8_t type; /* #DRWUniformType */ uint8_t length; /* Length of vector types. */ uint8_t arraysize; /* Array size of scalar/vector types. */ }; diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 57b3373932e..6bdc5305fed 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -978,7 +978,7 @@ static void drw_sculpt_get_frustum_planes(Object *ob, float planes[6][4]) static void drw_sculpt_generate_calls(DRWSculptCallbackData *scd) { - /* PBVH should always exist for non-empty meshes, created by depsgrah eval. */ + /* PBVH should always exist for non-empty meshes, created by depsgraph eval. */ PBVH *pbvh = (scd->ob->sculpt) ? scd->ob->sculpt->pbvh : NULL; if (!pbvh) { return; @@ -1601,10 +1601,10 @@ static void draw_frustum_bound_sphere_calc(const BoundBox *bbox, /* Detect which of the corner of the far clipping plane is the farthest to the origin */ float nfar[4]; /* most extreme far point in NDC space */ - float farxy[2]; /* farpoint projection onto the near plane */ + float farxy[2]; /* far-point projection onto the near plane */ float farpoint[3] = {0.0f}; /* most extreme far point in camera coordinate */ float nearpoint[3]; /* most extreme near point in camera coordinate */ - float farcenter[3] = {0.0f}; /* center of far cliping plane in camera coordinate */ + float farcenter[3] = {0.0f}; /* center of far clipping plane in camera coordinate */ float F = -1.0f, N; /* square distance of far and near point to origin */ float f, n; /* distance of far and near point to z axis. f is always > 0 but n can be < 0 */ float e, s; /* far and near clipping distance (<0) */ diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 67778584d25..4c8fcb0e016 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -272,7 +272,7 @@ static void drw_stencil_state_set(uint write_mask, uint reference, uint compare_ GPU_stencil_compare_mask_set(compare_mask); } -/* Reset state to not interfer with other UI drawcall */ +/* Reset state to not interfere with other UI draw-call. */ void DRW_state_reset_ex(DRWState state) { DST.state = ~state; @@ -855,7 +855,7 @@ static void draw_call_batching_do(DRWShadingGroup *shgroup, DRWCommandsState *state, DRWCommandDraw *call) { - /* If any condition requires to interupt the merging. */ + /* If any condition requires to interrupt the merging. */ bool neg_scale = DRW_handle_negative_scale_get(&call->handle); int chunk = DRW_handle_chunk_get(&call->handle); int id = DRW_handle_id_get(&call->handle); diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c index 8b948e62cf3..e9432f370b8 100644 --- a/source/blender/draw/intern/draw_manager_texture.c +++ b/source/blender/draw/intern/draw_manager_texture.c @@ -26,7 +26,7 @@ /* Maybe gpu_texture.c is a better place for this. */ static bool drw_texture_format_supports_framebuffer(eGPUTextureFormat format) { - /* Some formats do not work with framebuffers. */ + /* Some formats do not work with frame-buffers. */ switch (format) { /* Only add formats that are COMPATIBLE with FB. * Generally they are multiple of 16bit. */ |