BackBufferCopy
继承: Node2D
< CanvasItem
< Node
< Object
A node that copies a region of the screen to a buffer for access in shader code.
描述
Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to the copy_mode
. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with hint_screen_texture
).
Note: Since this node inherits from Node2D
(and not Control
), anchors and margins won't apply to child Control
-derived nodes. This can be problematic when resizing the window. To avoid this, add Control
-derived nodes as siblings to the BackBufferCopy node instead of adding them as children.
属性
枚举
enum CopyMode:
CopyMode COPY_MODE_DISABLED = 0
Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
CopyMode COPY_MODE_RECT = 1
BackBufferCopy buffers a rectangular region.
CopyMode COPY_MODE_VIEWPORT = 2
BackBufferCopy buffers the entire screen.
属性说明
CopyMode copy_mode = 1
Buffer mode. See CopyMode constants.
Rect2
rect = Rect2(-100, -100, 200, 200)
The area covered by the BackBufferCopy. Only used if copy_mode
is COPY_MODE_RECT
.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。