[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame.display.flip() and framerate



hi,

I think you are running into v-synch.  Where it limits it to the
screens refresh rate.

Which is a pretty good thing, because then it can stop tearing with opengl.

cheers,


On Sun, Feb 8, 2009 at 2:24 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> Hello,
>
> One can use the SDL pygame normally uses, or OpenGL.
>
> I've noticed that each runs faster when nothing is drawn the the screen (no
> pygame.display.flip())--I can get very nice (100s or 1000s of frames/second
> this way).  When pygame.display.flip() is added, the framerate drops.
> What's curious is that the SDL renderer can still achieve framerates around
> 200 or 300, but the OpenGL render seems limited to 60.  Any particular
> reason for this?  60 frames/second is a decent framerate, but such a
> limitation seems bizarre, even if it's not troublesome.
>
> Ian
>