module Graphics.Gloss.Render
( render
, renderAction
, renderPicture
, RS.stateInit)
where
import qualified Graphics.Rendering.OpenGL as GL
import Graphics.Gloss.Internals.Render.Common
import Graphics.Gloss.Internals.Render.Picture
import Graphics.Gloss.Internals.Color
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import qualified Graphics.Gloss.Internals.Render.State as RS
import System.Mem (performGC)
render :: RS.State
-> (Int, Int)
-> Color
-> Picture
-> IO ()
render renderS windowSize clearColor picture
= do
let viewPort = viewPortInit
GL.depthFunc GL.$= Just GL.Always
GL.clearColor GL.$= glColor4OfColor clearColor
GL.clear [GL.ColorBuffer, GL.DepthBuffer]
GL.color $ GL.Color4 0 0 0 (1 :: GL.GLfloat)
renderAction
windowSize
(renderPicture renderS viewPort picture)
performGC