GetRenderTargetEx
ITexture GetRenderTargetEx( string name, number width, number height, number sizeMode, number depthMode, number textureFlags, number rtFlags, number imageFormat )
Description
Gets (or creates if it does not exist) 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
1 string name
The internal name of the render target.
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.
"name.1" and "name.2" are considered the same name and will result in the same render target being reused.
4 number with RT_SIZE enum sizeMode
Bitflag that influences the sizing of the render target, see RT_SIZE enum.
5 number with MATERIAL_RT_DEPTH enum depthMode
Bitflag that determines the depth buffer usage of the render target MATERIAL_RT_DEPTH enum.
PNG's may not render to non MATERIAL_RT_DEPTH_NONE RenderTargets
6 number with TEXTUREFLAGS enum textureFlags
Bitflag that configures the texture, see TEXTUREFLAGS enum.
List of flags can also be found on the Valve's Developer Wiki: https://developer.valvesoftware.com/wiki/Valve_Texture_Format
7 number with CREATERENDERTARGETFLAGS enum rtFlags
Flags that control the HDR behaviour of the render target, see CREATERENDERTARGETFLAGS enum.
8 number imageFormat
Image format, see IMAGE_FORMAT enum.
Some additional image formats are accepted, but don't have enums. See VTF Enumerations.