Flaick
Member
Hi guys, is it possible to draw on two surfaces with different dimensions/resolution?
I have my game at 640x360, but i wanna draw some elements at higher resolution. I can achieve this using the GUI. For example i have two sprites, one 32px other 96px; if i draw the one to application_surface and other to GUI (resized to 1920x1080), the second will looks quite same dimensions but more detailed.
Code:
On creation room (or another object):
Object with 96px sprite, Draw GUI event:
Is this doable with a second surface instead using GUI? I've tried but didn't work:
Object with 96px sprite, Draw event:
I have my game at 640x360, but i wanna draw some elements at higher resolution. I can achieve this using the GUI. For example i have two sprites, one 32px other 96px; if i draw the one to application_surface and other to GUI (resized to 1920x1080), the second will looks quite same dimensions but more detailed.
Code:
On creation room (or another object):
Code:
display_set_gui_size(1920,1080);
Code:
draw_self();
Object with 96px sprite, Draw event:
Code:
if !surface_exists(surf) {
surf = surface_create(1920,1080);
}
surface_set_target(surf);
draw_self();
surface_reset_target();
draw_surface(surf,0,0);
view_surface_id[0] = surf;