diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-18 18:17:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-18 18:19:44 +0300 |
commit | 4439e5d0ba3ffde3841ec44405a9bcaf800be279 (patch) | |
tree | d0955d8e18d854603da54bed39c46ef9627c4736 /source/blender/draw | |
parent | 098f75897e3ddf4bb93f64cecb322d7370127419 (diff) |
Cleanup: add trailing commas to avoid right shift
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_render.c | 10 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 54 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 14 |
3 files changed, 46 insertions, 32 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c index 40937f317ad..e6a3f45d60d 100644 --- a/source/blender/draw/engines/gpencil/gpencil_render.c +++ b/source/blender/draw/engines/gpencil/gpencil_render.c @@ -138,10 +138,12 @@ static void GPENCIL_render_update_viewvecs(float invproj[4][4], { /* view vectors for the corners of the view frustum. * Can be used to recreate the world space position easily */ - float view_vecs[4][4] = {{-1.0f, -1.0f, -1.0f, 1.0f}, - {1.0f, -1.0f, -1.0f, 1.0f}, - {-1.0f, 1.0f, -1.0f, 1.0f}, - {-1.0f, -1.0f, 1.0f, 1.0f}}; + float view_vecs[4][4] = { + {-1.0f, -1.0f, -1.0f, 1.0f}, + {1.0f, -1.0f, -1.0f, 1.0f}, + {-1.0f, 1.0f, -1.0f, 1.0f}, + {-1.0f, -1.0f, 1.0f, 1.0f}, + }; /* convert the view vectors to view space */ const bool is_persp = (winmat[3][3] == 0.0f); diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 7099f6ca573..6b6a79bfb60 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -482,8 +482,9 @@ GPUBatch *DRW_cache_empty_cube_get(void) {1.0f, 1.0f, 1.0f}, }; - const GLubyte indices[24] = {0, 1, 1, 3, 3, 2, 2, 0, 0, 4, 4, 5, - 5, 7, 7, 6, 6, 4, 1, 5, 3, 7, 2, 6}; + const GLubyte indices[24] = { + 0, 1, 1, 3, 3, 2, 2, 0, 0, 4, 4, 5, 5, 7, 7, 6, 6, 4, 1, 5, 3, 7, 2, 6, + }; /* Position Only 3D format */ static GPUVertFormat format = {0}; @@ -659,17 +660,20 @@ GPUBatch *DRW_cache_gpencil_axes_get(void) float v2[3] = {0.0f, 0.0f, 0.0f}; /* cube data */ - const GLfloat verts[8][3] = {{-0.25f, -0.25f, -0.25f}, - {-0.25f, -0.25f, 0.25f}, - {-0.25f, 0.25f, -0.25f}, - {-0.25f, 0.25f, 0.25f}, - {0.25f, -0.25f, -0.25f}, - {0.25f, -0.25f, 0.25f}, - {0.25f, 0.25f, -0.25f}, - {0.25f, 0.25f, 0.25f}}; - - const GLubyte indices[24] = {0, 1, 1, 3, 3, 2, 2, 0, 0, 4, 4, 5, - 5, 7, 7, 6, 6, 4, 1, 5, 3, 7, 2, 6}; + const GLfloat verts[8][3] = { + {-0.25f, -0.25f, -0.25f}, + {-0.25f, -0.25f, 0.25f}, + {-0.25f, 0.25f, -0.25f}, + {-0.25f, 0.25f, 0.25f}, + {0.25f, -0.25f, -0.25f}, + {0.25f, -0.25f, 0.25f}, + {0.25f, 0.25f, -0.25f}, + {0.25f, 0.25f, 0.25f}, + }; + + const GLubyte indices[24] = { + 0, 1, 1, 3, 3, 2, 2, 0, 0, 4, 4, 5, 5, 7, 7, 6, 6, 4, 1, 5, 3, 7, 2, 6, + }; /* Position Only 3D format */ static GPUVertFormat format = {0}; @@ -1746,11 +1750,13 @@ GPUBatch *DRW_cache_light_spot_volume_get(void) GPUBatch *DRW_cache_light_spot_square_get(void) { if (!SHC.drw_light_spot_square) { - float p[5][3] = {{0.0f, 0.0f, 0.0f}, - {1.0f, 1.0f, -1.0f}, - {1.0f, -1.0f, -1.0f}, - {-1.0f, -1.0f, -1.0f}, - {-1.0f, 1.0f, -1.0f}}; + float p[5][3] = { + {0.0f, 0.0f, 0.0f}, + {1.0f, 1.0f, -1.0f}, + {1.0f, -1.0f, -1.0f}, + {-1.0f, -1.0f, -1.0f}, + {-1.0f, 1.0f, -1.0f}, + }; uint v_idx = 0; @@ -1783,11 +1789,13 @@ GPUBatch *DRW_cache_light_spot_square_get(void) GPUBatch *DRW_cache_light_spot_square_volume_get(void) { if (!SHC.drw_light_spot_square_volume) { - float p[5][3] = {{0.0f, 0.0f, 0.0f}, - {1.0f, 1.0f, -1.0f}, - {1.0f, -1.0f, -1.0f}, - {-1.0f, -1.0f, -1.0f}, - {-1.0f, 1.0f, -1.0f}}; + float p[5][3] = { + {0.0f, 0.0f, 0.0f}, + {1.0f, 1.0f, -1.0f}, + {1.0f, -1.0f, -1.0f}, + {-1.0f, -1.0f, -1.0f}, + {-1.0f, 1.0f, -1.0f}, + }; uint v_idx = 0; diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 1072efb7edd..7d42f59fea0 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1854,8 +1854,10 @@ static void camera_view3d_stereoscopy_display_extra(OBJECT_ShadingGroupList *sgl static float one = 1.0f; float plane_mat[4][4], scale_mat[4][4]; float scale_factor[3] = {1.0f, 1.0f, 1.0f}; - float color_plane[2][4] = {{0.0f, 0.0f, 0.0f, v3d->stereo3d_convergence_alpha}, - {0.0f, 0.0f, 0.0f, 1.0f}}; + float color_plane[2][4] = { + {0.0f, 0.0f, 0.0f, v3d->stereo3d_convergence_alpha}, + {0.0f, 0.0f, 0.0f, 1.0f}, + }; const float height = convergence_plane[1][1] - convergence_plane[0][1]; const float width = convergence_plane[2][0] - convergence_plane[0][0]; @@ -1878,9 +1880,11 @@ static void camera_view3d_stereoscopy_display_extra(OBJECT_ShadingGroupList *sgl /* Draw convergence volume. */ if (is_stereo3d_volume && !is_select) { static float one = 1.0f; - float color_volume[3][4] = {{0.0f, 1.0f, 1.0f, v3d->stereo3d_volume_alpha}, - {1.0f, 0.0f, 0.0f, v3d->stereo3d_volume_alpha}, - {0.0f, 0.0f, 0.0f, 1.0f}}; + float color_volume[3][4] = { + {0.0f, 1.0f, 1.0f, v3d->stereo3d_volume_alpha}, + {1.0f, 0.0f, 0.0f, v3d->stereo3d_volume_alpha}, + {0.0f, 0.0f, 0.0f, 1.0f}, + }; for (int eye = 0; eye < 2; eye++) { float winmat[4][4], viewinv[4][4], viewmat[4][4], persmat[4][4], persinv[4][4]; |