RenderTargetResource
extends RenderResource
in package
Table of Contents
Properties
- $colorAttachments : array<int, TextureResource>
- An array of TextureResource objects that are attached to the render target
- $contentScaleX : float
- The render targets content scale on the x axis
- $contentScaleY : float
- The render targets content scale on the y axis
- $createRenderbufferColor : bool
- Create a color Renderbuffer
- $createRenderbufferDepthStencil : bool
- Create a depth stencil Renderbuffer
- $depthAttachment : TextureResource|null
- Depth attachment
- $handle : int
- $height : int
- The render targets height (in pixels)
- $name : string
- $width : int
- The render targets width (in pixels)
Methods
- __construct() : mixed
- Resource constructor.
- effectiveHeight() : int
- Returns the render targets logical height (in points)
- effectiveSizeVec() : Vec2
- Returns a Vec2 with effectiveWidth and effectiveHeight
- effectiveWidth() : int
- Returns the render targets logical width (in points)
Properties
$colorAttachments
An array of TextureResource objects that are attached to the render target
public
array<int, TextureResource>
$colorAttachments
= []
$contentScaleX
The render targets content scale on the x axis
public
float
$contentScaleX
= 1.0
$contentScaleY
The render targets content scale on the y axis
public
float
$contentScaleY
= 1.0
$createRenderbufferColor
Create a color Renderbuffer
public
bool
$createRenderbufferColor
= false
$createRenderbufferDepthStencil
Create a depth stencil Renderbuffer
public
bool
$createRenderbufferDepthStencil
= false
$depthAttachment
Depth attachment
public
TextureResource|null
$depthAttachment
= null
$handle read-only
public
int
$handle
$height
The render targets height (in pixels)
public
int
$height
= 720
$name read-only
public
string
$name
$width
The render targets width (in pixels)
public
int
$width
= 1280
Methods
__construct()
Resource constructor.
public
__construct(int $handle, string $name) : mixed
Parameters
- $handle : int
-
the resource handle unique inside of the pipeline.
- $name : string
-
A globally unique name to identify the resource
effectiveHeight()
Returns the render targets logical height (in points)
public
effectiveHeight() : int
Return values
inteffectiveSizeVec()
Returns a Vec2 with effectiveWidth and effectiveHeight
public
effectiveSizeVec() : Vec2
Return values
Vec2effectiveWidth()
Returns the render targets logical width (in points)
public
effectiveWidth() : int