[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Optimization, double buffered pygames
"Nat Pryce" <nat.pryce@b13media.com> writes:
> Another reason might be that your "content" surfaces (sprites,
> backgrounds,
>
> etc.) are not in same format as the windowed display but in a
> different
>
> format from the fullscreen display. If this is the case, they will
> have to
>
> be converted to the display format on every blit, which results in a
> big
>
> performance hit. Convert all your content to the format of the display
> as
>
> you load it from disk.
Yes, I call convert on them like this (isn't that the way to do it):
self._surface = pygame.image.load('bla bla').convert()
>
> Alternatively, you might be requesting a pixel format that cannot be
> supported by the hardware. SDL will then emulate that pixel format in
>
> software and convert each frame to the actual hardware format when it
> updates the screen.
I don't request a special format, and I've tried requesting specific
formats, tried 16 bit and 8 bit, not much difference in frame rate.
Anyway it's not a problem as such I just don't understand the
behaviour, I don't expect to make anything close to a commercial game
anyway but fullscreen feels a lot cooler than a pesky window.
--
Vennlig hilsen
Syver Enstad
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org