本文整理汇总了Python中pandac.PandaModules.Texture.getTexturesPower2方法的典型用法代码示例。如果您正苦于以下问题:Python Texture.getTexturesPower2方法的具体用法?Python Texture.getTexturesPower2怎么用?Python Texture.getTexturesPower2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandac.PandaModules.Texture
的用法示例。
在下文中一共展示了Texture.getTexturesPower2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeTextureBuffer
# 需要导入模块: from pandac.PandaModules import Texture [as 别名]
# 或者: from pandac.PandaModules.Texture import getTexturesPower2 [as 别名]
def makeTextureBuffer(name, xSize, ySize, tex = None, toRam = False, fbp = None):
"""Copied from graphicsOutput.cxx and pythonified."""
if fbp == None:
fbp = FrameBufferProperties()
fbp.setRgbColor(1)
fbp.setDepthBits(1)
flags = GraphicsPipe.BFRefuseWindow;
if hasattr(GraphicsPipe, "BFSizePower2") and Texture.getTexturesPower2() != ATSNone:
flags |= GraphicsPipe.BFSizePower2
if tex != None and tex.getTextureType() == Texture.TTCubeMap:
flags |= GraphicsPipe.BFSizeSquare
buffer = WindowManager.gsg.getEngine().makeOutput(base.pipe, name, 0,
fbp, WindowProperties.size(xSize, ySize), flags, WindowManager.gsg)
if WindowManager.gsg == None:
WindowManager.gsg = buffer.getGsg()
if buffer != None:
if toRam:
buffer.addRenderTexture(tex, RTMCopyRam);
else:
buffer.addRenderTexture(tex, RTMBindOrCopy);
return buffer
return None