Advertisement
Guest User

Haskell GL

a guest
Apr 11th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import qualified Graphics.UI.GLFW as G
  2. import qualified Control.Concurrent as C
  3. import Graphics.Rendering.OpenGL
  4.  
  5. main :: IO ()
  6. main  = do
  7.     i <- G.init
  8.     w  <- G.createWindow 640 480 "HGL" Nothing Nothing
  9.     case w of
  10.         (Just win) -> do
  11.               G.makeContextCurrent w
  12.               clear [ColorBuffer]
  13.               C.threadDelay 7000000
  14.               G.destroyWindow win
  15.         Nothing -> return ()
  16.     G.terminate
  17.     return ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement