Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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
Owner

naoto-ogawa commented Feb 4, 2017

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