{-# OPTIONS_HADDOCK hide #-}
module Graphics.UI.GLUT.QueryUtils (
Getter, simpleGet, layerGet, deviceGet
) where
import Foreign.C.Types ( CInt )
import Graphics.Rendering.OpenGL ( GLenum )
import Graphics.UI.GLUT.Raw
type PrimGetter = GLenum -> IO CInt
type Getter a = (CInt -> a) -> GLenum -> IO a
makeGetter :: PrimGetter -> Getter a
makeGetter :: PrimGetter -> Getter a
makeGetter PrimGetter
g CInt -> a
f = (CInt -> a) -> IO CInt -> IO a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CInt -> a
f (IO CInt -> IO a) -> PrimGetter -> GLenum -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PrimGetter
g
simpleGet, layerGet, deviceGet :: Getter a
simpleGet :: Getter a
simpleGet = PrimGetter -> Getter a
forall a. PrimGetter -> Getter a
makeGetter PrimGetter
forall (m :: * -> *). MonadIO m => GLenum -> m CInt
glutGet
layerGet :: Getter a
layerGet = PrimGetter -> Getter a
forall a. PrimGetter -> Getter a
makeGetter PrimGetter
forall (m :: * -> *). MonadIO m => GLenum -> m CInt
glutLayerGet
deviceGet :: Getter a
deviceGet = PrimGetter -> Getter a
forall a. PrimGetter -> Getter a
makeGetter PrimGetter
forall (m :: * -> *). MonadIO m => GLenum -> m CInt
glutDeviceGet