Logo Mibo

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

DeviceConfig

Full Usage: DeviceConfig

Field type: (Game * GraphicsDeviceManager -> unit) list

Device-level configuration callbacks invoked in the AdaptiveMonoGameGame constructor, after the Core AdaptiveProgram callbacks and before Initialize/GraphicsDevice creation.

Field type: (Game * GraphicsDeviceManager -> unit) list

Program

Full Usage: Program

Field type: AdaptiveProgram<'Frame>

The backend-neutral adaptive program.

Field type: AdaptiveProgram<'Frame>

Type something to start searching.