surface_set_target_ext

This function is for use with the Shader Functions and sets the MRT (0 - 3) for native level shaders (OpenGL ES, OpenGL, DX9, DX11).

NOTE If you have not previously set a render target with the function surface_set_target, using this function will silently (i.e. without any error messages) end all further code execution for the event.

NOTE MRT's are not supported on HTML5.

 

Syntax:

surface_set_target_ext(index, surface_id);

ArgumentTypeDescription
indexRealThe render target index to use (from 0 to 3).
surface_idSurfaceThe surface to use.

 

Returns:

Boolean Whether the render target was set successfully

 

Example:

surface_set_target_ext(0, surf);

The above code sets the render target 0 to the surface stored in the variable surf.