-- This file was automatically generated.
{-# LANGUAGE CPP, ScopedTypeVariables, PatternSynonyms #-}
module Graphics.GL.Ext.INTEL.MapTexture (
  -- * Extension Support
    gl_INTEL_map_texture

  -- * GL_INTEL_map_texture
  , glMapTexture2DINTEL
  , glSyncTextureINTEL
  , glUnmapTexture2DINTEL
  , pattern GL_LAYOUT_DEFAULT_INTEL
  , pattern GL_LAYOUT_LINEAR_CPU_CACHED_INTEL
  , pattern GL_LAYOUT_LINEAR_INTEL
  , pattern GL_TEXTURE_MEMORY_LAYOUT_INTEL
) 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/INTEL/map_texture.txt GL_INTEL_map_texture> extension is available.

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

-- | Usage: @'glMapTexture2DINTEL' texture level access stride layout@
--
-- The length of @stride@ should be @1@.
--
-- The length of @layout@ should be @1@.


glMapTexture2DINTEL :: MonadIO m => GLuint -> GLint -> GLbitfield -> Ptr GLint -> Ptr GLenum -> m (Ptr ())
glMapTexture2DINTEL :: GLuint -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> m (Ptr ())
glMapTexture2DINTEL = FunPtr
  (GLuint
   -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ()))
-> GLuint
-> GLint
-> GLuint
-> Ptr GLint
-> Ptr GLuint
-> m (Ptr ())
forall (m :: * -> *).
MonadIO m =>
FunPtr
  (GLuint
   -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ()))
-> GLuint
-> GLint
-> GLuint
-> Ptr GLint
-> Ptr GLuint
-> m (Ptr ())
ffiuintintbitfieldPtrintPtrenumIOPtrV FunPtr
  (GLuint
   -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ()))
glMapTexture2DINTELFunPtr

glMapTexture2DINTELFunPtr :: FunPtr (GLuint -> GLint -> GLbitfield -> Ptr GLint -> Ptr GLenum -> IO (Ptr ()))
glMapTexture2DINTELFunPtr :: FunPtr
  (GLuint
   -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ()))
glMapTexture2DINTELFunPtr = IO
  (FunPtr
     (GLuint
      -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ())))
-> FunPtr
     (GLuint
      -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ()))
forall a. IO a -> a
unsafePerformIO ([Char]
-> IO
     (FunPtr
        (GLuint
         -> GLint -> GLuint -> Ptr GLint -> Ptr GLuint -> IO (Ptr ())))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glMapTexture2DINTEL")

{-# NOINLINE glMapTexture2DINTELFunPtr #-}

-- | Usage: @'glSyncTextureINTEL' texture@


glSyncTextureINTEL :: MonadIO m => GLuint -> m ()
glSyncTextureINTEL :: GLuint -> m ()
glSyncTextureINTEL = FunPtr (GLuint -> IO ()) -> GLuint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> IO ()) -> GLuint -> m ()
ffiuintIOV FunPtr (GLuint -> IO ())
glSyncTextureINTELFunPtr

glSyncTextureINTELFunPtr :: FunPtr (GLuint -> IO ())
glSyncTextureINTELFunPtr :: FunPtr (GLuint -> IO ())
glSyncTextureINTELFunPtr = IO (FunPtr (GLuint -> IO ())) -> FunPtr (GLuint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glSyncTextureINTEL")

{-# NOINLINE glSyncTextureINTELFunPtr #-}

-- | Usage: @'glUnmapTexture2DINTEL' texture level@


glUnmapTexture2DINTEL :: MonadIO m => GLuint -> GLint -> m ()
glUnmapTexture2DINTEL :: GLuint -> GLint -> m ()
glUnmapTexture2DINTEL = FunPtr (GLuint -> GLint -> IO ()) -> GLuint -> GLint -> m ()
forall (m :: * -> *).
MonadIO m =>
FunPtr (GLuint -> GLint -> IO ()) -> GLuint -> GLint -> m ()
ffiuintintIOV FunPtr (GLuint -> GLint -> IO ())
glUnmapTexture2DINTELFunPtr

glUnmapTexture2DINTELFunPtr :: FunPtr (GLuint -> GLint -> IO ())
glUnmapTexture2DINTELFunPtr :: FunPtr (GLuint -> GLint -> IO ())
glUnmapTexture2DINTELFunPtr = IO (FunPtr (GLuint -> GLint -> IO ()))
-> FunPtr (GLuint -> GLint -> IO ())
forall a. IO a -> a
unsafePerformIO ([Char] -> IO (FunPtr (GLuint -> GLint -> IO ()))
forall a. [Char] -> IO (FunPtr a)
getProcAddress "glUnmapTexture2DINTEL")

{-# NOINLINE glUnmapTexture2DINTELFunPtr #-}

pattern $bGL_LAYOUT_DEFAULT_INTEL :: a
$mGL_LAYOUT_DEFAULT_INTEL :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_LAYOUT_DEFAULT_INTEL = 0

pattern $bGL_LAYOUT_LINEAR_CPU_CACHED_INTEL :: a
$mGL_LAYOUT_LINEAR_CPU_CACHED_INTEL :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2

pattern $bGL_LAYOUT_LINEAR_INTEL :: a
$mGL_LAYOUT_LINEAR_INTEL :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_LAYOUT_LINEAR_INTEL = 1

pattern $bGL_TEXTURE_MEMORY_LAYOUT_INTEL :: a
$mGL_TEXTURE_MEMORY_LAYOUT_INTEL :: forall r a. (Eq a, Num a) => a -> (Void# -> r) -> (Void# -> r) -> r
GL_TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF