Skip to content

Instantly share code, notes, and snippets.

@wmeister-old
Created July 22, 2011 04:07
Show Gist options
  • Save wmeister-old/1098864 to your computer and use it in GitHub Desktop.
Save wmeister-old/1098864 to your computer and use it in GitHub Desktop.
importClass Packages.org.lwjgl.LWJGLException
importClass Packages.org.lwjgl.opengl.Display
importClass Packages.org.lwjgl.opengl.DisplayMode
importClass java.lang.System
setup = ->
try
Display.setDisplayMode new DisplayMode(800, 600)
Display.create()
catch error
error.printStackTrace()
System.exit(0)
shutdown = ->
Display.destroy()
System.exit(0)
doOneLoop = ->
# render stuff here
Display.update()
main = ->
setup()
doOneLoop() until Display.isCloseRequested()
shutdown()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment