Re: [AD] Memory Bitmap to Display blit slow?

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


On Sun, 2009-03-01 at 15:17 -0800, Evert Glebbeek wrote:
> 
> > Which reminds me: you are using glTexSubImage2D instead of  
> > glTexImage2D
> > for blitting, right? The latter allocates video memory anew and will
> > positively destroy performance.
> 
> Hmm. We seem to use glTexImage2D to upload a bitmap and use  
> glTexSubImage2D to synchronise when an image is unlocked. I can play  
> around with that, I suppose.
> 

Well, the very first time we want to allocate video memory anew of
course - so it's the right thing :)

And for blitting, we don't do this at all, we draw textured quads - the
texture is never modified after the initial upload normally. If you draw
to a texture, we use FBO.

Really the only time this would be relevant is
al_lock_bitmap/al_unlock_bitmap - they could be optimized a bit. (But in
general the question is, why would you use those in the first place?)

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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