G
Golden Gremlin
Guest
I am trying to scale and manually draw my application surface to my fullscreen game window. Ultimately, I am doing this so that I can guarantee I am scaling by an integer when in fullscreen mode, to prevent pixel distortion.
As a test, I am just trying to scale my application_surface by 2 and draw it at the origin of the fullscreen window.
This is what I have in my resolution_manager's creation event:
And this is what I have in the post-draw event:
The result is not what I expected. Rather than scaling and stretching the application surface, what is drawn is just a wider view of my level. It seems like the view got scaled by 2 as well as the application window.
This is what it looks like:
This is what I want:
How can I fix this so that my application surface scales by 2 in the intended manner?
As a test, I am just trying to scale my application_surface by 2 and draw it at the origin of the fullscreen window.
This is what I have in my resolution_manager's creation event:
Code:
application_surface_draw_enable(false);
scale = 2;
// get monitor size & aspect ratio
display_width = display_get_width();
display_height = display_get_height();
display_aspect_ratio = display_width/display_height;
// specify native resolution
ideal_width = 427
ideal_height = 240
// set gui size
display_set_gui_size(ideal_width, ideal_height);
// set view size for all rooms
for (var i = 0; i <= room_last; i++)
{
if room_exists(i)
{
room_set_viewport(i, 0, true, 0, 0, ideal_width, ideal_height);
room_set_view_enabled(i, true);
room_set_camera(i, 0, 0);
}
}
// resize application surface
surface_resize(application_surface, ideal_width * scale, ideal_height * scale);
Code:
draw_surface(application_surface, 0, 0);
This is what it looks like:
This is what I want:
How can I fix this so that my application surface scales by 2 in the intended manner?