module Graphics.Gloss.Internals.Interface.ViewPort.Reshape
(callback_viewPort_reshape)
where
import Graphics.Gloss.Internals.Interface.Callback
import Graphics.Gloss.Internals.Interface.Backend
import Graphics.Rendering.OpenGL (($=))
import qualified Graphics.Rendering.OpenGL.GL as GL
callback_viewPort_reshape :: Callback
callback_viewPort_reshape
= Reshape (viewPort_reshape)
viewPort_reshape :: ReshapeCallback
viewPort_reshape stateRef (width,height)
= do
GL.viewport $= ( GL.Position 0 0
, GL.Size (fromIntegral width) (fromIntegral height))
postRedisplay stateRef