Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENGL display.set_mode() -> surface #1483

Open
illume opened this issue Nov 4, 2019 · 0 comments
Open

OPENGL display.set_mode() -> surface #1483

illume opened this issue Nov 4, 2019 · 0 comments
Labels
display pygame.display docs moderate An intermediate challenge to solve opengl

Comments

@illume
Copy link
Member

illume commented Nov 4, 2019

This issue #1475 raised a few points. Opening this for further discussion.

@robertpfeiffer wrote:

I'll fix this, but in general, the return value of pygame.display.set_mode(spam, pygame.OPENGL) is a fake surface, and should not be treated like a surface, and you should not blit to or from it. You do not blit to the screen with pygame.OPENGL. You use OpenGL instead of blitting. That's the whole point.

Likewise, when you do pygame.display.set_mode(spam, bacon | pygame.SCALED), then your surface size won't necessarily be the size of the window.

I'd fix the behaviour (for backwards compat) but also change the docs that we make no guarantee about the type or behaviour of the return value when using pygame.OPENGL.

While I'm at it, I could also write a new is_fullscreen API for #1343 and deprecate the FULLSCREEN flag on surfaces in the docs.

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

@MyreMylar MyreMylar added display pygame.display needs-docs moderate An intermediate challenge to solve opengl labels May 10, 2020
@ankith26 ankith26 added docs and removed needs-docs labels Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display pygame.display docs moderate An intermediate challenge to solve opengl
Projects
None yet
Development

No branches or pull requests

3 participants