Re: [AD] Conserving OpenGL FBOs

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


On 2011-03-04, at 4:42 PM, Peter Wang wrote:
> On 2011-03-02, Trent Gamblin <trent@xxxxxxxxxx> wrote:
>> On Wed, 2011-03-02 at 14:39 -0600, Trent Gamblin wrote:
>>> I've got a patch that is supposed to use fbos from a pool (of 8 right
>>> now). I don't get any slowdown in ex_bitmap_target, and my game, which
>>> was getting an X error about out of resources, is working now... so I
>>> think this patch is at least partially right. I'd like to have someone
>>> review it if possible before I commit it though. It's attached. Would
>>> appreciate any comments.
>> 
>> Elias already kindly had a look at the patch, and suggested that the old
>> fbo could be deleted before the new one is created. The new patch does
>> this but is otherwise the same. So now no more than
>> ALLEGRO_MAX_OPENGL_FBOS will be used (with the first patch it was
>> ALLEGRO_MAX_OPENGL_FBOS+1).
> 
> Thanks for doing this.
> 
> The documentation needs updating.  Below is what I have so far.
> I'm not sure what we can say about the lifetime of the FBO returned by
> al_get_opengl_fbo (see the XXX).  I don't think we should lock ourselves
> into the current implementation.

One possible solution to this is to have another bitmap creation
flag that forces creation of an fbo and always retains it until the
bitmap is destroyed.

Trent




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