Safe Haskell | None |
---|---|
Language | Haskell2010 |
Graphics.EGL.Base
Description
Low-level wrapper and some utility around EGL upto 1.5. Graphics.EGL is preffered for normal use.
- type EGLint = Int32
- type EGLboolean = Word32
- type EGLenum = Word32
- type EGLConfig = Ptr ()
- type EGLContext = Ptr ()
- type EGLDisplay = Ptr ()
- type EGLSurface = Ptr ()
- type EGLClientBuffer = Ptr ()
- type EGLNativeWindow = Ptr ()
- type EGLNativePixmap = Ptr ()
- type EGLNativeDisplay = Ptr ()
- type EGLAttrib = Ptr EGLint
- type EGLImage = Ptr ()
- type EGLTime = Int64
- type EGLSync = Ptr ()
- eglGetError :: IO EGLint
- eglGetDisplay :: EGLNativeDisplay -> IO EGLDisplay
- eglInitialize :: EGLDisplay -> EGLAttrib -> EGLAttrib -> IO EGLboolean
- eglTerminate :: EGLDisplay -> IO EGLboolean
- eglQueryString :: EGLDisplay -> EGLint -> IO CString
- eglGetConfigs :: EGLDisplay -> Ptr EGLConfig -> EGLint -> EGLAttrib -> IO EGLboolean
- eglChooseConfig :: EGLDisplay -> EGLAttrib -> Ptr EGLConfig -> EGLint -> EGLAttrib -> IO EGLboolean
- eglGetConfigAttrib :: EGLDisplay -> EGLConfig -> EGLint -> EGLAttrib -> IO EGLboolean
- eglCreateWindowSurface :: EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface
- eglCreatePbufferSurface :: EGLDisplay -> EGLConfig -> EGLAttrib -> IO EGLSurface
- eglCreatePixmapSurface :: EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface
- eglDestroySurface :: EGLDisplay -> EGLSurface -> IO EGLboolean
- eglQuerySurface :: EGLDisplay -> EGLSurface -> EGLint -> EGLAttrib -> IO EGLboolean
- eglBindAPI :: EGLenum -> IO EGLboolean
- eglQueryAPI :: IO EGLenum
- eglWaitClient :: IO EGLboolean
- eglReleaseThread :: IO EGLboolean
- eglCreatePbufferFromClientBuffer :: EGLDisplay -> EGLenum -> EGLClientBuffer -> EGLConfig -> EGLAttrib -> IO EGLSurface
- eglSurfaceAttrib :: EGLDisplay -> EGLSurface -> EGLint -> EGLint -> IO EGLboolean
- eglBindTexImage :: EGLDisplay -> EGLSurface -> EGLint -> IO EGLboolean
- eglReleaseTexImage :: EGLDisplay -> EGLSurface -> EGLint -> IO EGLboolean
- eglSwapInterval :: EGLDisplay -> EGLint -> IO EGLboolean
- eglCreateContext :: EGLDisplay -> EGLConfig -> EGLContext -> EGLAttrib -> IO EGLContext
- eglDestroyContext :: EGLDisplay -> EGLContext -> IO EGLboolean
- eglMakeCurrent :: EGLDisplay -> EGLSurface -> EGLSurface -> EGLContext -> IO EGLboolean
- eglGetCurrentContext :: IO EGLContext
- eglGetCurrentSurface :: EGLint -> IO EGLSurface
- eglGetCurrentDisplay :: IO EGLDisplay
- eglQueryContext :: EGLDisplay -> EGLContext -> EGLint -> EGLAttrib -> IO EGLboolean
- eglWaitNative :: EGLint -> IO EGLboolean
- eglSwapBuffers :: EGLDisplay -> EGLSurface -> IO EGLboolean
- eglCopyBuffers :: EGLDisplay -> EGLSurface -> EGLNativePixmap -> IO EGLboolean
- unwrap_eglCreateSync :: FunPtr (EGLDisplay -> EGLenum -> EGLAttrib -> IO EGLSync) -> EGLDisplay -> EGLenum -> EGLAttrib -> IO EGLSync
- eglCreateSync :: EGLDisplay -> EGLenum -> EGLAttrib -> IO EGLSync
- unwrap_eglDestroytSync :: FunPtr (EGLDisplay -> EGLSync -> IO EGLboolean) -> EGLDisplay -> EGLSync -> IO EGLboolean
- eglDestroytSync :: EGLDisplay -> EGLSync -> IO EGLboolean
- unwrap_eglGetSyncAttrib :: FunPtr (EGLDisplay -> EGLSync -> EGLint -> EGLAttrib -> IO EGLboolean) -> EGLDisplay -> EGLSync -> EGLint -> EGLAttrib -> IO EGLboolean
- eglGetSyncAttrib :: EGLDisplay -> EGLSync -> EGLint -> EGLAttrib -> IO EGLboolean
- unwrap_eglClientWaitSync :: FunPtr (EGLDisplay -> EGLSync -> EGLint -> EGLTime -> IO EGLint) -> EGLDisplay -> EGLSync -> EGLint -> EGLTime -> IO EGLint
- eglClientWaitSync :: EGLDisplay -> EGLSync -> EGLint -> EGLTime -> IO EGLint
- unwrap_eglWaitSync :: FunPtr (EGLDisplay -> EGLSync -> EGLint -> IO EGLboolean) -> EGLDisplay -> EGLSync -> EGLint -> IO EGLboolean
- eglWaitSync :: EGLDisplay -> EGLSync -> EGLint -> IO EGLboolean
- unwrap_eglCreateImage :: FunPtr (EGLDisplay -> EGLContext -> EGLenum -> EGLClientBuffer -> EGLAttrib -> IO EGLImage) -> EGLDisplay -> EGLContext -> EGLenum -> EGLClientBuffer -> EGLAttrib -> IO EGLImage
- eglCreateImage :: EGLDisplay -> EGLContext -> EGLenum -> EGLClientBuffer -> EGLAttrib -> IO EGLImage
- unwrap_eglDestroytImage :: FunPtr (EGLDisplay -> EGLImage -> IO EGLboolean) -> EGLDisplay -> EGLImage -> IO EGLboolean
- eglDestroytImage :: EGLDisplay -> EGLImage -> IO EGLboolean
- unwrap_eglGetPlatformDisplay :: FunPtr (EGLenum -> EGLNativeDisplay -> EGLAttrib -> IO EGLDisplay) -> EGLenum -> EGLNativeDisplay -> EGLAttrib -> IO EGLDisplay
- eglGetPlatformDisplay :: EGLenum -> EGLNativeDisplay -> EGLAttrib -> IO EGLDisplay
- unwrap_eglCreatePlatformWindowSurface :: FunPtr (EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface) -> EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface
- eglCreatePlatformWindowSurface :: EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface
- unwrap_eglCreatePlatformPixmapSurface :: FunPtr (EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface) -> EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface
- eglCreatePlatformPixmapSurface :: EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface
- newtype EGLConfAttr = EGLConfAttr EGLint
- newtype EGLSurfAttr = EGLSurfAttr EGLint
- newtype EGLContextAttr = EGLContextAttr EGLint
- queryString :: EGLint -> Egl -> IO String
- queryContext :: EGLint -> Egl -> IO EGLint
- type Egl = IORef EglCurrent
- data EglCurrent = EglCurrent {
- disp :: EGLDisplay
- chosen :: EGLConfig
- context :: EGLContext
- dsurf :: EGLSurface
- rsurf :: EGLSurface
- nwin :: EGLNativeWindow
- screenDims :: (Int32, Int32)
- ndisp :: Maybe EGLNativeDisplay
- confcand :: [[(EGLConfAttr, Int32)]]
- cxtconf :: [(EGLContextAttr, Int32)]
- initial :: Maybe EGLNativeDisplay -> [[(EGLConfAttr, Int32)]] -> [(EGLContextAttr, Int32)] -> EglCurrent
- showEglError :: EGLint -> String
- logError :: String -> IO ()
- withErrorCheck :: String -> IO EGLboolean -> IO Bool
- withAttrList :: [(EGLint, Int32)] -> (Ptr EGLint -> IO b) -> IO b
- setupEgl :: Maybe EGLNativeDisplay -> [[(EGLConfAttr, Int32)]] -> IO (EGLDisplay, EGLConfig)
- setSurface :: EGLDisplay -> EGLConfig -> EGLNativeWindow -> IO (EGLSurface, EGLint, EGLint)
EGL Types
type EGLboolean = Word32 Source
type EGLContext = Ptr () Source
type EGLDisplay = Ptr () Source
type EGLSurface = Ptr () Source
type EGLClientBuffer = Ptr () Source
Window System Types
type EGLNativeWindow = Ptr () Source
type EGLNativePixmap = Ptr () Source
type EGLNativeDisplay = Ptr () Source
Bindings to EGL
EGL 1.4
eglInitialize :: EGLDisplay -> EGLAttrib -> EGLAttrib -> IO EGLboolean Source
eglTerminate :: EGLDisplay -> IO EGLboolean Source
eglQueryString :: EGLDisplay -> EGLint -> IO CString Source
eglGetConfigs :: EGLDisplay -> Ptr EGLConfig -> EGLint -> EGLAttrib -> IO EGLboolean Source
eglChooseConfig :: EGLDisplay -> EGLAttrib -> Ptr EGLConfig -> EGLint -> EGLAttrib -> IO EGLboolean Source
eglGetConfigAttrib :: EGLDisplay -> EGLConfig -> EGLint -> EGLAttrib -> IO EGLboolean Source
eglCreateWindowSurface :: EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface Source
eglCreatePbufferSurface :: EGLDisplay -> EGLConfig -> EGLAttrib -> IO EGLSurface Source
eglCreatePixmapSurface :: EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface Source
eglDestroySurface :: EGLDisplay -> EGLSurface -> IO EGLboolean Source
eglQuerySurface :: EGLDisplay -> EGLSurface -> EGLint -> EGLAttrib -> IO EGLboolean Source
eglBindAPI :: EGLenum -> IO EGLboolean Source
eglCreatePbufferFromClientBuffer :: EGLDisplay -> EGLenum -> EGLClientBuffer -> EGLConfig -> EGLAttrib -> IO EGLSurface Source
eglSurfaceAttrib :: EGLDisplay -> EGLSurface -> EGLint -> EGLint -> IO EGLboolean Source
eglBindTexImage :: EGLDisplay -> EGLSurface -> EGLint -> IO EGLboolean Source
eglReleaseTexImage :: EGLDisplay -> EGLSurface -> EGLint -> IO EGLboolean Source
eglSwapInterval :: EGLDisplay -> EGLint -> IO EGLboolean Source
eglCreateContext :: EGLDisplay -> EGLConfig -> EGLContext -> EGLAttrib -> IO EGLContext Source
eglDestroyContext :: EGLDisplay -> EGLContext -> IO EGLboolean Source
eglMakeCurrent :: EGLDisplay -> EGLSurface -> EGLSurface -> EGLContext -> IO EGLboolean Source
eglQueryContext :: EGLDisplay -> EGLContext -> EGLint -> EGLAttrib -> IO EGLboolean Source
eglWaitNative :: EGLint -> IO EGLboolean Source
eglSwapBuffers :: EGLDisplay -> EGLSurface -> IO EGLboolean Source
eglCopyBuffers :: EGLDisplay -> EGLSurface -> EGLNativePixmap -> IO EGLboolean Source
EGL 1.5
unwrap_eglCreateSync :: FunPtr (EGLDisplay -> EGLenum -> EGLAttrib -> IO EGLSync) -> EGLDisplay -> EGLenum -> EGLAttrib -> IO EGLSync Source
eglCreateSync :: EGLDisplay -> EGLenum -> EGLAttrib -> IO EGLSync Source
unwrap_eglDestroytSync :: FunPtr (EGLDisplay -> EGLSync -> IO EGLboolean) -> EGLDisplay -> EGLSync -> IO EGLboolean Source
eglDestroytSync :: EGLDisplay -> EGLSync -> IO EGLboolean Source
unwrap_eglGetSyncAttrib :: FunPtr (EGLDisplay -> EGLSync -> EGLint -> EGLAttrib -> IO EGLboolean) -> EGLDisplay -> EGLSync -> EGLint -> EGLAttrib -> IO EGLboolean Source
eglGetSyncAttrib :: EGLDisplay -> EGLSync -> EGLint -> EGLAttrib -> IO EGLboolean Source
unwrap_eglClientWaitSync :: FunPtr (EGLDisplay -> EGLSync -> EGLint -> EGLTime -> IO EGLint) -> EGLDisplay -> EGLSync -> EGLint -> EGLTime -> IO EGLint Source
eglClientWaitSync :: EGLDisplay -> EGLSync -> EGLint -> EGLTime -> IO EGLint Source
unwrap_eglWaitSync :: FunPtr (EGLDisplay -> EGLSync -> EGLint -> IO EGLboolean) -> EGLDisplay -> EGLSync -> EGLint -> IO EGLboolean Source
eglWaitSync :: EGLDisplay -> EGLSync -> EGLint -> IO EGLboolean Source
unwrap_eglCreateImage :: FunPtr (EGLDisplay -> EGLContext -> EGLenum -> EGLClientBuffer -> EGLAttrib -> IO EGLImage) -> EGLDisplay -> EGLContext -> EGLenum -> EGLClientBuffer -> EGLAttrib -> IO EGLImage Source
eglCreateImage :: EGLDisplay -> EGLContext -> EGLenum -> EGLClientBuffer -> EGLAttrib -> IO EGLImage Source
unwrap_eglDestroytImage :: FunPtr (EGLDisplay -> EGLImage -> IO EGLboolean) -> EGLDisplay -> EGLImage -> IO EGLboolean Source
eglDestroytImage :: EGLDisplay -> EGLImage -> IO EGLboolean Source
unwrap_eglGetPlatformDisplay :: FunPtr (EGLenum -> EGLNativeDisplay -> EGLAttrib -> IO EGLDisplay) -> EGLenum -> EGLNativeDisplay -> EGLAttrib -> IO EGLDisplay Source
eglGetPlatformDisplay :: EGLenum -> EGLNativeDisplay -> EGLAttrib -> IO EGLDisplay Source
unwrap_eglCreatePlatformWindowSurface :: FunPtr (EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface) -> EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface Source
eglCreatePlatformWindowSurface :: EGLDisplay -> EGLConfig -> EGLNativeWindow -> EGLAttrib -> IO EGLSurface Source
unwrap_eglCreatePlatformPixmapSurface :: FunPtr (EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface) -> EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface Source
eglCreatePlatformPixmapSurface :: EGLDisplay -> EGLConfig -> EGLNativePixmap -> EGLAttrib -> IO EGLSurface Source
Extensions
Misc
newtype EGLConfAttr Source
Constructors
EGLConfAttr EGLint |
newtype EGLSurfAttr Source
Constructors
EGLSurfAttr EGLint |
newtype EGLContextAttr Source
Constructors
EGLContextAttr EGLint |
type Egl = IORef EglCurrent Source
EGL state holder per context.
data EglCurrent Source
Constructors
EglCurrent | |
Fields
|
initial :: Maybe EGLNativeDisplay -> [[(EGLConfAttr, Int32)]] -> [(EGLContextAttr, Int32)] -> EglCurrent Source
showEglError :: EGLint -> String Source
Trun errno into String.
withErrorCheck :: String -> IO EGLboolean -> IO Bool Source
withAttrList :: [(EGLint, Int32)] -> (Ptr EGLint -> IO b) -> IO b Source
Encode attribute list from [(name, value)] pairs.
setupEgl :: Maybe EGLNativeDisplay -> [[(EGLConfAttr, Int32)]] -> IO (EGLDisplay, EGLConfig) Source
Get an EGLDisplay and choose a suitable config.
setSurface :: EGLDisplay -> EGLConfig -> EGLNativeWindow -> IO (EGLSurface, EGLint, EGLint) Source
Create a surface and return its pointer, screen_width and screen_height.