Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-07 07:57:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-07 07:57:14 +0300
commitadfbf276a15346c38cc6b7652191c005b9a3ae9b (patch)
tree6f7d27e9adb8c15d3021c8276d6c577a0e5746ba /source/blender/draw/intern
parent37b457221ec77b485b6e65537ac2db7fd8107e6d (diff)
Cleanup: style, duplicate includes
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r--source/blender/draw/intern/draw_cache.c28
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c4
-rw-r--r--source/blender/draw/intern/draw_manager.c2
-rw-r--r--source/blender/draw/intern/draw_manager_profiling.c2
4 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 8bf7aff555e..13df65cf741 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -250,7 +250,7 @@ Gwn_Batch *DRW_cache_fullscreen_quad_get(void)
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, 3);
- for (int i = 0; i < 3; ++i) {
+ for (int i = 0; i < 3; ++i) {
GWN_vertbuf_attr_set(vbo, attr_id.pos, i, pos[i]);
GWN_vertbuf_attr_set(vbo, attr_id.uvs, i, uvs[i]);
}
@@ -279,7 +279,7 @@ Gwn_Batch *DRW_cache_quad_get(void)
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, 4);
- for (int i = 0; i < 4; ++i) {
+ for (int i = 0; i < 4; ++i) {
GWN_vertbuf_attr_set(vbo, attr_id.pos, i, pos[i]);
GWN_vertbuf_attr_set(vbo, attr_id.uvs, i, uvs[i]);
}
@@ -391,7 +391,7 @@ Gwn_Batch *DRW_cache_square_get(void)
for (int i = 0; i < 4; i++) {
GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2, p[i % 4]);
- GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2 + 1, p[(i+1) % 4]);
+ GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2 + 1, p[(i + 1) % 4]);
}
SHC.drw_square = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO);
@@ -1196,8 +1196,8 @@ Gwn_Batch *DRW_cache_lamp_spot_get(void)
GWN_vertbuf_attr_set(vbo, attr_id.n1, i * 4, n[(i) % NSEGMENTS]);
GWN_vertbuf_attr_set(vbo, attr_id.n1, i * 4 + 1, n[(i) % NSEGMENTS]);
- GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4, n[(i+1) % NSEGMENTS]);
- GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4 + 1, n[(i+1) % NSEGMENTS]);
+ GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4, n[(i + 1) % NSEGMENTS]);
+ GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4 + 1, n[(i + 1) % NSEGMENTS]);
/* end ring */
v[0] = cv[0], v[1] = cv[1], v[2] = -1.0f;
@@ -1245,8 +1245,8 @@ Gwn_Batch *DRW_cache_lamp_spot_square_get(void)
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[0]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[i]);
- GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[(i % 4)+1]);
- GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[((i+1) % 4)+1]);
+ GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[(i % 4) + 1]);
+ GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[((i + 1) % 4) + 1]);
}
SHC.drw_lamp_spot_square = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO);
@@ -1351,7 +1351,7 @@ Gwn_Batch *DRW_cache_lightprobe_cube_get(void)
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, (6 + 3) * 2);
- for (int i = 0; i < 6; ++i) {
+ for (int i = 0; i < 6; ++i) {
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, v[i]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, v[(i + 1) % 6]);
}
@@ -1396,7 +1396,7 @@ Gwn_Batch *DRW_cache_lightprobe_grid_get(void)
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, (6 * 2 + 3) * 2);
- for (int i = 0; i < 6; ++i) {
+ for (int i = 0; i < 6; ++i) {
float tmp_v1[3], tmp_v2[3], tmp_tr[3];
copy_v3_v3(tmp_v1, v[i]);
copy_v3_v3(tmp_v2, v[(i + 1) % 6]);
@@ -1449,7 +1449,7 @@ Gwn_Batch *DRW_cache_lightprobe_planar_get(void)
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, 4 * 2);
- for (int i = 0; i < 4; ++i) {
+ for (int i = 0; i < 4; ++i) {
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, v[i]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, v[(i + 1) % 4]);
}
@@ -1623,7 +1623,7 @@ static const unsigned int bone_box_solid_tris[12][3] = {
/* aligned with bone_octahedral_solid_tris */
static const float bone_box_solid_normals[12][3] = {
{ 0.0f, -1.0f, 0.0f},
- { 0.0f, -1.0f, 0.0f},
+ { 0.0f, -1.0f, 0.0f},
{ 1.0f, 0.0f, 0.0f},
{ 1.0f, 0.0f, 0.0f},
@@ -1782,10 +1782,10 @@ Gwn_Batch *DRW_cache_bone_envelope_solid_get(void)
float co1[3], co2[3], co3[3], co4[3];
for (int j = 0; j < lat_res; j++, lat += lat_inc) {
- benv_lat_lon_to_co(lat , lon , co1);
- benv_lat_lon_to_co(lat , lon + lon_inc, co2);
+ benv_lat_lon_to_co(lat, lon, co1);
+ benv_lat_lon_to_co(lat, lon + lon_inc, co2);
benv_lat_lon_to_co(lat + lat_inc, lon + lon_inc, co3);
- benv_lat_lon_to_co(lat + lat_inc, lon , co4);
+ benv_lat_lon_to_co(lat + lat_inc, lon, co4);
if (j != 0) { /* At pole, n1 and n2 are identical. */
benv_add_tri(vbo, attr_id.pos, &v_idx, co1, co2, co3);
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 6b3ef31f8dd..33d7cab285f 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -654,7 +654,7 @@ static MeshRenderData *mesh_render_data_create_ex(
/* If tangent from orco is requested, decrement tangent_len */
int actual_tangent_len = (cd_lused[CD_TANGENT] & DM_TANGENT_MASK_ORCO) ?
- rdata->cd.layers.tangent_len - 1 : rdata->cd.layers.tangent_len;
+ rdata->cd.layers.tangent_len - 1 : rdata->cd.layers.tangent_len;
if (rdata->edit_bmesh) {
BMEditMesh *em = rdata->edit_bmesh;
BMesh *bm = em->bm;
@@ -3107,7 +3107,7 @@ static Gwn_VertBuf *mesh_create_edge_pos_with_sel(
const int edge_len = mesh_render_data_edges_len_get(rdata);
- vbo= GWN_vertbuf_create_with_format(&format);
+ vbo = GWN_vertbuf_create_with_format(&format);
const int vbo_len_capacity = edge_len * 2;
int vbo_len_used = 0;
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 05b8f1657c4..1c83b813355 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1997,7 +1997,7 @@ static void draw_shgroup(DRWShadingGroup *shgroup, DRWState pass_state)
unit_m4(obmat);
if (shgroup->type == DRW_SHG_INSTANCE &&
- (interface->instance_count > 0 || interface->instance_batch != NULL))
+ (interface->instance_count > 0 || interface->instance_batch != NULL))
{
GPU_SELECT_LOAD_IF_PICKSEL_LIST(&shgroup->calls);
draw_geometry(shgroup, shgroup->instance_geom, obmat, shgroup->instance_data);
diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c
index 2b913bcbb8d..f9fbbac2e2e 100644
--- a/source/blender/draw/intern/draw_manager_profiling.c
+++ b/source/blender/draw/intern/draw_manager_profiling.c
@@ -85,7 +85,7 @@ void DRW_stats_begin(void)
DTP.timer_count = DTP.chunk_count * CHUNK_SIZE;
DTP.timers = MEM_callocN(sizeof(DRWTimer) * DTP.timer_count, "DRWTimer stack");
}
- else if(!DTP.is_recording && DTP.timers != NULL) {
+ else if (!DTP.is_recording && DTP.timers != NULL) {
DRW_stats_free();
}