I like this system, but I'm having trouble getting it to work correctly with gpu_set_scissor(). It doesn't update the scissor region when resizing the window. The same code works when resizing the window without Advanced Resolution Manager. Am I missing something?
Using runtime version 2024.13.1.242, and the target is Windows.
Sorry for the inconvenience. As far I can tell, the issue should be that gpu_set_scissor() works in display pixel coordinates but not in game coordinates. So, when the window resizes, the scissor region doesn’t scale automatically with Advanced Resolution Manager.
A possible workaround, is to scale your scissor coordinates by the ratio between the window size and your game resolution. Calculate scale_x = window_get_width() / global.ideal_width and scale_y = window_get_height() / global.ideal_height, then multiply your scissor x, y, width, and height by these scale factors before passing them to gpu_set_scissor(). This workaround is purely theoretical though because my current schedule doesn’t allow me to write this fix and test it.
I’ll update the script with a proper fix after I ship my current project. Thanks for reporting this and for your patience.
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
I like this system, but I'm having trouble getting it to work correctly with gpu_set_scissor(). It doesn't update the scissor region when resizing the window. The same code works when resizing the window without Advanced Resolution Manager. Am I missing something?
Using runtime version 2024.13.1.242, and the target is Windows.
Sorry for the inconvenience. As far I can tell, the issue should be that gpu_set_scissor() works in display pixel coordinates but not in game coordinates. So, when the window resizes, the scissor region doesn’t scale automatically with Advanced Resolution Manager.
A possible workaround, is to scale your scissor coordinates by the ratio between the window size and your game resolution. Calculate scale_x = window_get_width() / global.ideal_width and scale_y = window_get_height() / global.ideal_height, then multiply your scissor x, y, width, and height by these scale factors before passing them to gpu_set_scissor(). This workaround is purely theoretical though because my current schedule doesn’t allow me to write this fix and test it.
I’ll update the script with a proper fix after I ship my current project. Thanks for reporting this and for your patience.
Will this work with the latest version of GameMaker?
Last version I tested it was IDE 2024.11.0179 and runtime 2024.11.0.227 and I didn’t find any issue.
this works incredible well, this scripts are very useful the help to improve my project a lot, Thank you very much!!
Updated the Portrait example project. It had scale to 1 instead or .5