Reducing pygame cpu-load to < 4 %

Bernardo Innocenti bernie at codewiz.org
Sun Dec 9 22:59:41 EST 2007


On 12/09/07 19:51, Roberto Fagá wrote:


> I think for now pygame is doing with 16bits at default yet, and I
> wrote wrong, the second parameter from set_mode are the flags, depth
> is the third parameter. I also used 12bits too to test, for games when
> colors don't matter so much can be a good choice.

Even a lower depth, like 12bpp, is going to result in a slowdown
with the Geode GPU.  The best depth is the same of the screen.


> Was 16bits the default depth since the first pygame for XO? I
> remembered that it was creating 32bits for me by default, but with
> older versions of Sugar...

It's the default of the X server.  It would be nice if pygame
would create surfaces in the screen depth by default, so that
application developers wouldn't have to care.

-- 
 \___/
 |___|   Bernardo Innocenti - http://www.codewiz.org/
  \___\  One Laptop Per Child - http://www.laptop.org/




More information about the Devel mailing list