Cleanup: Quiet warnings, use RAD2DEG macro

This commit is contained in:
Julian Eisel
2016-10-16 17:28:12 +02:00
parent b557ceb2c1
commit 69713aa2da
4 changed files with 10 additions and 9 deletions

View File

@@ -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? */

View File

@@ -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

View File

@@ -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
}

View File

@@ -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);