magnified screen will display everything correctly scaled (but some buttons wont work for some reason)

This commit is contained in:
minjaesong
2022-08-10 00:04:26 +09:00
parent 6e0f9a5924
commit f4d8d72715
8 changed files with 171 additions and 110 deletions

View File

@@ -11,7 +11,8 @@ import com.badlogic.gdx.utils.Disposable
import com.badlogic.gdx.utils.GdxRuntimeException
import net.torvald.random.HQRNG
import net.torvald.terrarum.*
import net.torvald.terrarum.App.measureDebugTime
import net.torvald.terrarum.App.*
import net.torvald.terrarum.Terrarum.ingame
import net.torvald.terrarum.TerrarumAppConfiguration.TILE_SIZE
import net.torvald.terrarum.TerrarumAppConfiguration.TILE_SIZEF
import net.torvald.terrarum.gameactors.ActorWithBody
@@ -28,6 +29,9 @@ import net.torvald.terrarum.worlddrawer.WorldCamera
import net.torvald.util.CircularArray
import kotlin.system.exitProcess
/**
* This will be rendered to a postprocessor FBO.
*
@@ -409,6 +413,10 @@ object IngameRenderer : Disposable {
blendNormal(batch)
}
/**
* This "screencap" will capture the game WITHOUT gui and postprocessors!
* To capture the entire game, use [App.requestScreenshot]
*/
@Volatile internal var screencapRequested = false
@Volatile internal var fboRGBexportedLatch = false
@Volatile internal var screencapExportCallback: (FrameBuffer) -> Unit = {}