本文整理汇总了Python中panda3d.core.WindowProperties.get_default方法的典型用法代码示例。如果您正苦于以下问题:Python WindowProperties.get_default方法的具体用法?Python WindowProperties.get_default怎么用?Python WindowProperties.get_default使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类panda3d.core.WindowProperties
的用法示例。
在下文中一共展示了WindowProperties.get_default方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_window_basic
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import get_default [as 别名]
def test_window_basic(window):
from panda3d.core import WindowProperties
assert window is not None
current_props = window.get_properties()
default_props = WindowProperties.get_default()
# Opening the window changes these from the defaults. Note that we have
# no guarantee that it opens in the foreground or with the requested size.
default_props.set_size(current_props.get_size())
default_props.set_origin(current_props.get_origin())
default_props.set_minimized(False)
default_props.foreground = current_props.foreground
# The rest should be the same
assert current_props == default_props
示例2: window
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import get_default [as 别名]
def window(graphics_pipe, graphics_engine):
from panda3d.core import GraphicsPipe, FrameBufferProperties, WindowProperties
fbprops = FrameBufferProperties.get_default()
winprops = WindowProperties.get_default()
win = graphics_engine.make_output(
graphics_pipe,
'window',
0,
fbprops,
winprops,
GraphicsPipe.BF_require_window
)
graphics_engine.open_windows()
assert win is not None
yield win
if win is not None:
graphics_engine.remove_window(win)