J
Jon Perry
Guest
I am trying to copy the application surface to a new surface object, but every way I've tried this the object ends up completely empty of any image information.
At the beginning of my project I have this code just to make sure the application surface is enabled:
I am also creating a surface to copy to:
Finally in order to test if this is successful I am saving the surface to a file. (This is triggered off of a key-press)
What step am I missing?
At the beginning of my project I have this code just to make sure the application surface is enabled:
application_surface_enable(true);
application_surface_draw_enable(true);
application_surface_draw_enable(true);
I am also creating a surface to copy to:
surf = surface_create(384,216);
Later in the draw end event I am trying to copy the application surface to my own surface:
surface_copy(surf, 0, 0, application_surface);
Finally in order to test if this is successful I am saving the surface to a file. (This is triggered off of a key-press)
surface_save(surf, "test.png");
Unfortunately, when I go look at the file, it is the right dimensions but completely empty of information. My game has lots of background tiles and objects on the screen that should be appearing but are not. It's as if the application_surface is not being written to at all.
What step am I missing?