Created
February 4, 2017 05:27
-
-
Save naoto-ogawa/2788110662f586e7ecbb716c6015ecc2 to your computer and use it in GitHub Desktop.
the smallest GLFW sample
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
import Graphics.UI.G as G | |
main :: IO () | |
main = do | |
G.init | |
G.defaultWindowHints | |
Just win <- G.createWindow 240 480 "the smallest GLFW sample" Nothing Nothing | |
G.makeContextCurrent (Just win) | |
G.showWindow win | |
loop | |
G.destroyWindow win | |
G.terminate | |
loop :: IO () | |
loop = do | |
v <- getLine | |
if (v == "quit") then return () else loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import Graphics.UI.G as G
|
V
import Graphics.UI.GLFW as G