Hi!
I noticed that the RawRestoreScreen function is awfully slow.
Check out these frame dropoffs on my P4 2,4GHz (at 640x480):
8-bit: 390fps -> 280fps
16-bit: 200fps -> 145fps
32-bit: 100fps -> 75fps (even 45fps in a scrolling room of mine!)
Now imagine the framerate on slower computers...
All this by using a single RawRestoreScreen in the rep_ex, nothing else!
It's not surprising, I guess, since it has to copy an entire background image back onto the screen, right?
But most plugins don't seem to have this problem. Is it because they have direct access to the Allegro library functions? (I'm no programmer, so I'm sorry if I get this all wrong.)
If so, has the RawRestoreScreen function the potential for speed improvements in the future as well?
Since I suppose most of the time RawRestoreScreen is used just to clear the screen, how about this:
An additional layer/overlay of some kind in front of the background image. The rawdraw functions could draw upon this layer and a RawClearScreen(0) for example could simply wipe this layer clean?
There are so many sweet things that can be done with the RawDraw functions, it would be a shame not to use them because of speed issues of a single function.
Thanks for reading.
I noticed that the RawRestoreScreen function is awfully slow.
Check out these frame dropoffs on my P4 2,4GHz (at 640x480):
8-bit: 390fps -> 280fps
16-bit: 200fps -> 145fps
32-bit: 100fps -> 75fps (even 45fps in a scrolling room of mine!)
Now imagine the framerate on slower computers...
All this by using a single RawRestoreScreen in the rep_ex, nothing else!
It's not surprising, I guess, since it has to copy an entire background image back onto the screen, right?
But most plugins don't seem to have this problem. Is it because they have direct access to the Allegro library functions? (I'm no programmer, so I'm sorry if I get this all wrong.)
If so, has the RawRestoreScreen function the potential for speed improvements in the future as well?
Since I suppose most of the time RawRestoreScreen is used just to clear the screen, how about this:
An additional layer/overlay of some kind in front of the background image. The rawdraw functions could draw upon this layer and a RawClearScreen(0) for example could simply wipe this layer clean?
There are so many sweet things that can be done with the RawDraw functions, it would be a shame not to use them because of speed issues of a single function.
Thanks for reading.
