Page 1 of 2

GapiDraw 2.x - need feedback on RLE encoding

PostPosted: Aug 20, 2003 @ 8:23pm
by Johan

PostPosted: Aug 20, 2003 @ 8:37pm
by Mr X

PostPosted: Aug 20, 2003 @ 9:35pm
by Pejo Software - Per

PostPosted: Aug 20, 2003 @ 9:36pm
by Guest

PostPosted: Aug 20, 2003 @ 9:38pm
by sbl

PostPosted: Aug 20, 2003 @ 9:50pm
by bluescrn

PostPosted: Aug 20, 2003 @ 9:51pm
by Pejo Software - Per

PostPosted: Aug 20, 2003 @ 10:57pm
by fzammetti

PostPosted: Aug 21, 2003 @ 5:08am
by DillRye

PostPosted: Aug 21, 2003 @ 6:44am
by InexorableTash
Another approach:

Add CGapiSurface::PrepareOptimizedSurface() which creates an RLE-optimized version for super-fast Blt-ing. Call this during CreateSurfaces(), or any time you update the "sprite" - just not every frame!

This would create an RLE-compressed variant optimized for the current screen pitch - so the CGapiSurface surface would have the raw and the compressed version attached. Then you can still use PNGs (etc) to load arbitrary surfaces, but if you know you're just doing relatively simple blits you can get extra performance out at the expense of memory.

(Or maybe this function takes a CGapiCompressedSurface as a param, so you can throw away the original if necessary and, like Alpha surfaces, this one has special smarts associated with it.)

PostPosted: Aug 21, 2003 @ 8:11am
by Johan
Thanks for all the replies!

As it is, I think there might be too many issues involved in supporting compressed surfaces.. Clipping as mentioned would not work - a showstopper for many uses... I think I'll put my thoughts on other stuff for a while..

InexorableTash: I have thought about this as well.. Supporting a "Compressed copy" would however mean that I would have to rewrite ALL blit loops in CGapiSurface.. CGapiCompressedSurface or similar might work though..

The reason I was asking on GetBuffer was that one could achieve quite some performance boost of using for example GDI on some devices - but that way images would be read only...

PostPosted: Aug 21, 2003 @ 3:49pm
by StephC

PostPosted: Aug 21, 2003 @ 7:15pm
by Johan
StephC: Your engine impresses me more everytime I hear about it... :) Really, you have done an incredible job with it...

(clipping, rotation and scaling.. now that's something to write home about)

PostPosted: Aug 21, 2003 @ 8:37pm
by bluescrn

PostPosted: Aug 21, 2003 @ 8:52pm
by StephC