YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
15 stars 7 forks source link

Global permission to use `draw_flush` with `gpu_get/set_scissor` without asking GameMaker Support staff each time. #6523

Closed gnysek closed 1 day ago

gnysek commented 3 days ago

Is your feature request related to a problem?

Manual page for draw_flush says:

This is a debug-only function and in general it should not be used unless indicated by a member of the GameMaker Support staff, as indiscriminate use will cause serious performance issues with your game.

However, since introduction of gpu_get_scissors and gpu_set_scissors in 2024.8, this function is required to make it work, like in below example:

    var _s = gpu_get_scissor();
    gpu_set_scissor(50, 50, 50, 50);

        draw_sprite(spr_0, 0, 0,0);
        draw_flush(); // <-- it's here

    gpu_set_scissor(_s);

Purpose of this feature request is that we don't need to ask GameMaker Support staff every time we want to use draw_flush() with gpu_get/set_scissor, as that could overfill helpdesk with requests.

Describe the solution you'd like

Allowing to use draw_flush() without being indicated by GameMaker Support staff seems sufficient.

Describe alternatives you've considered

No response

Additional context

Description in manual was so funny, that I couldn't resist making equally serious Feature Request. Don't take this too serious, but some rewording by manual team might be a good idea ;)

YYDan commented 3 days ago

Lol, yeah....... A funny one to discuss tomorrow ;)

gnysek commented 3 days ago

Also, since it's bad for performance, Russell already started to think about a way in which it could be removed from above code (and gpu_set_scissor would call what's needed under the hood), so - this goes in a good way!

rwkay commented 1 day ago

Fixed in 2024.8 - gpu_set_scissor now implicitly calls draw_flush - so you do not need to anymore.

We should leave the documentation as it is.