diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-02-22 20:52:07 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-02-22 20:54:56 +0300 |
commit | 9c106ff2112dedb4bb7e36f9c0805921c82aede0 (patch) | |
tree | 3d2628471423e0faac0962a7aa0dd09d5487406e /source/blender/editors/space_view3d | |
parent | efc499cb991f1a432632d7c3a38070d36a3168b4 (diff) |
Cleanup: Style
Diffstat (limited to 'source/blender/editors/space_view3d')
5 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/editors/space_view3d/drawsimdebug.c b/source/blender/editors/space_view3d/drawsimdebug.c index 2baa6304cd9..e47adbea657 100644 --- a/source/blender/editors/space_view3d/drawsimdebug.c +++ b/source/blender/editors/space_view3d/drawsimdebug.c @@ -49,9 +49,9 @@ static void draw_sim_debug_elements(SimDebugData *debug_data, float imat[4][4]) { - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", GL_FLOAT, 3, KEEP_FLOAT); - unsigned color = add_attrib(format, "color", GL_FLOAT, 3, KEEP_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", GL_FLOAT, 3, KEEP_FLOAT); + unsigned int color = add_attrib(format, "color", GL_FLOAT, 3, KEEP_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index fe4574f2fda..325c81a3fd2 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -308,7 +308,7 @@ static void view3d_draw_debug_store_depth(ARegion *UNUSED(ar), DrawData *draw_da if (GPU_viewport_debug_depth_is_valid(viewport)) { if ((GPU_viewport_debug_depth_width(viewport) != w) || - (GPU_viewport_debug_depth_height(viewport) != h)) + (GPU_viewport_debug_depth_height(viewport) != h)) { GPU_viewport_debug_depth_free(viewport); } @@ -344,7 +344,7 @@ static void view3d_draw_debug(const bContext *C, ARegion *ar, DrawData *draw_dat } if (((v3d->tmp_compat_flag & V3D_DEBUG_SHOW_SCENE_DEPTH) != 0) || - ((v3d->tmp_compat_flag & V3D_DEBUG_SHOW_COMBINED_DEPTH) != 0)) + ((v3d->tmp_compat_flag & V3D_DEBUG_SHOW_COMBINED_DEPTH) != 0)) { /* draw */ if (GPU_viewport_debug_depth_is_valid(draw_data->viewport)) { @@ -965,7 +965,7 @@ static void view3d_draw_outline_plates(const bContext *UNUSED(C)) #define DEBUG_GRID 0 -static void gridline_range(double x0, double dx, double max, int* first_out, int* count_out) +static void gridline_range(double x0, double dx, double max, int *r_first, int *r_count) { /* determine range of gridlines that appear in this Area -- similar calc but separate ranges for x & y * x0 is gridline 0, the axis in screen space @@ -975,12 +975,12 @@ static void gridline_range(double x0, double dx, double max, int* first_out, int int last = (int)floor((max - x0) / dx); if (first <= last) { - *first_out = first; - *count_out = last - first + 1; + *r_first = first; + *r_count = last - first + 1; } else { - *first_out = 0; - *count_out = 0; + *r_first = 0; + *r_count = 0; } #if DEBUG_GRID @@ -1125,9 +1125,9 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char ** glDepthMask(GL_FALSE); /* disable write in zbuffer */ #endif - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); - unsigned color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); + unsigned int color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR); @@ -1207,7 +1207,7 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char ** } } else { - if (dx >(GRID_MIN_PX_D * 10.0)) { /* start blending in */ + if (dx > (GRID_MIN_PX_D * 10.0)) { /* start blending in */ rv3d->gridview /= sublines_fl; dx /= sublines; if (dx > (GRID_MIN_PX_D * 10.0)) { /* start blending in */ @@ -1301,9 +1301,9 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit, bool wr unsigned char col_bg[3], col_grid_emphasise[3], col_grid_light[3]; - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); - unsigned color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); + unsigned int color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR); @@ -1389,9 +1389,9 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit, bool wr if (show_axis_x || show_axis_y || show_axis_z) { /* draw axis lines -- sometimes grid floor is off, other times we still need to draw the Z axis */ - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", COMP_F32, 3, KEEP_FLOAT); - unsigned color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", COMP_F32, 3, KEEP_FLOAT); + unsigned int color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR); immBegin(GL_LINES, (show_axis_x + show_axis_y + show_axis_z) * 2); @@ -1547,9 +1547,9 @@ static void drawcursor(Scene *scene, ARegion *ar, View3D *v3d) glLineWidth(1.0f); - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); - unsigned color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); + unsigned int color = add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR); diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c index c4d980ec7e9..84f0e296a1f 100644 --- a/source/blender/editors/space_view3d/view3d_draw_legacy.c +++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c @@ -24,7 +24,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/editors/space_view3d/view3d_draw.c +/** \file blender/editors/space_view3d/view3d_draw_legacy.c * \ingroup spview3d */ diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index b42afd3a7a9..328e0b03bb8 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -259,8 +259,8 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(ar), x2 = xoff + 0.55f * fly->width; y2 = yoff + 0.55f * fly->height; - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index d4e78035b84..8390d56c610 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -340,8 +340,8 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *ar, void *a yoff = walk->ar->winy / 2; } - VertexFormat* format = immVertexFormat(); - unsigned pos = add_attrib(format, "pos", GL_INT, 2, CONVERT_INT_TO_FLOAT); + VertexFormat *format = immVertexFormat(); + unsigned int pos = add_attrib(format, "pos", GL_INT, 2, CONVERT_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); |