Argument Description surface_id The ID of the surface to get the width of.
This function returns a special pointer for the surface texture. This value can then be used in other draw functions, particularly in general 3D and some of the 2D primitive functions.
tex = surface_get_texture(surf);
draw_vertex_texture(0, 480, 0, 0);
draw_vertex_texture(640, 480, 1, 0);
draw_vertex_texture(640, 480, 1, 1);
draw_vertex_texture(0, 480, 0, 1);
The above code will draw a 4 vertex triangle strip textured with the texture held in the "tex" variable, which is itself taken from a previously created surface.