RenderTarget
in package
Table of Contents
Properties
- $contentScaleX : float
- The render targets pixel density (for high dpi displays) on the x axis
- $contentScaleY : float
- The render targets pixel density (for high dpi displays) on the y axis
- $height : int
- $width : int
- $framebuffer : AbstractFramebuffer
- The render targets frame buffer
Methods
- __construct() : mixed
- Constrcutor
- 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)
- framebuffer() : AbstractFramebuffer
- Returns the render targets framebuffer
- height() : int
- Returns the render targets height in device pixels
- isOffscreen() : bool
- Returns boolean if the render target is an offscreen render target
- preparePass() : void
- Prepares a render pass to the render target This will bind the render targets framebuffer, update the viewport
- updateViewport() : void
- Updates the viewport to the render targets dimensions
- width() : int
- Returns the render targets width in device pixels
Properties
$contentScaleX
The render targets pixel density (for high dpi displays) on the x axis
public
float
$contentScaleX
= 1.0
$contentScaleY
The render targets pixel density (for high dpi displays) on the y axis
public
float
$contentScaleY
= 1.0
$height
protected
int
$height
$width
protected
int
$width
$framebuffer
The render targets frame buffer
private
AbstractFramebuffer
$framebuffer
Methods
__construct()
Constrcutor
public
__construct(int $width, int $height, AbstractFramebuffer $framebuffer) : mixed
Parameters
- $width : int
- $height : int
- $framebuffer : AbstractFramebuffer
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
Return values
intframebuffer()
Returns the render targets framebuffer
public
framebuffer() : AbstractFramebuffer
Return values
AbstractFramebufferheight()
Returns the render targets height in device pixels
public
height() : int
Return values
intisOffscreen()
Returns boolean if the render target is an offscreen render target
public
isOffscreen() : bool
Return values
boolpreparePass()
Prepares a render pass to the render target This will bind the render targets framebuffer, update the viewport
public
preparePass() : void
updateViewport()
Updates the viewport to the render targets dimensions
public
updateViewport() : void
width()
Returns the render targets width in device pixels
public
width() : int