    {-# OPTIONS_HADDOCK hide #-}
    --------------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferTarget
    -- Copyright   :  (c) Sven Panne 2013-2019
    -- License     :  BSD3
    --
    -- Maintainer  :  Sven Panne <svenpanne@gmail.com>
    -- Stability   :  stable
    -- Portability :  portable
    --
    -- This is a purely internal module for marshaling FramebufferTargets.
    --
    --------------------------------------------------------------------------------

    module Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferTarget (
       FramebufferTarget(..), marshalFramebufferTarget
    ) where

    import Graphics.GL

    --------------------------------------------------------------------------------

    data FramebufferTarget =
         DrawFramebuffer
       | ReadFramebuffer
       | Framebuffer
       deriving ( FramebufferTarget -> FramebufferTarget -> Bool
    (FramebufferTarget -> FramebufferTarget -> Bool)
    -> (FramebufferTarget -> FramebufferTarget -> Bool)
    -> Eq FramebufferTarget
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: FramebufferTarget -> FramebufferTarget -> Bool
    == :: FramebufferTarget -> FramebufferTarget -> Bool
    $c/= :: FramebufferTarget -> FramebufferTarget -> Bool
    /= :: FramebufferTarget -> FramebufferTarget -> Bool
    Eq, Eq FramebufferTarget
    Eq FramebufferTarget =>
    (FramebufferTarget -> FramebufferTarget -> Ordering)
    -> (FramebufferTarget -> FramebufferTarget -> Bool)
    -> (FramebufferTarget -> FramebufferTarget -> Bool)
    -> (FramebufferTarget -> FramebufferTarget -> Bool)
    -> (FramebufferTarget -> FramebufferTarget -> Bool)
    -> (FramebufferTarget -> FramebufferTarget -> FramebufferTarget)
    -> (FramebufferTarget -> FramebufferTarget -> FramebufferTarget)
    -> Ord FramebufferTarget
    FramebufferTarget -> FramebufferTarget -> Bool
    FramebufferTarget -> FramebufferTarget -> Ordering
    FramebufferTarget -> FramebufferTarget -> FramebufferTarget
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: FramebufferTarget -> FramebufferTarget -> Ordering
    compare :: FramebufferTarget -> FramebufferTarget -> Ordering
    $c< :: FramebufferTarget -> FramebufferTarget -> Bool
    < :: FramebufferTarget -> FramebufferTarget -> Bool
    $c<= :: FramebufferTarget -> FramebufferTarget -> Bool
    <= :: FramebufferTarget -> FramebufferTarget -> Bool
    $c> :: FramebufferTarget -> FramebufferTarget -> Bool
    > :: FramebufferTarget -> FramebufferTarget -> Bool
    $c>= :: FramebufferTarget -> FramebufferTarget -> Bool
    >= :: FramebufferTarget -> FramebufferTarget -> Bool
    $cmax :: FramebufferTarget -> FramebufferTarget -> FramebufferTarget
    max :: FramebufferTarget -> FramebufferTarget -> FramebufferTarget
    $cmin :: FramebufferTarget -> FramebufferTarget -> FramebufferTarget
    min :: FramebufferTarget -> FramebufferTarget -> FramebufferTarget
    Ord, Int -> FramebufferTarget -> ShowS
    [FramebufferTarget] -> ShowS
    FramebufferTarget -> String
    (Int -> FramebufferTarget -> ShowS)
    -> (FramebufferTarget -> String)
    -> ([FramebufferTarget] -> ShowS)
    -> Show FramebufferTarget
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> FramebufferTarget -> ShowS
    showsPrec :: Int -> FramebufferTarget -> ShowS
    $cshow :: FramebufferTarget -> String
    show :: FramebufferTarget -> String
    $cshowList :: [FramebufferTarget] -> ShowS
    showList :: [FramebufferTarget] -> ShowS
    Show )

    marshalFramebufferTarget :: FramebufferTarget -> GLenum
    marshalFramebufferTarget :: FramebufferTarget -> GLenum
    marshalFramebufferTarget FramebufferTarget
    xs = case FramebufferTarget
    xs of
       FramebufferTarget
    DrawFramebuffer -> GLenum
    GL_DRAW_FRAMEBUFFER
       FramebufferTarget
    ReadFramebuffer -> GLenum
    GL_READ_FRAMEBUFFER
       FramebufferTarget
    Framebuffer -> GLenum
    GL_FRAMEBUFFER