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:
authorJulian Eisel <eiseljulian@gmail.com>2017-02-22 20:52:07 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-02-22 20:54:56 +0300
commit9c106ff2112dedb4bb7e36f9c0805921c82aede0 (patch)
tree3d2628471423e0faac0962a7aa0dd09d5487406e /source/blender/draw/intern/draw_view.c
parentefc499cb991f1a432632d7c3a38070d36a3168b4 (diff)
Cleanup: Style
Diffstat (limited to 'source/blender/draw/intern/draw_view.c')
-rw-r--r--source/blender/draw/intern/draw_view.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 9d8699d24ee..f3865a7a92f 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -19,7 +19,7 @@
*
*/
-/** \file blender/draw/draw_view.c
+/** \file blender/draw/intern/draw_view.c
* \ingroup draw
*
* Contains dynamic drawing using immediate mode
@@ -65,7 +65,7 @@ void DRW_draw_region_info(void)
/* ************************* Grid ************************** */
-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
@@ -75,12 +75,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;
}
}
@@ -198,9 +198,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);
@@ -273,7 +273,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 */
@@ -364,9 +364,9 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
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);
@@ -452,9 +452,9 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
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);
@@ -636,10 +636,10 @@ void DRW_draw_cursor(void)
const float f10 = 0.5f;
const float f20 = 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);
- unsigned wpos = add_attrib(format, "world_pos", COMP_F32, 3, KEEP_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);
+ unsigned int wpos = add_attrib(format, "world_pos", COMP_F32, 3, KEEP_FLOAT);
/* XXX Using instance shader without instance */
immBindBuiltinProgram(GPU_SHADER_3D_SCREENSPACE_VARIYING_COLOR);