The Reverend
Member
I got some trouble with the viewport and window size:
If the viewport is smaller than the window, GM:S scales the view to fit the window anyways. However I do not want that since I want a pixelperfect scale. So I thought I'd manually set the viewport:
What I expected was this:
What I got however is this:
I tried to work around by disabling the automatic drawing of the application surface and then draw it manually but of course then the mouse was off.
What am I missing here?
If the viewport is smaller than the window, GM:S scales the view to fit the window anyways. However I do not want that since I want a pixelperfect scale. So I thought I'd manually set the viewport:
Code:
// set camera and view size:
view = 0;
win_w = 1600;
win_h = 900;
view_w = 1200; // view is smaller than window
view_h = 675;
window_set_size(win_w, win_h);
camera_set_view_size(view_camera[view], view_w, view_h);
// set the viewpost size to view instead of window:
view_set_wport(view, view_w);
view_set_hport(view, view_h);
// center the viewport:
view_set_xport(view, 0.5 * (win_w - view_w));
view_set_yport(view, 0.5 * (win_h - view_h));
// resize application surface to view size until it's done:
surface_resize(application_surface, view_w, view_h);
alarm[0] = 1; // if appsrf size is not view size, resize appsrf and set alarm again
What I got however is this:
I tried to work around by disabling the automatic drawing of the application surface and then draw it manually but of course then the mouse was off.
What am I missing here?