Surface Manager Keeps track of your surfaces and re-creates them as needed if lost. Features full set of controls to manage both new, and existing surfaces, as well as resizing, freeing, or just unmanaging surfaces.
new 1.1.0 define a callback script to be called upon surface loss!
A must have when dealing with surfaces.
Inlcudes Surface manager scripts, example object and documentation.
Creating managed surfaces:
managed_surface = surface_manager_create_surface(1280, 720);
Using managed surfaces:
var surface = surface_manager_get_surface(managed_surface); draw_surface(surface, 0, 0);
Defining a callback script
surface_manager_set_callback(managed_surface, scr_redraw); or surface_manager_set_callback(managed_surface, scr_redraw, obj_graphics);