Safe Haskell | Unsafe |
---|---|
Language | Haskell2010 |
- type EGL a = IO (Either EGLError a)
- data EGLError
- eglGetError :: IO EGLError
- data EGLConfAttr
- = EGLBufferSize
- | EGLAlphaSize
- | EGLBlueSize
- | EGLGreenSize
- | EGLRedSize
- | EGLDepthSize
- | EGLStencilSize
- | EGLConfigCaveat
- | EGLConfigID
- | EGLLevel
- | EGLMaxPbufferHeight
- | EGLMaxPbufferPixels
- | EGLMaxPbufferWidth
- | EGLNativeRenderable
- | EGLNativeVisualID
- | EGLNativeVisualType
- | EGLSamples
- | EGLSampleBuffers
- | EGLSurfaceType
- | EGLTransparentType
- | EGLTransparentBlueValue
- | EGLTransparentGreenValue
- | EGLTransparentRedValue
- | EGLBindToTextureRGB
- | EGLBindToTextureRGBA
- | EGLMinSwapInterval
- | EGLMaxSwapInterval
- | EGLLuminanceSize
- | EGLAlphaMaskSize
- | EGLColorBufferType
- | EGLRenderableType
- | EGLMatchNativePixmap
- | EGLConformant
- egl_true :: Int
- egl_false :: Int
- egl_none :: Int
- egl_slow_config :: Int
- egl_non_conformant_config :: Int
- egl_transparent_rgb :: Int
- egl_rgb_buffer :: Int
- egl_luminance_buffer :: Int
- egl_opengl_es_bit :: Int
- egl_openvg_bit :: Int
- egl_opengl_es2_bit :: Int
- egl_opengl_bit :: Int
- data EGLSurfAttr
- toEglErr :: IO EGLBoolean -> IO EGLError
- checkErr :: IO a -> (a -> Bool) -> (a -> IO (Either EGLError b)) -> IO (Either EGLError b)
- checkPtr :: IO (Ptr a) -> (Ptr a -> s) -> IO (Either EGLError s)
- checkBool :: IO EGLBoolean -> IO a -> IO (Either EGLError a)
- isTrue :: EGLBoolean -> Bool
- withAttrList :: Enum a => [(a, Int)] -> (Ptr Int -> IO b) -> IO b
- eglGetDefaultDisplay :: IO EGLDisplay
- eglGetDisplay :: EGLNativeDisplay a => a -> IO EGLDisplay
- eglInitialize :: EGLDisplay -> EGL (Int, Int)
- eglTerminate :: EGLDisplay -> IO EGLError
- eglVendor :: EGLDisplay -> IO String
- eglVersion :: EGLDisplay -> IO String
- eglExtensions :: EGLDisplay -> IO [String]
- eglClientAPIs :: EGLDisplay -> IO [String]
- eglQueryString :: EGLDisplay -> Int -> EGL String
- eglReleaseThread :: IO EGLError
- eglGetConfigs :: EGLDisplay -> EGL [EGLConfig]
- eglChooseConfig :: EGLDisplay -> [(EGLConfAttr, Int)] -> EGL [EGLConfig]
- eglGetConfigAttrib :: EGLDisplay -> EGLConfig -> EGLConfAttr -> EGL Int
- eglCreateWindowSurface :: EGLNativeWindow a => EGLDisplay -> EGLConfig -> a -> [(EGLSurfAttr, Int)] -> EGL EGLSurface
- eglCreatePbufferSurface :: EGLDisplay -> EGLConfig -> [(EGLSurfAttr, Int)] -> EGL EGLSurface
- eglCreatePbufferFromClientBuffer :: EGLDisplay -> EGLenum -> EGLClientBuffer -> EGLConfig -> [(EGLSurfAttr, Int)] -> EGL EGLSurface
- eglDestroySurface :: EGLDisplay -> EGLSurface -> IO EGLError
- eglCreatePixmapSurface :: EGLNativePixmap a => EGLDisplay -> EGLConfig -> a -> [(EGLSurfAttr, Int)] -> EGL EGLSurface
- eglSurfaceAttrib :: EGLDisplay -> EGLSurface -> EGLSurfAttr -> Int -> IO EGLError
- eglQuerySurface :: EGLDisplay -> EGLSurface -> EGLSurfAttr -> EGL Int
- data EGLBindAPIValue
- eglBindAPI :: EGLBindAPIValue -> IO EGLError
- eglQueryAPI :: IO EGLBindAPIValue
- data EGLContextAttr = EGLContextClientVersion
- eglCreateContext :: EGLDisplay -> EGLConfig -> [(EGLContextAttr, Int)] -> EGL EGLContext
- eglCreateContextWithShareContext :: EGLDisplay -> EGLConfig -> EGLContext -> [(EGLContextAttr, Int)] -> EGL EGLContext
- eglDestroyContext :: EGLDisplay -> EGLContext -> IO EGLError
- eglMakeCurrent :: EGLDisplay -> EGLSurface -> EGLSurface -> EGLContext -> IO EGLError
- eglReleaseCurrent :: EGLDisplay -> IO EGLError
- eglGetCurrentContext :: EGL EGLContext
- data EGLReadDraw
- eglGetCurrentSurface :: EGLReadDraw -> EGL EGLSurface
- eglGetCurrentDisplay :: EGL EGLDisplay
- eglConfigID :: EGLDisplay -> EGLContext -> EGL Int
- eglContextClientType :: EGLDisplay -> EGLContext -> EGL Int
- eglContextClientVersion :: EGLDisplay -> EGLContext -> EGL Int
- eglRenderBuffer :: EGLDisplay -> EGLContext -> EGL Int
- eglQueryContext :: EGLDisplay -> EGLContext -> Int -> EGL Int
- eglWaitClient :: IO EGLError
- data EGLWaitEngine = EGLCoreNativeEngine
- eglWaitNative :: EGLWaitEngine -> IO EGLError
- eglSwapBuffers :: EGLDisplay -> EGLSurface -> IO EGLError
- eglCopyBuffers :: EGLNativePixmap a => EGLDisplay -> EGLSurface -> a -> IO EGLError
- eglSwapInterval :: EGLDisplay -> Int -> IO EGLError
- data EGLBuffer
- eglBindTexImage :: EGLDisplay -> EGLSurface -> EGLBuffer -> IO EGLError
- eglReleaseTexImage :: EGLDisplay -> EGLSurface -> EGLBuffer -> IO EGLError
- eglGetProcAddress :: String -> FunPtr a
- inlinePerformIO :: IO a -> a
- withCurrent :: (EGLError -> IO a) -> (EGLDisplay -> EGLContext -> EGLSurface -> EGLSurface -> IO a) -> IO a
- type EGLNativeWindowType = Ptr ()
- type EGLNativePixmapType = Ptr ()
- type EGLNativeDisplayType = Ptr ()
- class EGLNativeWindow a where
- getNativeWindow :: a -> EGLNativeWindowType
- class EGLNativePixmap a where
- getNativePixmap :: a -> EGLNativePixmapType
- class EGLNativeDisplay a where
- getNativeDisplay :: a -> EGLNativeDisplayType
- type EGLint = Int
- type EGLBoolean = Int
- type EGLenum = Int
- type EGLConfig_ = Ptr ()
- type EGLContext_ = Ptr ()
- type EGLDisplay_ = Ptr ()
- type EGLSurface_ = Ptr ()
- type EGLClientBuffer_ = Ptr ()
- newtype EGLConfig = EGLConfig {
- unC :: EGLConfig_
- newtype EGLContext = EGLContext {
- unX :: EGLContext_
- newtype EGLDisplay = EGLDisplay {
- unD :: EGLDisplay_
- newtype EGLSurface = EGLSurface {
- unS :: EGLSurface_
- newtype EGLClientBuffer = EGLClientBuffer {}
- c_eglGetError :: IO EGLint
- c_eglGetDisplay :: EGLNativeDisplayType -> IO EGLDisplay_
- c_eglInitialize :: EGLDisplay_ -> Ptr EGLint -> Ptr EGLint -> IO EGLBoolean
- c_eglTerminate :: EGLDisplay_ -> IO EGLBoolean
- c_eglQueryString :: EGLDisplay_ -> EGLint -> IO CString
- c_eglGetConfigs :: EGLDisplay_ -> Ptr EGLConfig_ -> EGLint -> Ptr EGLint -> IO EGLBoolean
- c_eglChooseConfig :: EGLDisplay_ -> Ptr EGLint -> Ptr EGLConfig_ -> EGLint -> Ptr EGLint -> IO EGLBoolean
- c_eglGetConfigAttrib :: EGLDisplay_ -> EGLConfig_ -> EGLint -> Ptr EGLint -> IO EGLBoolean
- c_eglCreateWindowSurface :: EGLDisplay_ -> EGLConfig_ -> EGLNativeWindowType -> Ptr EGLint -> IO EGLSurface_
- c_eglCreatePbufferSurface :: EGLDisplay_ -> EGLConfig_ -> Ptr EGLint -> IO EGLSurface_
- c_eglCreatePixmapSurface :: EGLDisplay_ -> EGLConfig_ -> EGLNativePixmapType -> Ptr EGLint -> IO EGLSurface_
- c_eglDestroySurface :: EGLDisplay_ -> EGLSurface_ -> IO EGLBoolean
- c_eglQuerySurface :: EGLDisplay_ -> EGLSurface_ -> EGLint -> Ptr EGLint -> IO EGLBoolean
- c_eglBindAPI :: EGLenum -> IO EGLBoolean
- c_eglQueryAPI :: IO EGLenum
- c_eglWaitClient :: IO EGLBoolean
- c_eglReleaseThread :: IO EGLBoolean
- c_eglCreatePbufferFromClientBuffer :: EGLDisplay_ -> EGLenum -> EGLClientBuffer_ -> EGLConfig_ -> Ptr EGLint -> IO EGLSurface_
- c_eglSurfaceAttrib :: EGLDisplay_ -> EGLSurface_ -> EGLint -> EGLint -> IO EGLBoolean
- c_eglBindTexImage :: EGLDisplay_ -> EGLSurface_ -> EGLint -> IO EGLBoolean
- c_eglReleaseTexImage :: EGLDisplay_ -> EGLSurface_ -> EGLint -> IO EGLBoolean
- c_eglSwapInterval :: EGLDisplay_ -> EGLint -> IO EGLBoolean
- c_eglCreateContext :: EGLDisplay_ -> EGLConfig_ -> EGLContext_ -> Ptr EGLint -> IO EGLContext_
- c_eglDestroyContext :: EGLDisplay_ -> EGLContext_ -> IO EGLBoolean
- c_eglMakeCurrent :: EGLDisplay_ -> EGLSurface_ -> EGLSurface_ -> EGLContext_ -> IO EGLBoolean
- c_eglGetCurrentContext :: IO EGLContext_
- c_eglGetCurrentSurface :: EGLint -> IO EGLSurface_
- c_eglGetCurrentDisplay :: IO EGLDisplay_
- c_eglQueryContext :: EGLDisplay_ -> EGLContext_ -> EGLint -> Ptr EGLint -> IO EGLBoolean
- c_eglWaitNative :: EGLint -> IO EGLBoolean
- c_eglSwapBuffers :: EGLDisplay_ -> EGLSurface_ -> IO EGLBoolean
- c_eglCopyBuffers :: EGLDisplay_ -> EGLSurface_ -> EGLNativePixmapType -> IO EGLBoolean
- c_eglGetProcAddress :: CString -> IO (FunPtr a)
Documentation
Errors
Attribute Lists
data EGLConfAttr Source
egl_transparent_rgb :: Int Source
EGL_TRANSPARENT_TYPE value EGL_NONE | 0x3052
EGL_COLOR_BUFFER_TYPE value 0x308E | 0x308F
egl_opengl_es_bit :: Int Source
EGL_RENDERABLE_TYPE bitmask
data EGLSurfAttr Source
isTrue :: EGLBoolean -> Bool Source
Initialization & Terminating
eglGetDisplay :: EGLNativeDisplay a => a -> IO EGLDisplay Source
:: EGLDisplay | |
-> EGL (Int, Int) | EGL (major, minor) version |
eglTerminate :: EGLDisplay -> IO EGLError Source
eglVendor :: EGLDisplay -> IO String Source
eglVersion :: EGLDisplay -> IO String Source
eglExtensions :: EGLDisplay -> IO [String] Source
eglClientAPIs :: EGLDisplay -> IO [String] Source
eglQueryString :: EGLDisplay -> Int -> EGL String Source
Configuration Management
eglGetConfigs :: EGLDisplay -> EGL [EGLConfig] Source
eglChooseConfig :: EGLDisplay -> [(EGLConfAttr, Int)] -> EGL [EGLConfig] Source
eglGetConfigAttrib :: EGLDisplay -> EGLConfig -> EGLConfAttr -> EGL Int Source
Rendering Surfaces
eglCreateWindowSurface :: EGLNativeWindow a => EGLDisplay -> EGLConfig -> a -> [(EGLSurfAttr, Int)] -> EGL EGLSurface Source
eglCreatePbufferSurface :: EGLDisplay -> EGLConfig -> [(EGLSurfAttr, Int)] -> EGL EGLSurface Source
eglCreatePbufferFromClientBuffer :: EGLDisplay -> EGLenum -> EGLClientBuffer -> EGLConfig -> [(EGLSurfAttr, Int)] -> EGL EGLSurface Source
eglDestroySurface :: EGLDisplay -> EGLSurface -> IO EGLError Source
eglCreatePixmapSurface :: EGLNativePixmap a => EGLDisplay -> EGLConfig -> a -> [(EGLSurfAttr, Int)] -> EGL EGLSurface Source
eglSurfaceAttrib :: EGLDisplay -> EGLSurface -> EGLSurfAttr -> Int -> IO EGLError Source
eglQuerySurface :: EGLDisplay -> EGLSurface -> EGLSurfAttr -> EGL Int Source
Rendering Contexts
eglCreateContext :: EGLDisplay -> EGLConfig -> [(EGLContextAttr, Int)] -> EGL EGLContext Source
eglCreateContextWithShareContext :: EGLDisplay -> EGLConfig -> EGLContext -> [(EGLContextAttr, Int)] -> EGL EGLContext Source
eglDestroyContext :: EGLDisplay -> EGLContext -> IO EGLError Source
eglMakeCurrent :: EGLDisplay -> EGLSurface -> EGLSurface -> EGLContext -> IO EGLError Source
eglConfigID :: EGLDisplay -> EGLContext -> EGL Int Source
eglContextClientType :: EGLDisplay -> EGLContext -> EGL Int Source
eglContextClientVersion :: EGLDisplay -> EGLContext -> EGL Int Source
eglRenderBuffer :: EGLDisplay -> EGLContext -> EGL Int Source
eglQueryContext :: EGLDisplay -> EGLContext -> Int -> EGL Int Source
Synchronization Primitives
Posting the Color Buffer
eglSwapBuffers :: EGLDisplay -> EGLSurface -> IO EGLError Source
eglCopyBuffers :: EGLNativePixmap a => EGLDisplay -> EGLSurface -> a -> IO EGLError Source
eglSwapInterval :: EGLDisplay -> Int -> IO EGLError Source
Render to Textures
eglBindTexImage :: EGLDisplay -> EGLSurface -> EGLBuffer -> IO EGLError Source
eglReleaseTexImage :: EGLDisplay -> EGLSurface -> EGLBuffer -> IO EGLError Source
Obtain Extension Function Pointers
eglGetProcAddress :: String -> FunPtr a Source
inlinePerformIO :: IO a -> a Source
Just like unsafePerformIO, but we inline it. Big performance gains as
it exposes lots of things to further inlining. Very unsafe. In
particular, you should do no memory allocation inside an
inlinePerformIO
block.
Extending EGL
:: (EGLError -> IO a) | Error handler |
-> (EGLDisplay -> EGLContext -> EGLSurface -> EGLSurface -> IO a) | Current Display in use -> Current Context -> Current Read Surface -> Current Draw Surface |
-> IO a |
Types
Window-system-dependent types
type EGLNativeWindowType = Ptr () Source
type EGLNativePixmapType = Ptr () Source
type EGLNativeDisplayType = Ptr () Source
class EGLNativeWindow a where Source
getNativeWindow :: a -> EGLNativeWindowType Source
class EGLNativePixmap a where Source
getNativePixmap :: a -> EGLNativePixmapType Source
class EGLNativeDisplay a where Source
EGL Types
type EGLBoolean = Int Source
type EGLConfig_ = Ptr () Source
type EGLContext_ = Ptr () Source
type EGLDisplay_ = Ptr () Source
type EGLSurface_ = Ptr () Source
type EGLClientBuffer_ = Ptr () Source
newtype EGLContext Source
newtype EGLDisplay Source
newtype EGLSurface Source
newtype EGLClientBuffer Source
EGL Functions
c_eglInitialize :: EGLDisplay_ -> Ptr EGLint -> Ptr EGLint -> IO EGLBoolean Source
c_eglQueryString :: EGLDisplay_ -> EGLint -> IO CString Source
c_eglGetConfigs :: EGLDisplay_ -> Ptr EGLConfig_ -> EGLint -> Ptr EGLint -> IO EGLBoolean Source
c_eglChooseConfig :: EGLDisplay_ -> Ptr EGLint -> Ptr EGLConfig_ -> EGLint -> Ptr EGLint -> IO EGLBoolean Source
c_eglGetConfigAttrib :: EGLDisplay_ -> EGLConfig_ -> EGLint -> Ptr EGLint -> IO EGLBoolean Source
c_eglCreateWindowSurface :: EGLDisplay_ -> EGLConfig_ -> EGLNativeWindowType -> Ptr EGLint -> IO EGLSurface_ Source
c_eglCreatePbufferSurface :: EGLDisplay_ -> EGLConfig_ -> Ptr EGLint -> IO EGLSurface_ Source
c_eglCreatePixmapSurface :: EGLDisplay_ -> EGLConfig_ -> EGLNativePixmapType -> Ptr EGLint -> IO EGLSurface_ Source
c_eglQuerySurface :: EGLDisplay_ -> EGLSurface_ -> EGLint -> Ptr EGLint -> IO EGLBoolean Source
c_eglBindAPI :: EGLenum -> IO EGLBoolean Source
c_eglCreatePbufferFromClientBuffer :: EGLDisplay_ -> EGLenum -> EGLClientBuffer_ -> EGLConfig_ -> Ptr EGLint -> IO EGLSurface_ Source
c_eglSurfaceAttrib :: EGLDisplay_ -> EGLSurface_ -> EGLint -> EGLint -> IO EGLBoolean Source
c_eglBindTexImage :: EGLDisplay_ -> EGLSurface_ -> EGLint -> IO EGLBoolean Source
c_eglReleaseTexImage :: EGLDisplay_ -> EGLSurface_ -> EGLint -> IO EGLBoolean Source
c_eglSwapInterval :: EGLDisplay_ -> EGLint -> IO EGLBoolean Source
c_eglCreateContext :: EGLDisplay_ -> EGLConfig_ -> EGLContext_ -> Ptr EGLint -> IO EGLContext_ Source
c_eglMakeCurrent :: EGLDisplay_ -> EGLSurface_ -> EGLSurface_ -> EGLContext_ -> IO EGLBoolean Source
c_eglQueryContext :: EGLDisplay_ -> EGLContext_ -> EGLint -> Ptr EGLint -> IO EGLBoolean Source
c_eglWaitNative :: EGLint -> IO EGLBoolean Source
c_eglSwapBuffers :: EGLDisplay_ -> EGLSurface_ -> IO EGLBoolean Source
c_eglGetProcAddress :: CString -> IO (FunPtr a) Source