[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Optimization, double buffered pygames



Syver Enstad wrote:
> I've designed it to use double buffering, so it has to draw the entire
> world for each frame (HWSURFACE|DOUBLEBUF). What I find a little
> strange is that the game runs faster in a window than fullscreen. I am
> running on win2k. 

what is the speed difference? there is a good chance the fullscreen 
version is waiting for a vertical retrace before doing the double 
buffered flip.

also, check the flags of the surface returned by display.set_mode(). you 
likely aren't even getting HWSURFACE or DOUBLEBUF flags for the windowed 
mode.

	if screen.get_flags() & HWSURACE == HWSURFACE:
		print 'Hardware Accelerated'
	if screen.get_flags() & DOUBLEBUF == DOUBLEBUF:
		print 'Double Buffered'


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org