Last active
December 22, 2015 20:59
-
-
Save 7sharp9/6529782 to your computer and use it in GitHub Desktop.
An Blank screen Xna App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BasicExample | |
open Microsoft.Xna.Framework | |
type Basic() as x = | |
inherit Game() | |
let graphics = new GraphicsDeviceManager(x) | |
override x.Draw (gameTime) = x.GraphicsDevice.Clear(Color.CornflowerBlue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Basic | |
open MonoMac.AppKit | |
open MonoMac.Foundation | |
type AppDelegate() = | |
inherit NSApplicationDelegate() | |
override x.FinishedLaunching(notification) = let game = new Basic() in game.Run() | |
override x.ApplicationShouldTerminateAfterLastWindowClosed(sender) = true | |
module main = | |
[<EntryPoint>] | |
let main args = | |
NSApplication.Init () | |
using (new NSAutoreleasePool()) (fun n -> NSApplication.SharedApplication.Delegate <- new AppDelegate() | |
NSApplication.Main(args)) | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment