{-# OPTIONS_HADDOCK hide #-}
module Graphics.Rendering.OpenGL.GL.Face (
Face(..), marshalFace, unmarshalFace
) where
import Graphics.GL
data Face =
Front
| Back
| FrontAndBack
deriving ( Eq, Ord, Show )
marshalFace :: Face -> GLenum
marshalFace x = case x of
Front -> GL_FRONT
Back -> GL_BACK
FrontAndBack -> GL_FRONT_AND_BACK
unmarshalFace :: GLenum -> Face
unmarshalFace x
| x == GL_FRONT = Front
| x == GL_BACK = Back
| x == GL_FRONT_AND_BACK = FrontAndBack
| otherwise = error ("unmarshalFace: illegal value " ++ show x)