Garry's Mod Wiki

Revision Difference

Global.GetRenderTargetEx#514929

<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.&#xA;&#xA;&lt;warning&gt;The name is treated like a path and gets its extension discarded.&amp;amp;lt;br&amp;amp;gt;&quot;name.1&quot; and &quot;name.2&quot; are considered the same name and will result in the same render target being reused.&lt;/warning&gt;</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 &lt;page&gt;RT_SIZE&lt;/page&gt;.</arg>⤶ <arg name="depthMode" type="number">Bitflag that determines the depth buffer usage of the render target &lt;page&gt;MATERIAL_RT_DEPTH&lt;/page&gt;.</arg>⤶ <arg name="textureFlags" type="number">Bitflag that configurates the texture, see &lt;page&gt;TEXTUREFLAGS&lt;/page&gt;.&#xA;&#xA;List of flags can also be found on the Valve&#x27;s Developer Wiki:&#xA;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 &lt;page&gt;CREATERENDERTARGETFLAGS&lt;/page&gt;.</arg>⤶ <arg name="imageFormat" type="number">Image format, see &lt;page&gt;IMAGE_FORMAT&lt;/page&gt;.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="ITexture">The new render target.</ret>⤶ </rets>⤶ </function>⤶ ⤶