core.rendertarget.create

Client

Creates a new rendertarget instance


Syntax

local instance = core.rendertarget.create(
    size,
    transparent = false
)

Parameters

TypeNameDescription
vector2sizeSize of the rendertarget as {width, height}
booltransparentDetermines whether the rendertarget has a transparent background:
• When true - the background is transparent
• When false - the background is opaque

Returns

TypeNameDescription
rendertargetinstanceCreated rendertarget instance

Examples

Create a rendertarget and set it as active
local entity = core.rendertarget.create({1920, 1080}, false)

entity:set_active()

On this page