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.
5 number 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 textureFlags
Bitflag that configurates 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 rtFlags
Flags that controll 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.