Skip to content

Instantly share code, notes, and snippets.

@naoto-ogawa
Created February 4, 2017 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naoto-ogawa/2788110662f586e7ecbb716c6015ecc2 to your computer and use it in GitHub Desktop.
Save naoto-ogawa/2788110662f586e7ecbb716c6015ecc2 to your computer and use it in GitHub Desktop.
the smallest GLFW sample
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
@naoto-ogawa
Copy link
Author

import Graphics.UI.G as G
|
V
import Graphics.UI.GLFW as G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment