Commit: 69713aa2dad3094481c8147d47a985e4d2d9a94f
Author: Julian Eisel
Date:   Sun Oct 16 17:28:12 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB69713aa2dad3094481c8147d47a985e4d2d9a94f

Cleanup: Quiet warnings, use RAD2DEG macro

===================================================================

M       source/blender/blenfont/intern/blf.c
M       source/blender/blenfont/intern/blf_internal_types.h
M       source/blender/editors/gpencil/drawgpencil.c
M       source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/blenfont/intern/blf.c 
b/source/blender/blenfont/intern/blf.c
index 45d0368..1ce4753 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 7cddb46..9164a02 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 dd2f6d0..29230df 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 7b7fe25..5b35254 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);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to