Adding an overlay with a transform can cause hardware rendering to disable, presumably if these are rendered in a KEEP_TOGETHER group, when the map size is then altered.
Numbered Steps to Reproduce Problem:
1. Have a complicated enough rendering setup where hardware rendering is required.
2. Add an overlay with a transform, visible to the user.
3. Change the view-size of the map window, by full screening or some other method.
4. Hardware rendering will fail.
Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/minimal_repro()
var/image/I = image('icons/obj/items/weapons/projectiles.dmi', usr, "plasma", FLOAT_LAYER)
var/matrix/rotate = matrix()
rotate.Turn(50 * 5)
I.transform = rotate
usr.overlays += I
sleep(5)
winset(usr.client, "mainwindow", "is-fullscreen=true")
I apologise for not having a more minimal test case, but the testcase provided here (150mb~ download) will reproduce the issue consistently, following these steps:
1. Open the .dme in DreamMaker on 516.1652
2. Compile + Run (trusted is not required)
3. Allow the game to boot, you will spawn as a character
4. Use the "minimal-repro" verb in the input in the bottom right (the code being executed is identical to the snippet above).
5. Observe how the overlay appears, and fullscreen is toggled. This will disable hardware rendering (resulting in the map disappearing behind the blackness, and the overlays on the HUD becoming malformed). You can use F5 to toggle into being a ghost, to see the various rendering issues and the decreased FPS.
6. Under the "Preferences" tab in the top right, "Toggle-Fullscreen-Preference" can be used to close full screen, and Options & Messages can be used to disable and re-enable hardware rendering.
If a more minimal test case is required, please let me know - I am not too familiar with the SS13 rendering stack, but I can dig in to reproduce this if necessary.
(Removing the rustg binary was helped by https://gist.github.com/Absolucy/ b933fad25eb02a3a81fb0e22b92d5ac9 by absolucy)
Expected Results:
Hardware rendering does not fail.
Actual Results:
It does.
Does the problem occur:
Every time? Or how often? Yes
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
Versions below 1652.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Versions below 1652.
Workarounds:
None.