gpu: reset fbo on resizablechanged on macos

Changing resizable mode changes the canvas size but doesn't change the client size, so the existing resize adapter doesn't get triggered
This commit is contained in:
Adam
2022-02-08 13:28:36 -05:00
parent 2d52f6d1b4
commit 2e34cbcbe1

View File

@@ -78,6 +78,7 @@ import net.runelite.api.SceneTilePaint;
import net.runelite.api.Texture;
import net.runelite.api.TextureProvider;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.ResizeableChanged;
import net.runelite.api.hooks.DrawCallbacks;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
@@ -1535,6 +1536,17 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
}
}
@Subscribe
public void onResizeableChanged(ResizeableChanged resizeableChanged)
{
if (OSType.getOSType() == OSType.MacOS)
{
// switching resizable mode adjusts the canvas size, without adjusting
// the client size. queue the GLFBODrawable resize for later.
needsReset = 5;
}
}
private void uploadScene()
{
vertexBuffer.clear();