GetRenderTargetEx

From Garry's Mod
Jump to: navigation, search
 GetRenderTargetEx( )

Contents

Description

Creates (or gets if it already exsits) the rendertarget with the given name, this function allows to adjust the creation of a rendertarget more than GetRenderTarget.

See also render.PushRenderTarget and render.SetRenderTarget.

Arguments

string name

The internal name of the render target.

WARNING

The name is treated like a path and gets its extension discarded.
"name.1" and "name.2" are considered the same name and will result in the same render target being reused.

Arguments

number width

The width of the render target, must be power of 2.

Arguments

number height

The height of the render target, must be power of 2.

Arguments

number sizeMode

Bitflag that influences the sizing of the render target, see RT_SIZE_ Enums.

Arguments

number depthMode

Bitflag that determines the depth buffer usage of the render target MATERIAL_RT_DEPTH_ Enums.

Arguments

number textureFlags

Bitflag that configurates the texture, see TEXTUREFLAGS_ Enums.

List of flags can also be found on the Valve's Developer Wiki:

https://developer.valvesoftware.com/wiki/Valve_Texture_Format

Arguments

number rtFlags

Flags that controll the HDR behaviour of the render target, see CREATERENDERTARGETFLAGS_ Enums.

Arguments

number imageFormat

Image format, see IMAGE_FORMAT_ Enums.

Returns

ITexture

The new render target.
Personal tools
Navigation