module Display (display) where import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import Data.IORef import States import Stones import qualified Data.Map as Map display :: (IORef MState) -> (IORef TexObjGrp) -> IO() display mst tObGp = do clearColor $= (Color4 0.4 0.5 0.5 1.0) clear [ColorBuffer] shadeModel $= Smooth --loadIdentity mst' <- readIORef mst tObGp' <- readIORef tObGp dboardSet mst' tObGp' 0 mapM_ (dstoneSet mst' tObGp') (Map.keys (gBoardCells mst')) eventFrame mst' swapBuffers