2019-01-29 22:55:45 +00:00
|
|
|
module Types where
|
|
|
|
|
2019-02-02 23:57:52 +00:00
|
|
|
import qualified SDL
|
|
|
|
|
2019-02-02 21:45:57 +00:00
|
|
|
import qualified Graphics.Rendering.OpenGL as GL
|
|
|
|
|
|
|
|
import qualified Graphics.GLUtil as GU
|
|
|
|
|
2019-01-30 22:10:00 +00:00
|
|
|
import qualified Data.Text as T
|
|
|
|
|
2019-02-07 14:45:45 +00:00
|
|
|
import Data.Word (Word32)
|
|
|
|
|
2019-01-31 15:01:01 +00:00
|
|
|
import Data.Time.Clock
|
|
|
|
|
2019-01-29 22:55:45 +00:00
|
|
|
data Options = Options
|
2019-01-30 22:10:00 +00:00
|
|
|
{ optFullscreen :: Bool
|
2019-01-29 22:55:45 +00:00
|
|
|
, optFlipScreens :: Bool
|
2019-01-31 13:47:18 +00:00
|
|
|
, optVerbose :: Bool
|
2019-01-30 22:10:00 +00:00
|
|
|
, optFile :: T.Text
|
2019-01-29 22:55:45 +00:00
|
|
|
}
|
|
|
|
deriving (Show)
|
2019-01-31 15:01:01 +00:00
|
|
|
|
|
|
|
data State = State
|
|
|
|
{ stCurrentPage :: Word
|
2019-02-08 15:10:52 +00:00
|
|
|
, stMaxPage :: Word
|
|
|
|
, stAspectRatio :: Double
|
2019-02-04 19:33:45 +00:00
|
|
|
, stFilename :: T.Text
|
2019-01-31 15:01:01 +00:00
|
|
|
, stPresentationWindow :: Word
|
2019-02-07 14:45:45 +00:00
|
|
|
, stStartTime :: Word32
|
|
|
|
, stLastTime :: Word32
|
2019-02-02 23:57:52 +00:00
|
|
|
, stWindows :: [(Word, SDL.Window)]
|
2019-02-03 01:08:37 +00:00
|
|
|
, stProgram :: GU.ShaderProgram
|
2019-02-08 15:10:52 +00:00
|
|
|
, stBO :: GLbo
|
2019-02-02 21:45:57 +00:00
|
|
|
}
|
|
|
|
|
2019-02-08 15:10:52 +00:00
|
|
|
data GLbo = GLbo
|
2019-02-08 08:19:09 +00:00
|
|
|
{ glVBO :: GL.BufferObject
|
|
|
|
, glEBO :: GL.BufferObject
|
2019-02-08 15:10:52 +00:00
|
|
|
, glTBO :: GL.BufferObject
|
2019-02-02 21:45:57 +00:00
|
|
|
}
|