[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21995] branches/blender2.5/blender/source /blender: Bitmap mode is back.

Diego B bdiego at gmail.com
Wed Jul 29 20:13:13 CEST 2009


The original bmfont library used glBitmap.. so I add this just to keep
the option, it's hard put this at the same level of texture font (and
somethings just don't work)..  maybe it's better remove this now.

have any complaint about drop bitmap font ?

On Wed, Jul 29, 2009 at 1:11 PM, joe<joeedh at gmail.com> wrote:
> Why do we need bitmap mode? glBitmap doesn't play nice with the
> framebuffer on all cards (especially older ATIs), and it seems better
> all around to just use textured ones, anyway.
>
> Joe
>
> On Tue, Jul 28, 2009 at 2:02 PM, Diego Borghetti<bdiego at gmail.com> wrote:
>> Revision: 21995
>>          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21995
>> Author:   bdiego
>> Date:     2009-07-28 22:02:09 +0200 (Tue, 28 Jul 2009)
>>
>> Log Message:
>> -----------
>> Bitmap mode is back.
>>
>> The option of Texture or Bitmap font is working again, yes it's really
>> uuuuugly right now, but it work.
>>
>> On the next commit I go to put this at the same level that texture font.
>>
>> Change this from User Preferences -> Language -> Textued Fonts, save
>> the preferences and run blender again.
>>
>> Modified Paths:
>> --------------
>>    branches/blender2.5/blender/source/blender/blenfont/intern/blf.c
>>    branches/blender2.5/blender/source/blender/blenfont/intern/blf_glyph.c
>>    branches/blender2.5/blender/source/blender/editors/interface/interface_style.c
>>
>> Modified: branches/blender2.5/blender/source/blender/blenfont/intern/blf.c
>> ===================================================================
>> --- branches/blender2.5/blender/source/blender/blenfont/intern/blf.c    2009-07-28 19:42:11 UTC (rev 21994)
>> +++ branches/blender2.5/blender/source/blender/blenfont/intern/blf.c    2009-07-28 20:02:09 UTC (rev 21995)
>> @@ -349,7 +349,7 @@
>>                        glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
>>                        glPushAttrib(GL_ENABLE_BIT);
>>                        glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
>> -                       glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
>> +                       glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
>>                        glDisable(GL_BLEND);
>>                        glRasterPos3f(font->pos[0], font->pos[1], font->pos[2]);
>>
>>
>> Modified: branches/blender2.5/blender/source/blender/blenfont/intern/blf_glyph.c
>> ===================================================================
>> --- branches/blender2.5/blender/source/blender/blenfont/intern/blf_glyph.c      2009-07-28 19:42:11 UTC (rev 21994)
>> +++ branches/blender2.5/blender/source/blender/blenfont/intern/blf_glyph.c      2009-07-28 20:02:09 UTC (rev 21995)
>> @@ -573,10 +573,10 @@
>>                        return(0);
>>        }
>>
>> -       glBitmap(0, 0, 0.0, 0.0, x + font->pos[0], y - font->pos[1], (const GLubyte *)&null_bitmap);
>> +       glBitmap(0, 0, 0.0, 0.0, x, y, (const GLubyte *)&null_bitmap);
>>        glPixelStorei(GL_UNPACK_ROW_LENGTH, gt->pitch * 8);
>>        glBitmap(gt->width, gt->height, 0.0, gt->pos_y, 0.0, 0.0, (const GLubyte *)gt->image);
>> -       glBitmap(0, 0, 0.0, 0.0, -x - font->pos[0], -y + font->pos[1], (const GLubyte *)&null_bitmap);
>> +       glBitmap(0, 0, 0.0, 0.0, -x, -y, (const GLubyte *)&null_bitmap);
>>        return(1);
>>  }
>>
>>
>> Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_style.c
>> ===================================================================
>> --- branches/blender2.5/blender/source/blender/editors/interface/interface_style.c      2009-07-28 19:42:11 UTC (rev 21994)
>> +++ branches/blender2.5/blender/source/blender/editors/interface/interface_style.c      2009-07-28 20:02:09 UTC (rev 21995)
>> @@ -248,6 +248,9 @@
>>                        BLF_size(11, U.dpi);
>>                        BLF_size(12, U.dpi);
>>                        BLF_size(14, U.dpi);
>> +
>> +                       if (!(U.transopts & USER_USETEXTUREFONT))
>> +                               BLF_mode(BLF_MODE_BITMAP);
>>                }
>>        }
>>
>>
>>
>> _______________________________________________
>> Bf-blender-cvs mailing list
>> Bf-blender-cvs at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list