GM: surface set target
From GMpedia.org Wiki
- The correct title of this article is surface_set_target(id). It appears incorrectly here because of technical restrictions.
- The correct title of this article is surface_set_target(). It appears incorrectly here because of technical restrictions.
Arguments
id = name of the variable which holds the ID of the surface (see surface_create).
Limitations
none.
Note: Please remove limitations and port them in the "Remarks" section at the end of the article.
This function sets the drawing target to the surface with the corresponding ID instead of drawing to the main window. This is useful because it lets you perform the draw actions once instead of constantly at the draw event. This saves much speed.
[edit] Example
surface_set_target(surface); //draw_... //draw_... surface_reset_target();
[edit] See Also
- Surfaces - a complete Game Maker tutorial in surfaces.
- surface_reset_target
This article was originally found at the Game Maker Knowledge Base, contributed by Eyas Sharaiha.
See the talk page for details
See the talk page for details

