diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 573951da4ca..d2ff6eef097 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -627,7 +627,7 @@ static void draw_view_axis(RegionView3D *rv3d) glEnd(); if (fabsf(dx) > toll || fabsf(dy) > toll) { - BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "x", 1); + BLF_draw_default_ascii(start + dx + 2, start + dy + ydisp + 2, 0.0f, "x", 1); } /* BLF_draw_default disables blending */ @@ -647,7 +647,7 @@ static void draw_view_axis(RegionView3D *rv3d) glEnd(); if (fabsf(dx) > toll || fabsf(dy) > toll) { - BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "y", 1); + BLF_draw_default_ascii(start + dx + 2, start + dy + ydisp + 2, 0.0f, "y", 1); } glEnable(GL_BLEND); @@ -666,7 +666,7 @@ static void draw_view_axis(RegionView3D *rv3d) glEnd(); if (fabsf(dx) > toll || fabsf(dy) > toll) { - BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "z", 1); + BLF_draw_default_ascii(start + dx + 2, start + dy + ydisp + 2, 0.0f, "z", 1); } /* restore line-width */ @@ -757,7 +757,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) if (name) { UI_ThemeColor(TH_TEXT_HI); - BLF_draw_default(22, ar->winy-17, 0.0f, name, sizeof(tmpstr)); + BLF_draw_default_ascii(22, ar->winy-17, 0.0f, name, sizeof(tmpstr)); } } @@ -1007,6 +1007,8 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) /* note: quite un-scientific but without this bit extra * 0.0001 on the lower left the 2D border sometimes * obscures the 3D camera border */ + /* note: with VIEW3D_CAMERA_BORDER_HACK defined this error isn't noticable + * but keep it here incase we need to remove the workaround */ x1i= (int)(x1 - 1.0001f); y1i= (int)(y1 - 1.0001f); x2i= (int)(x2 + (1.0f-0.0001f)); @@ -1039,7 +1041,17 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) setlinestyle(0); UI_ThemeColor(TH_BACK); glRectf(x1i, y1i, x2i, y2i); - + +#ifdef VIEW3D_CAMERA_BORDER_HACK + { + if(view3d_camera_border_hack_test == TRUE) { + glColor4fv(view3d_camera_border_hack_col); + glRectf(x1i+1, y1i+1, x2i-1, y2i-1); + view3d_camera_border_hack_test= FALSE; + } + } +#endif + setlinestyle(3); UI_ThemeColor(TH_WIRE); glRectf(x1i, y1i, x2i, y2i); @@ -2074,10 +2086,6 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d) { CustomDataMask mask= 0; - if(v3d->drawtype == OB_SHADED) { - /* this includes normals for mesh_create_shadedColors */ - mask |= CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_NORMAL | CD_MASK_ORCO; - } if((v3d->drawtype == OB_TEXTURE) || ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) { mask |= CD_MASK_MTFACE | CD_MASK_MCOL; @@ -2426,7 +2434,7 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps+0.5f)); } - BLF_draw_default(22, ar->winy-17, 0.0f, printable, sizeof(printable)-1); + BLF_draw_default_ascii(22, ar->winy-17, 0.0f, printable, sizeof(printable)-1); } /* warning: this function has duplicate drawing in ED_view3d_draw_offscreen() */ @@ -2648,7 +2656,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) BLI_snprintf(tstr, sizeof(tstr), "%s x %.4g", grid_unit, v3d->grid); } - BLF_draw_default(22, ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, tstr[0]?tstr : grid_unit, sizeof(tstr)); /* XXX, use real length */ + BLF_draw_default_ascii(22, ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, tstr[0]?tstr : grid_unit, sizeof(tstr)); /* XXX, use real length */ } ob= OBACT; |