本文整理匯總了Python中graphics.Graphics.display方法的典型用法代碼示例。如果您正苦於以下問題:Python Graphics.display方法的具體用法?Python Graphics.display怎麽用?Python Graphics.display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類graphics.Graphics
的用法示例。
在下文中一共展示了Graphics.display方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: glGenTextures
# 需要導入模塊: from graphics import Graphics [as 別名]
# 或者: from graphics.Graphics import display [as 別名]
elif event.type == pygame.QUIT:
sys.exit()
#===============================================================================================
#draw calls
loc = dungeon.loc(pc)
dungeon.draw( loc )
selection.draw()
for each in update_list:
each.draw( each.loc, None )
if not each.update( pygame.time.get_ticks() ):
update_list.remove(each)
gfx.display()
pygame.display.flip()
#===============================================================================================
# textureData = pygame.image.tostring(screen, "RGBA", 1)
# width = screen.get_width()
# height = screen.get_height()
# texture = glGenTextures(1)
# glBindTexture(GL_TEXTURE_2D, texture)
# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
# glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,width,height,0,GL_RGBA,GL_UNSIGNED_BYTE,textureData)