A
Adry
Guest
Hi all! I've been searching extensively but can't find an answer to this. I have a full screen persistent obj controller I know is causing my game to lag. I should also note that I am using vector graphics. I narrowed the lag down to this line:
In windowed mode, I get no lag, however when I switch to full screen and resize the surface (note: if I don't resize the surface I get pixelated blurred vector graphics) it lags. any one got any suggestions? Here's the full code:
GML:
surface_resize(application_surface, display_get_width(), display_get_height())
Code:
if (keyboard_check_pressed(vk_f5)) {
fullscreen_toggle = !fullscreen_toggle;
only_once = true;
}
if (fullscreen_toggle == true) {
window_set_fullscreen(true);
if (only_once == true) { surface_resize(application_surface, display_get_width(), display_get_height()) only_once = false }
}
if (fullscreen_toggle == false) {
window_set_fullscreen(false);
if (only_once == true) { surface_resize(application_surface,960, 540) only_once = false }
}