diff options
author | Diego Borghetti <bdiego@gmail.com> | 2009-05-06 03:10:32 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2009-05-06 03:10:32 +0400 |
commit | 405cf80eb8dc2df8ae160aee70aef34052add24a (patch) | |
tree | f03cc27e95bdf91b25ea9d2a0dffb28ccef666be /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 71c38978e14ebf3522fe60fc239ad04f10ef30ab (diff) |
Big, big commit!!
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
the old BMF api.
I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.
MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
Always have to link/include the freetype2 library
Remove any reference to libbmfont
Remove any reference to libftfont
Remove any reference to libbftgl (or libbFTGL)
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index cb67a1fc9aa..bbf0279692a 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -69,9 +69,9 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "BMF_Api.h" #include "WM_api.h" +#include "BLF_api.h" #include "ED_armature.h" #include "ED_keyframing.h" @@ -558,8 +558,7 @@ static void draw_view_axis(RegionView3D *rv3d) dy = vec[1] * k; fdrawline(start, start + ydisp, start + dx, start + dy + ydisp); if (fabs(dx) > toll || fabs(dy) > toll) { - glRasterPos2i(start + dx + 2, start + dy + ydisp + 2); - BMF_DrawString(G.fonts, "x"); + BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "x"); } /* Y */ @@ -579,8 +578,7 @@ static void draw_view_axis(RegionView3D *rv3d) dy = vec[1] * k; fdrawline(start, start + ydisp, start + dx, start + dy + ydisp); if (fabs(dx) > toll || fabs(dy) > toll) { - glRasterPos2i(start + dx + 2, start + dy + ydisp + 2); - BMF_DrawString(G.fonts, "y"); + BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "y"); } /* Z */ @@ -600,8 +598,7 @@ static void draw_view_axis(RegionView3D *rv3d) dy = vec[1] * k; fdrawline(start, start + ydisp, start + dx, start + dy + ydisp); if (fabs(dx) > toll || fabs(dy) > toll) { - glRasterPos2i(start + dx + 2, start + dy + ydisp + 2); - BMF_DrawString(G.fonts, "z"); + BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "z"); } /* restore line-width */ @@ -693,8 +690,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) if (printable) { UI_ThemeColor(TH_TEXT_HI); - glRasterPos2i(10, ar->winy-20); - BMF_DrawString(G.fonts, printable); + BLF_draw_default(10, ar->winy-20, 0.0f, printable); } if (v3d->localview) { @@ -799,7 +795,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) } /* colour depends on whether there is a keyframe */ - if (id_frame_has_keyframe((ID *)ob, /*frame_to_float(scene, CFRA)*/(float)(CFRA), v3d->keyflags)) + if (id_frame_has_keyframe((ID *)ob, /*frame_to_float(scene, CFRA)*/(float)(CFRA), v3d->keyflags)) UI_ThemeColor(TH_VERTEX_SELECT); else UI_ThemeColor(TH_TEXT_HI); @@ -817,9 +813,8 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) if (U.uiflag & USER_SHOW_ROTVIEWICON) offset = 14 + (U.rvisize * 2); - - glRasterPos2i(offset, 10); - BMF_DrawString(G.fonts, info); + + BLF_draw_default(offset, 10, 0.0f, info); } static void view3d_get_viewborder_size(Scene *scene, ARegion *ar, float size_r[2]) @@ -999,9 +994,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) /* camera name - draw in highlighted text color */ if (ca && (ca->flag & CAM_SHOWNAME)) { UI_ThemeColor(TH_TEXT_HI); - glRasterPos2f(x1, y1-15); - - BMF_DrawString(G.font, v3d->camera->id.name+2); + BLF_draw_default(x1, y1-15, 0.0f, v3d->camera->id.name+2); UI_ThemeColor(TH_WIRE); } |