{-# LINE 1 "src/NanoVG/Internal/GL3.chs" #-}
module NanoVG.Internal.GL3 where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import qualified Data.Set as S
import Data.Word
import Foreign.C.Types
import NanoVG.Internal.CreateContext
import NanoVG.Internal.Types
import NanoVG.Internal.Context
import NanoVG.Internal.FFIHelpers
createGL3 :: (S.Set CreateFlags) -> IO ((Context))
createGL3 a1 =
let {a1' = bitMask a1} in
createGL3'_ a1' >>= \res ->
let {res' = fromPointer res} in
return (res')
{-# LINE 25 "src/NanoVG/Internal/GL3.chs" #-}
deleteGL3 :: (Context) -> IO ((Context))
deleteGL3 a1 =
let {a1' = toPointer a1} in
deleteGL3'_ a1' >>
let {a1'' = fromPointer a1'} in
return (a1'')
{-# LINE 27 "src/NanoVG/Internal/GL3.chs" #-}
createImageFromHandleGL3 :: (Context) -> (GLuint) -> (CInt) -> (CInt) -> (CreateFlags) -> IO ((Image), (Context), (CreateFlags))
createImageFromHandleGL3 a1 a2 a3 a4 a5 =
let {a1' = toPointer a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = toCInt a5} in
createImageFromHandleGL3'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = Image res} in
let {a1'' = fromPointer a1'} in
let {a5'' = fromCInt a5'} in
return (res', a1'', a5'')
{-# LINE 35 "src/NanoVG/Internal/GL3.chs" #-}
imageHandleGL3 :: (Context) -> (Image) -> IO ((GLuint), (Context))
imageHandleGL3 a1 a2 =
let {a1' = toPointer a1} in
let {a2' = imageHandle a2} in
imageHandleGL3'_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
let {a1'' = fromPointer a1'} in
return (res', a1'')
{-# LINE 40 "src/NanoVG/Internal/GL3.chs" #-}
foreign import ccall unsafe "NanoVG/Internal/GL3.chs.h nvgCreateGL3"
createGL3'_ :: (C2HSImp.CInt -> (IO (C2HSImp.Ptr ())))
foreign import ccall unsafe "NanoVG/Internal/GL3.chs.h nvgDeleteGL3"
deleteGL3'_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall unsafe "NanoVG/Internal/GL3.chs.h nvglCreateImageFromHandleGL3"
createImageFromHandleGL3'_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))))
foreign import ccall unsafe "NanoVG/Internal/GL3.chs.h nvglImageHandleGL3"
imageHandleGL3'_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CUInt)))