self:set_active
Client
Sets this instance as the active rendertarget
Syntax
local status = self:set_active(
clear = false,
instant = false
)Parameters
| Type | Name | Description |
|---|---|---|
bool | clear | Determines the clear state: • When true - clears the rendertarget upon binding• When false - preserves the existing contents |
bool | instant | Determines the clear timing: • When true - applies the clear immediately• When false - defers the clear to the next frame |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.rendertarget.create(1920, 1080, false)
entity:set_active(true)
core.engine.print("info", "Is rendertarget active:", entity:is_active()) -- true