pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Document OPENGL display.set_mode() -> returned surface not being usable for blitting (1483)

Open GalacticEmperor1 opened this issue 2 years ago • 0 comments
trafficstars

Issue №1483 opened by illume at 2019-11-04 13:47:42

This issue https://github.com/pygame/pygame/issues/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


Comments

GalacticEmperor1 avatar Feb 12 '23 11:02 GalacticEmperor1