AdaptiveMonoGameProgram<'Frame> Type
MonoGame-specific wrapper around an AdaptiveProgram, carrying device-level configuration that the backend-neutral type cannot hold.
Build one with AdaptiveMonoGameProgram.ofProgram, add MonoGame-specific configuration with AdaptiveMonoGameProgram.withConfig, then pass the result to AdaptiveMonoGameGame.
Example
let program =
AdaptiveProgram.mkProgram init update
|> AdaptiveProgram.withConfig(fun cfg ->
{ cfg with Width = 1280; Height = 720; Title = "My Game" })
let mgProgram =
program
|> AdaptiveMonoGameProgram.ofProgram
|> AdaptiveMonoGameProgram.withConfig(fun (game, graphics) ->
graphics.SynchronizeWithVerticalRetrace <- false)
use game = new AdaptiveMonoGameGame<_>(mgProgram)
game.Run()
val program: obj
val mgProgram: obj
val game: obj
Record fields
| Record Field |
Description
|
|
Device-level configuration callbacks invoked in the
AdaptiveMonoGameGame constructor, after the
Core AdaptiveProgram callbacks and
before
|
|
The backend-neutral adaptive program.
|
Mibo