Re: [AD] Allegro 5's new graphics core

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


Grzegorz Adam Hankiewicz wrote:

[snip]

Well, given the first block, something like this is possible but destroys
any hardware acceleration speedup, possibly slowing down everything:

 al_acquire_whatever();
 putpixel(screen, 0, 0, 0);
 getpixel(screen, 0, 0);
 al_release_whatever();

It's certainly a dumb example, but I hope you have considered it.


Of course. But then, why would you use the GL driver in the first place? The GL driver should be used by game/apps/whatever that don't read (too often) from the screen. If you're going to do some fancy things by reading back the screen, then don't use GL. Use DDraw (or SVGALib) instead.

Also, if that's the only operation you do during a frame, it's not too hard for the video card to stop and read, since it didn't have much work to do in the first place. Have a look at exalleg.c (in AllegroGL). Every frame, it draws a few lines, writes text, then reads back several parts of the screen and draws them at some other place. I get a solid 180fps here.


--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



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