FULLSCREEN and DOUBLEBUF

Chris Angelico rosuav at gmail.com
Thu Jun 7 13:56:49 EDT 2018


On Fri, Jun 8, 2018 at 3:12 AM, Paul St George <email at paulstgeorge.com> wrote:
> This is both a narrow question about some code and a more general question
> about syntax in Python
>
> Using the Pygame modules, I want to set both FULLSCREEN and DOUBLEBUF
>
> I can use
> screen =
> pygame.display.set_mode((screen_width,screen_height),pygame.FULLSCREEN)
> to set a FULLSCREEN display
>
> Or, I can use
> screen =
> pygame.display.set_mode((screen_width,screen_height),pygame.DOUBLEBUF)
> to set DOUBLEBUF
>
> But how do I set both FULLSCREEN and DOUBLEBUF?
>
> And, how can I test or check that DOUBLEBUF is set?

This is definitely a pygame question. So let's grab the docos for that
set_mode function.

https://www.pygame.org/docs/ref/display.html#pygame.display.set_mode

You're passing two parameters in each of your examples. The first is a
tuple of (w,h) for the dimensions; the second is a constant for the
mode you want. The name of the second argument is "flags", according
to the documentation. That usually means that you can provide
multiple. The exact mechanism for combining flags is given in the last
paragraph of the docs. I'll let you take the credit for figuring out
the details yourself :)

ChrisA



More information about the Python-list mailing list