Re: [AD] Thoughts on speeding up X

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


On Friday 30 July 2004 14:30, Chris wrote:
> My initial thought after realizing this is.. why the initial double 
> buffer? AFAIK, X has drawing primitives we can map getpixel, putpixel, 
> line, and the like, to.

Makes sense to me.

> It also has an image structure that we can 
> potentially hack and use to blit Allegro bitmaps through directly to the 
> X display.

Were you thinking of using pixmaps as system bitmaps under X? That might 
make sense...

> Thoughts? Ideas?

Yes, but it's rather radical and probably ``Allegro 5'' stuff. I'd like to 
change the way Allegro programs acces the screen. In fact, it may be in 
the Allegro 5 graphics draft, I haven't looked at that recently.
What I'd like to see is something like a set_gfx_mode() where you can give 
hints for the update method you want to use: double buffering, triple 
buffering or plain.
You then have something equivalent to GLbegin() and GLend in OpenGL to 
indicate the start and end of a drawing cycle, say gfx_begin() and 
gfx_end(). In between, blitting and drawing operations are buffered to a 
virtual screen or alternative screenpage. Only at gfx_end() is the actual 
screen updated.
This has the advantage of hiding the gritty details of double/triple 
buffering from the user, in particular the ALLEGRO_VRAM_SINGLE_SURFACE 
conditionals needed now.
It would also facilitate the inclusion of an OpenGL driver in Allegro 
itself if and when we want to merge AllegroGL.

This is not so much a redesign of the X11 driver as of the whole graphics 
subsystem. And as I said, it's probably too much to do for now.

Evert





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