new world via teleporter wip

This commit is contained in:
minjaesong
2023-07-02 18:54:04 +09:00
parent afb7dff5d2
commit 9c396e7b8d
7 changed files with 136 additions and 15 deletions

View File

@@ -640,7 +640,6 @@ public class App implements ApplicationListener {
// process screenshot request
if (screenshotRequested) {
FrameBufferManager.begin(postProcessorOutFBO);
screenshotRequested = false;
try {
Pixmap p = Pixmap.createFromFrameBuffer(0, 0, scr.getWidth(), scr.getHeight());
PixmapIO.writePNG(Gdx.files.absolute(defaultDir+"/Screenshot-"+String.valueOf(System.currentTimeMillis())+".png"), p, 9, true);
@@ -652,6 +651,7 @@ public class App implements ApplicationListener {
Terrarum.INSTANCE.getIngame().sendNotification("Failed to take screenshot: "+e.getMessage());
}
FrameBufferManager.end();
screenshotRequested = false;
}