Garry's Mod Wiki

Revision Difference

Global.GetRenderTargetEx#518957

<function name="GetRenderTargetEx" parent="Global" type="libraryfunc"> <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 <page>Global.GetRenderTarget</page>. See also <page>render.PushRenderTarget</page> and <page>render.SetRenderTarget</page>. </description> <realm>Client</realm> <args> <arg name="name" type="string">The internal name of the render target. <warning>The name is treated like a path and gets its extension discarded.&amp;lt;br&amp;gt;"name.1" and "name.2" are considered the same name and will result in the same render target being reused.</warning></arg> <arg name="width" type="number">The width of the render target, must be power of 2.</arg> <arg name="height" type="number">The height of the render target, must be power of 2.</arg> <arg name="sizeMode" type="number">Bitflag that influences the sizing of the render target, see <page>RT_SIZE</page>.</arg> <arg name="depthMode" type="number">Bitflag that determines the depth buffer usage of the render target <page>MATERIAL_RT_DEPTH</page>.</arg> <arg name="textureFlags" type="number">Bitflag that configurates the texture, see <page>TEXTUREFLAGS</page>. <arg name="sizeMode" type="number">Bitflag that influences the sizing of the render target, see <page>Enums/RT_SIZE</page>.</arg> <arg name="depthMode" type="number">Bitflag that determines the depth buffer usage of the render target <page>Enums/MATERIAL_RT_DEPTH</page>.</arg> <arg name="textureFlags" type="number">Bitflag that configurates the texture, see <page>Enums/TEXTUREFLAGS</page>. List of flags can also be found on the Valve's Developer Wiki: https://developer.valvesoftware.com/wiki/Valve_Texture_Format</arg> <arg name="rtFlags" type="number">Flags that controll the HDR behaviour of the render target, see <page>CREATERENDERTARGETFLAGS</page>.</arg> <arg name="imageFormat" type="number">Image format, see <page>IMAGE_FORMAT</page>.</arg> <arg name="rtFlags" type="number">Flags that controll the HDR behaviour of the render target, see <page>Enums/CREATERENDERTARGETFLAGS</page>.</arg> <arg name="imageFormat" type="number">Image format, see <page>Enums/IMAGE_FORMAT</page>.</arg> </args> <rets> <ret name="" type="ITexture">The new render target.</ret> </rets> </function>