Currently gamemaker surfaces gets deleted automatically on resize now that might make sense for post processing and rendering purposes. But if you use it to store data to assist rendering or shaders, it makes no sense to have it deleted, which makes it painfull todo certain things in gamemaker as you have to store a buffer copy at all times & each time you perform an edit on said surface.
Describe the solution you'd like
an optional "flag" on each surface created so that when gamemaker resizes and frees the surfaces , surfaces with said flag will be ignored from the deletion proccess. example: surface_create(width,height,type,permanent?); or surface_set_permanent(true); or surface_set_usage(surface_data / surface_render );
Describe alternatives you've considered
Currently the only work around sucks, which tend to cause slowdown and noticeable lags on resize or edits. And can cost more memory as you need to store copies. You may also have to disable the window border so that you can control when the window is resized in order to perform a surface save to buffer before applying the resize. (and ofc set the surface from buffer afterwards) slow...
Is your feature request related to a problem?
Currently gamemaker surfaces gets deleted automatically on resize now that might make sense for post processing and rendering purposes. But if you use it to store data to assist rendering or shaders, it makes no sense to have it deleted, which makes it painfull todo certain things in gamemaker as you have to store a buffer copy at all times & each time you perform an edit on said surface.
Describe the solution you'd like
an optional "flag" on each surface created so that when gamemaker resizes and frees the surfaces , surfaces with said flag will be ignored from the deletion proccess. example: surface_create(width,height,type,permanent?); or surface_set_permanent(true); or surface_set_usage(surface_data / surface_render );
Describe alternatives you've considered
Currently the only work around sucks, which tend to cause slowdown and noticeable lags on resize or edits. And can cost more memory as you need to store copies. You may also have to disable the window border so that you can control when the window is resized in order to perform a surface save to buffer before applying the resize. (and ofc set the surface from buffer afterwards) slow...
Additional context
No response