Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2009-08-07 00:06:02 +0400
committerDiego Borghetti <bdiego@gmail.com>2009-08-07 00:06:02 +0400
commit74b3681532b028e66f29aef19d2a0a7e18da6ee2 (patch)
tree03f2b984694b9d64ce84db504d53b525f71e0a09 /source/blender/blenfont/intern/blf.c
parente84e6664c225c0aed7e4d4c2ea812a48bc57ca3a (diff)
Remove bitmap mode from blenfont, only draw with textures.
As Joe point on a previous mail, glBitmap don't work nice on all cards and also some of the things that we can do with texture are hard (or need that blender check the font mode) to implement.
Diffstat (limited to 'source/blender/blenfont/intern/blf.c')
-rw-r--r--source/blender/blenfont/intern/blf.c50
1 files changed, 12 insertions, 38 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index af57f822c40..ded89d18387 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -333,7 +333,6 @@ void BLF_default_rotation(float angle)
}
}
-
void BLF_draw(char *str)
{
FontBLF *font;
@@ -342,40 +341,24 @@ void BLF_draw(char *str)
* The pixmap alignment hack is handle
* in BLF_position (old ui_rasterpos_safe).
*/
-
font= global_font[global_font_cur];
if (font) {
- if (font->mode == BLF_MODE_BITMAP) {
- glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
- glPushAttrib(GL_ENABLE_BIT);
- glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glDisable(GL_BLEND);
- glRasterPos3f(font->pos[0], font->pos[1], font->pos[2]);
-
- blf_font_draw(font, str);
-
- glPopAttrib();
- glPopClientAttrib();
- }
- else {
- glEnable(GL_BLEND);
- glEnable(GL_TEXTURE_2D);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glEnable(GL_TEXTURE_2D);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glPushMatrix();
- glTranslatef(font->pos[0], font->pos[1], font->pos[2]);
- glScalef(font->aspect, font->aspect, 1.0);
+ glPushMatrix();
+ glTranslatef(font->pos[0], font->pos[1], font->pos[2]);
+ glScalef(font->aspect, font->aspect, 1.0);
- if (font->flags & BLF_ROTATION)
- glRotatef(font->angle, 0.0f, 0.0f, 1.0f);
+ if (font->flags & BLF_ROTATION)
+ glRotatef(font->angle, 0.0f, 0.0f, 1.0f);
- blf_font_draw(font, str);
+ blf_font_draw(font, str);
- glPopMatrix();
- glDisable(GL_BLEND);
- glDisable(GL_TEXTURE_2D);
- }
+ glPopMatrix();
+ glDisable(GL_BLEND);
+ glDisable(GL_TEXTURE_2D);
}
}
@@ -506,15 +489,6 @@ void BLF_clipping(float xmin, float ymin, float xmax, float ymax)
}
}
-void BLF_mode(int mode)
-{
- FontBLF *font;
-
- font= global_font[global_font_cur];
- if (font)
- font->mode= mode;
-}
-
void BLF_shadow(int level, float r, float g, float b, float a)
{
FontBLF *font;