diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-10-16 18:28:12 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-10-16 18:28:12 +0300 |
commit | 69713aa2dad3094481c8147d47a985e4d2d9a94f (patch) | |
tree | 9c0747778f27f081fb1e6a7bb059fd021c7439fb /source/blender | |
parent | b557ceb2c1544d1b5b584a0bf7bb5028b818fd2c (diff) |
Cleanup: Quiet warnings, use RAD2DEG macro
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 3 |
4 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 45d03681c43..1ce4753cc39 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -507,7 +507,7 @@ static void blf_draw_gl__start(FontBLF *font) gpuMatrixBegin3D_legacy(); if (font->flags & BLF_MATRIX) - gpuMultMatrix3D(font->m); + gpuMultMatrix3D((float (*)[4])font->m); gpuTranslate3fv(font->pos); @@ -515,7 +515,7 @@ static void blf_draw_gl__start(FontBLF *font) gpuScale3fv(font->aspect); if (font->flags & BLF_ROTATION) /* radians -> degrees */ - gpuRotateAxis(font->angle * (float)(180.0 / M_PI), 'Z'); + gpuRotateAxis(RAD2DEG(font->angle), 'Z'); float temp_color[4]; glGetFloatv(GL_CURRENT_COLOR, temp_color); /* TODO(merwin): new BLF_color function? */ diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 7cddb46d025..9164a02b2cc 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -175,7 +175,7 @@ typedef struct FontBLF { /* angle in radians. */ float angle; -#if BLF_BLUR_ENABLE +#if 0 /* BLF_BLUR_ENABLE */ /* blur: 3 or 5 large kernel */ int blur; #endif diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index dd2f6d0996b..29230dfa4d5 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -124,7 +124,7 @@ static void gp_set_point_varying_color(const bGPDspoint *pt, const float ink[4], } /* draw fills for buffer stroke */ -static void gp_draw_stroke_buffer_fill(tGPspoint *points, int totpoints, float ink[4]) +static void gp_draw_stroke_buffer_fill(const tGPspoint *points, int totpoints, float ink[4]) { if (totpoints < 3) { return; @@ -157,7 +157,7 @@ static void gp_draw_stroke_buffer_fill(tGPspoint *points, int totpoints, float i immBegin(GL_TRIANGLES, tot_triangles * 3); /* TODO: use batch instead of immediate mode, to share vertices */ - tGPspoint *pt; + const tGPspoint *pt; for (int i = 0; i < tot_triangles; i++) { /* vertex 1 */ pt = &points[tmp_triangles[i][0]]; @@ -343,7 +343,7 @@ static void gp_draw_stroke_volumetric_buffer(const tGPspoint *points, int totpoi /* draw a 2D strokes in "volumetric" style */ static void gp_draw_stroke_volumetric_2d(const bGPDspoint *points, int totpoints, short thickness, - short dflag, short sflag, + short UNUSED(dflag), short sflag, int offsx, int offsy, int winx, int winy, const float diff_mat[4][4], const float ink[4]) { @@ -616,7 +616,7 @@ static void gp_draw_stroke_fill( /* draw a given stroke - just a single dot (only one point) */ static void gp_draw_stroke_point( - const bGPDspoint *points, short thickness, short dflag, short sflag, + const bGPDspoint *points, short thickness, short UNUSED(dflag), short sflag, int offsx, int offsy, int winx, int winy, const float diff_mat[4][4], const float ink[4]) { const bGPDspoint *pt = points; @@ -951,6 +951,8 @@ static void gp_draw_stroke_2d(const bGPDspoint *points, int totpoints, short thi } glEnd(); } +#else + UNUSED_VARS(debug); #endif } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 7b7fe25aa09..5b35254cab0 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -626,7 +626,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) immUnbindProgram(); } -void drawrenderborder(ARegion *ar, View3D *v3d) +static void drawrenderborder(ARegion *ar, View3D *v3d) { /* use the same program for everything */ VertexFormat *format = immVertexFormat(); @@ -1344,7 +1344,6 @@ RegionView3D *rv3d, const unsigned char color[4]) static void view3d_draw_border(const bContext *C, ARegion *ar) { Scene *scene = CTX_data_scene(C); - wmWindowManager *wm = CTX_wm_manager(C); RegionView3D *rv3d = ar->regiondata; View3D *v3d = CTX_wm_view3d(C); |