![]() |
|
Double Buffering |
ErrorTerror
Member #592
August 2000
|
My problem is that when I am using double buffering and color depth bigger than 8bit the framerate drops heavily. Even when using 640x480x16 framerate is only 20-25fps. And there is only small ball moving on the screen. I am using Dev-C++ and Mingw32, but i had the same problem with djgpp. |
An Ly
Member #185
April 2000
![]() |
Since a larger number of bits are required to tell a colour in 16bit mode compared to 8 (twice as many in fact), you would have to shuffle more information from a bmp to screen at each screen write. Hence, you would expect the frame rate to drop by at least half if double buffering.
|
Thomas Harte
Member #33
April 2000
![]() |
Unless by double buffering you mean hardware double buffering (in Allegro terms creating a couple of video bitmaps and switching between them) in which case both types of double buffering should be an identical speed until you start drawing things, and then you should be able to draw one 16bpp sprite in less than the time it takes to draw two same sized 8bpp sprites. That said, the advantages of a hardware double buffer reduce greatly (and can be slower than drawing everything in memory and blitting once) if you have large amounts of overdraw. Although overdraw probably isn't too great if your game is 2d . . . [My site] [Tetrominoes] |
Murray Bozinsky
Member #696
October 2000
![]() |
when you are coding under windows, system-bitmaps or video-bitmaps or even both might be hardware-accelerated (check the testtool->acceleration features). using normal memory-bitmaps in 640x480x16 and double buff. i also get 20-30 fps, but with video-bitmaps i get 120-130 fps. /Murray Bozinsky |
ErrorTerror
Member #592
August 2000
|
mboz, Thanks for your tip. I changed double buffer to video bitmap and the framerate is now 750-800 fps. But the is now lot of flickering, any ideas? |
ErrorTerror
Member #592
August 2000
|
...And I get those 750-800 fps using 1024x768x16 resolution. |
tomas unosson
Member #621
September 2000
|
Is there an example of this? Could someone put out a sample of how to use videobitmaps. Would be great. |
Mike Farrell
Member #248
April 2000
![]() |
you could use system bitmaps. I heard they are faster...(or is that only under windows)?? |
lillo
Member #303
April 2000
![]() |
lemur, you can find an example on using video bitmaps directly into the Allegro distro. It's the example program examples/exaccel.c (assuming you've a WIP Allegro version) -- |
proftilley
Member #697
October 2000
|
If you are moving a few things around a large area, you might want to be using dirty rectangles. |
tomas unosson
Member #621
September 2000
|
//PAGE FLIPPING // do 500 moving balls or something allegro_exit(); |
|