-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.ARB.ClEvent (
  -- * Extension Support
    gl_ARB_cl_event

  -- * GL_ARB_cl_event
  , glCreateSyncFromCLeventARB
  , pattern GL_SYNC_CL_EVENT_ARB
  , pattern GL_SYNC_CL_EVENT_COMPLETE_ARB
) where

import Control.Monad.IO.Class
import Data.Set
import Foreign.Ptr
import Graphics.GL.Internal.FFI
import Graphics.GL.Internal.Proc
import Graphics.GL.Types
import System.IO.Unsafe

-- | Checks that the <https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/specs/ARB/cl_event.txt GL_ARB_cl_event> extension is available.

gl_ARB_cl_event :: Bool
gl_ARB_cl_event :: Bool
gl_ARB_cl_event = [Char] -> Set [Char] -> Bool
forall a. Ord a => a -> Set a -> Bool
member "GL_ARB_cl_event" Set [Char]
extensions
{-# NOINLINE gl_ARB_cl_event #-}

-- | Usage: @'glCreateSyncFromCLeventARB' context event flags@
--
-- The parameter @context@ is a @cl_context@.
--
-- The parameter @event@ is a @cl_event@.


glCreateSyncFromCLeventARB :: MonadIO m => Ptr () -> Ptr () -> GLbitfield -> m GLsync
glCreateSyncFromCLeventARB :: Ptr () -> Ptr () -> GLbitfield -> m (Ptr ())
glCreateSyncFromCLeventARB = FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ()))
-> Ptr () -> Ptr () -> GLbitfield -> m (Ptr ())
forall (m :: * -> *).
MonadIO m =>
FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ()))
-> Ptr () -> Ptr () -> GLbitfield -> m (Ptr ())
ffiPtrVPtrVbitfieldIOsync FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ()))
glCreateSyncFromCLeventARBFunPtr

glCreateSyncFromCLeventARBFunPtr :: FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO GLsync)
glCreateSyncFromCLeventARBFunPtr :: FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ()))
glCreateSyncFromCLeventARBFunPtr = IO (FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ())))
-> FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ()))
forall a. IO a -> a
unsafePerformIO ([Char]
-> IO (FunPtr (Ptr () -> Ptr () -> GLbitfield -> IO (Ptr ())))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glCreateSyncFromCLeventARB")

{-# NOINLINE glCreateSyncFromCLeventARBFunPtr #-}

pattern $bGL_SYNC_CL_EVENT_ARB :: a
$mGL_SYNC_CL_EVENT_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_SYNC_CL_EVENT_ARB = 0x8240

pattern $bGL_SYNC_CL_EVENT_COMPLETE_ARB :: a
$mGL_SYNC_CL_EVENT_COMPLETE_ARB :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241