[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
RE: [pygame] Slow performance in fullscreen mode
> Brian Bull wrote:
> > Hi,
> >
> > My Pygame app runs fine in windowed mode, using
> >
> >> pygame.display.set_mode((1024,768))
> >
> > But when I switch to fullscreen mode with
> >
> >> pygame.display.set_mode((1024,768),pygame.FULLSCREEN)
> >
> > the display looks fine but the app speed slows down
> dramatically. Perhaps the problem is that Pygame is emulating
> an absent video mode in some form? 1024 x 768 is supposed to
> be one of the video modes of this monitor...
> >
> > Does anyone have any suggestions please? I would like to be
> able to use fullscreen 1024x768 without the performance hit...
> >
> > Thanks
> > A.
> >
>
> Try throwing away all but the first mouse movement, each time
> through the loop. That sped up my app significantly... as it
> turned out, full screen mode was sending every xy change to
> the app, whereas windowed mode was throwing away samples
> between mouse movements (the preferred
> behavior.)
Yes, this worked fine, thank you Kamiche.
A.
"The information contained in this transmission is confidential. It is intended for the named address only. If you are not the named address you may not copy, distribute or take any action in reliance upon this transmission"