Fastest way to clear a surface? SOLVED

T

Toxicosis

Guest
I'll make it quick, I need to clear a surface, i.e., take every pixel in it and replace its r,g,b,a by 0,0,0,0, as if it had been just created. What's the easiest way to do so, short of freeing the surface and creating another?
 

Neptune

Member
I think this is the function you need.
draw_clear_alpha(c_black,0);
Changing the alpha to 1 will change the surface into a black rectangle.
 
Top