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

Function _create_image_background

Components/Python/HighPy.py:96–110  ·  view source on GitHub ↗
(scn_mgr, name)

Source from the content-addressed store, hash-verified

94 return True
95
96def _create_image_background(scn_mgr, name):
97 tex = Ogre.TextureManager.getSingleton().create(name, Ogre.RGN_DEFAULT, True)
98 tex.setNumMipmaps(0)
99
100 mat = Ogre.MaterialManager.getSingleton().create(name, Ogre.RGN_DEFAULT)
101 mat.getTechnique(0).getPass(0).createTextureUnitState().setTexture(tex)
102 mat.getTechnique(0).getPass(0).setDepthWriteEnabled(False)
103 mat.getTechnique(0).getPass(0).setLightingEnabled(False)
104
105 rect = scn_mgr.createScreenSpaceRect(True)
106 rect.setMaterial(mat)
107 rect.setRenderQueueGroup(Ogre.RENDER_QUEUE_BACKGROUND)
108 scn_mgr.getRootSceneNode().attachObject(rect)
109
110 return tex
111
112_ctx = None
113

Callers 1

imshowFunction · 0.85

Calls 13

setNumMipmapsMethod · 0.80
setTextureMethod · 0.80
getPassMethod · 0.80
createScreenSpaceRectMethod · 0.80
attachObjectMethod · 0.80
getRootSceneNodeMethod · 0.80
createMethod · 0.45
getTechniqueMethod · 0.45
setDepthWriteEnabledMethod · 0.45
setLightingEnabledMethod · 0.45
setMaterialMethod · 0.45

Tested by

no test coverage detected