Re: [AD] shaders + ttf

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 07 Mar 2013 03:25:10 -0500, SiegeLord <slabode@xxxxxxxxxx> wrote:
> On 03/07/2013 03:16 AM, SiegeLord wrote:
> > On 03/07/2013 03:10 AM, Jon Rafkind wrote:
> >> There seems to be an issue using the programmable pipeline and the ttf addon. Fonts sometimes don't draw, specifically when they are drawn to FBO's. Adding the following line to ttf.c:172 makes it work again, but I am unsure why. One possible reason is the upload of the page bitmap requires a shader, but Siegelord seems to suggest that isn't the case.
> >>
> >> push_new_page:
> >>      ...
> >>      page = al_create_bitmap(256, 256);
> >> + page->shader = al_get_target_bitmap()->shader;
> >>
> >> I'll try to make a test case showing the broken behavior.
> >
> > Here's a testcase:
> 
> > It draws the pixel via that locking code (note how it functions without
> > the shader), but the actual text doesn't draw. Jon's change makes the
> > text draw but it's not clear why.

It effectively calls al_use_shader() on the new page bitmap.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/