MCPcopy Create free account
hub / github.com/OGRECave/ogre / _init_window

Function _init_window

Components/Python/HighPy.py:122–137  ·  view source on GitHub ↗
(window_data, flags)

Source from the content-addressed store, hash-verified

120 _ctx.initApp()
121
122def _init_window(window_data, flags):
123 scn_mgr = _ctx.getRoot().createSceneManager()
124 window_data.scn_mgr = scn_mgr
125 Ogre.RTShader.ShaderGenerator.getSingleton().addSceneManager(scn_mgr)
126
127 window_data.camera = scn_mgr.createCamera("camera")
128 window_data.camera.setAutoAspectRatio(True)
129
130 camnode = scn_mgr.getRootSceneNode().createChildSceneNode()
131 camnode.attachObject(window_data.camera)
132 if flags & AXES_ZFORWARD_YDOWN:
133 # convert from AXES_ZBACKWARD_YUP (Ogre default)
134 camnode.setOrientation(Ogre.Quaternion(Ogre.Math.PI, (1, 0, 0)))
135 window_data.window.addViewport(window_data.camera)
136
137 window_data.listen_to_input()
138
139## \endcond
140

Callers 1

window_createFunction · 0.85

Calls 10

addSceneManagerMethod · 0.80
setAutoAspectRatioMethod · 0.80
getRootSceneNodeMethod · 0.80
attachObjectMethod · 0.80
addViewportMethod · 0.80
listen_to_inputMethod · 0.80
createSceneManagerMethod · 0.45
createCameraMethod · 0.45
createChildSceneNodeMethod · 0.45
setOrientationMethod · 0.45

Tested by

no test coverage detected