surface_set_target_ext

Sets the MRT output target to a specific surface.

Syntax:

GML Code Example

surface_set_target_ext(index, surface_id);


Argument Description
index The render target index to use (from 0 to 3).
surface_id The ID of the surface to use.


Returns: Boolean


Description

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

NOTE: When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should ALWAYS check that a surface exists using surface_exists before referencing them directly. For further information see Surfaces.


Example:

GML Code Example

surface_set_target_ext(0, surf);

The above code will set the render target 0 to the surface ID indexed in the variable "surf".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here