diff options
-rw-r--r-- | intern/ghost/test/multitest/MultiTest.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/intern/ghost/test/multitest/MultiTest.c b/intern/ghost/test/multitest/MultiTest.c index 21d706966c1..45ea4afa274 100644 --- a/intern/ghost/test/multitest/MultiTest.c +++ b/intern/ghost/test/multitest/MultiTest.c @@ -16,8 +16,6 @@ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. */ -#define FALSE 0 - #ifdef _MSC_VER # pragma warning(disable : 4244 4305) #endif @@ -33,16 +31,12 @@ #include "GHOST_C-api.h" -#ifdef USE_BMF -# include "BMF_Api.h" -#else -# include "BLF_api.h" +#include "BLF_api.h" extern int datatoc_bfont_ttf_size; extern char datatoc_bfont_ttf[]; /* cheat */ char U[1024] = {0}; -#endif #include "Util.h" #include "Basic.h" @@ -349,12 +343,7 @@ struct _LoggerWindow { GHOST_WindowHandle win; -#ifdef USE_BMF - BMF_Font *font; -#else int font; -#endif - int fonttexid; int fontheight; int size[2]; @@ -449,13 +438,6 @@ static void loggerwindow_do_draw(LoggerWindow *lw) startline = scrollbar_get_thumbpos(lw->scroll) * (lw->nloglines - 1); ndisplines = min_i(lw->ndisplines, lw->nloglines - startline); - if (lw->fonttexid != -1) { - glBindTexture(GL_TEXTURE_2D, lw->fonttexid); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_BLEND); - glEnable(GL_TEXTURE_2D); - } glColor3f(0, 0, 0); for (i = 0; i < ndisplines; i++) { /* stored in reverse order */ @@ -463,27 +445,10 @@ static void loggerwindow_do_draw(LoggerWindow *lw) int x_pos = lw->textarea[0][0] + 4; int y_pos = lw->textarea[0][1] + 4 + i * lw->fontheight; -#ifdef USE_BMF - if (lw->fonttexid == -1) { - glRasterPos2i(x_pos, y_pos); - BMF_DrawString(lw->font, line); - } - else { - BMF_DrawStringTexture(lw->font, line, x_pos, y_pos, 0.0); - } -#else BLF_position(lw->font, x_pos, y_pos, 0.0); BLF_draw(lw->font, line, 256); // XXX -#endif } -#ifdef USE_BMF - if (lw->fonttexid != -1) { - glDisable(GL_TEXTURE_2D); - glDisable(GL_BLEND); - } -#endif - GHOST_SwapWindowBuffers(lw->win); } @@ -596,17 +561,9 @@ LoggerWindow *loggerwindow_new(MultiTestApp *app) lw->app = app; lw->win = win; -#ifdef USE_BMF - lw->font = BMF_GetFont(BMF_kScreen12); - lw->fonttexid = BMF_GetFontTexture(lw->font); - - BMF_GetBoundingBox(lw->font, &bbox[0][0], &bbox[0][1], &bbox[1][0], &bbox[1][1]); - lw->fontheight = rect_height(bbox); -#else lw->font = BLF_load_mem("default", (unsigned char *)datatoc_bfont_ttf, datatoc_bfont_ttf_size); BLF_size(lw->font, 11, 72); lw->fontheight = BLF_height(lw->font, "A_", 2); -#endif lw->nloglines = lw->logsize = 0; lw->loglines = MEM_mallocN(sizeof(*lw->loglines) * lw->nloglines, "loglines"); |