display.flip()

来源:3-2 飞机大战项目搭建

慕虎7577878

2019-09-18 21:46:54

pygame.display.fip()


老师可以讲下这个方法的具体功能吗,下面这段官方介绍看的不是很明白。

This will update the contents of the entire display. If your display mode is using the flags pygame.HWSURFACE and pygame.DOUBLEBUF, this will wait for a vertical retrace and swap the surfaces. If you are using a different type of display mode, it will simply update the entire contents of the surface.

When using an pygame.OPENGL display mode this will perform a gl buffer swap.


写回答

1回答

时间,

2019-09-19

同学,你好。

pygame.display.flip():更新整个待显示的Surface对象到屏幕上。使用blit()方法将图片画到screen Surface 对象,再使用flip()方法更新整个待显示的Surface对象到屏幕上。

如果我的回答解决了您的疑惑,请采纳!祝学习愉快~~~~~

0

0 学习 · 8160 问题

查看课程