Safe Haskell | None |
---|---|
Language | Haskell2010 |
EGL 1.5 carefully reconstructed. EGL is an interface works between native window systems and rendering APIs such as OpenGL, OpenGL ES, OpenVG. This high-level APIs are specialized for OpenGL ES, so that initialization could be simply done in several lines. You can still access the rest of C APIs via Graphics.EGL.Base.
- eglInit :: IO Egl
- eglInitializeOn :: Maybe EGLNativeDisplay -> [[(EGLConfAttr, Int32)]] -> [(EGLContextAttr, Int32)] -> IO Egl
- eglResume :: Egl -> EGLNativeWindow -> IO ()
- eglSuspend :: Egl -> IO ()
- eglInvalidate :: Egl -> IO ()
- eglPostFrame :: Egl -> IO ()
- eglPostInterval :: Egl -> Int32 -> IO Bool
- eglVendor :: Egl -> IO String
- eglVersion :: Egl -> IO String
- eglExtensions :: Egl -> IO [String]
- eglClientAPIs :: Egl -> IO [String]
- eglScreenDims :: Num a => Egl -> IO (a, a)
- egl_True :: EGLint
- egl_False :: EGLint
- egl_None :: EGLint
- egl_DontCare :: EGLint
- egl_BufferSize :: EGLConfAttr
- egl_AlphaSize :: EGLConfAttr
- egl_BlueSize :: EGLConfAttr
- egl_GreenSize :: EGLConfAttr
- egl_RedSize :: EGLConfAttr
- egl_DepthSize :: EGLConfAttr
- egl_StencilSize :: EGLConfAttr
- egl_ConfigCaveat :: EGLConfAttr
- egl_ConfigID :: EGLConfAttr
- egl_Level :: EGLConfAttr
- egl_MaxPbufferHeight :: EGLConfAttr
- egl_MaxPbufferPixels :: EGLConfAttr
- egl_MaxPbufferWidth :: EGLConfAttr
- egl_NativeRenderable :: EGLConfAttr
- egl_NativeVisualID :: EGLConfAttr
- egl_NativeVisualType :: EGLConfAttr
- egl_Samples :: EGLConfAttr
- egl_SampleBuffers :: EGLConfAttr
- egl_SurfaceType :: EGLConfAttr
- egl_TransparentType :: EGLConfAttr
- egl_TransparentBlueValue :: EGLConfAttr
- egl_TransparentGreenValue :: EGLConfAttr
- egl_TransparentRedValue :: EGLConfAttr
- egl_BindToTextureRGB :: EGLConfAttr
- egl_BindToTextureRGBA :: EGLConfAttr
- egl_MinSwapInterval :: EGLConfAttr
- egl_MaxSwapInterval :: EGLConfAttr
- egl_LuminanceSize :: EGLConfAttr
- egl_AlphaMaskSize :: EGLConfAttr
- egl_ColorBufferType :: EGLConfAttr
- egl_RenderableType :: EGLConfAttr
- egl_MatchNativePixmap :: EGLConfAttr
- egl_Conformant :: EGLConfAttr
- egl_SlowConfig :: EGLint
- egl_NonConformantConfig :: EGLint
- egl_PBuffer :: EGLint
- egl_Pixmap :: EGLint
- egl_Window :: EGLint
- egl_VGColorspaceLinear :: EGLint
- egl_VGAlphaFormatPre :: EGLint
- egl_MultisampleResolveBox :: EGLint
- egl_SwapBehaviorPreserved :: EGLint
- egl_TransparentRgb :: EGLint
- egl_RgbBuffer :: EGLint
- egl_LuminanceBuffer :: EGLint
- egl_OpenGLES :: EGLint
- egl_OpenVG :: EGLint
- egl_OpenGLES2 :: EGLint
- egl_OpenGL :: EGLint
- egl_OpenGLES3 :: EGLint
- eglGetSurfaceAttr :: Egl -> EGLSurfAttr -> IO Int32
- eglSetSurfaceAttr :: Egl -> EGLSurfAttr -> Int32 -> IO Bool
- egl_Height :: EGLSurfAttr
- egl_Width :: EGLSurfAttr
- egl_LargestPbuffer :: EGLSurfAttr
- egl_TextureFormat :: EGLSurfAttr
- egl_TextureTarget :: EGLSurfAttr
- egl_MipmapTexture :: EGLSurfAttr
- egl_MipmapLevel :: EGLSurfAttr
- egl_RenderBuffer :: EGLSurfAttr
- egl_VGColorspace :: EGLSurfAttr
- egl_VGAlphaFormat :: EGLSurfAttr
- egl_HorizontalResolution :: EGLSurfAttr
- egl_VerticalResolution :: EGLSurfAttr
- egl_PixelAspectRaito :: EGLSurfAttr
- egl_SwapBehavior :: EGLSurfAttr
- egl_MultisampleResolve :: EGLSurfAttr
- egl_ConfigId :: EGLSurfAttr
- egl_GLColorspace :: EGLSurfAttr
- egl_NoTexture :: EGLint
- egl_TextureRgb :: EGLint
- egl_TextureRgba :: EGLint
- egl_Texture2D :: EGLint
- egl_BackBuffer :: EGLint
- egl_SingleBuffer :: EGLint
- egl_ColorspaceSrgb :: EGLint
- egl_ColorspaceLinear :: EGLint
- egl_Nonpre :: EGLint
- egl_Pre :: EGLint
- egl_DisplayScaling :: EGLint
- egl_Unknown :: EGLint
- egl_BufferPreserved :: EGLint
- egl_BufferDestroyed :: EGLint
- egl_ResolveDefault :: EGLint
- egl_ResolveBox :: EGLint
- eglConfigID :: Egl -> IO Int32
- eglContextClientType :: Egl -> IO Int32
- eglContextClientVersion :: Egl -> IO Int32
- eglRenderBuffer :: Egl -> IO Int32
- egl_ClientVersion :: EGLContextAttr
- egl_GLRobustAccessExt :: EGLContextAttr
- egl_GLResetNotificationStrategyExt :: EGLContextAttr
- egl_MinorVersion :: EGLContextAttr
- egl_GLProfileMask :: EGLContextAttr
- egl_GLResetNotificationStrategy :: EGLContextAttr
- egl_ContextFlags :: EGLContextAttr
- egl_GLDebug :: EGLContextAttr
- egl_GLForwardCompat :: EGLContextAttr
- egl_GLRobustAccess :: EGLContextAttr
- egl_GLCoreProfileBit :: EGLint
- egl_GLCompatProfileBit :: EGLint
- egl_NoResetNotification :: EGLint
- egl_LoseContextOnReset :: EGLint
- egl_GLDebugBit :: EGLint
- egl_GLForwardCompatBit :: EGLint
- egl_GLRobustAccessBit :: EGLint
- eglWaitCaller :: IO Bool
- eglWaitGPU :: IO Bool
- type EGLBuffer = EGLint
- eglBindAsTexture :: Egl -> EGLBuffer -> IO Bool
- eglReleaseTexture :: Egl -> EGLBuffer -> IO Bool
- newtype GraphicsAPI = GraphicsAPI EGLenum
- pattern OpenGLES :: GraphicsAPI
- pattern OpenVG :: GraphicsAPI
- pattern OpenGL :: GraphicsAPI
- eglBindCurrentAPI :: GraphicsAPI -> IO Bool
- eglCurrentAPI :: IO GraphicsAPI
EGL Lifecycle
:: Maybe EGLNativeDisplay | If any, specify native display pointer. |
-> [[(EGLConfAttr, Int32)]] | EGL configurations with many fallbacks. |
-> [(EGLContextAttr, Int32)] | Choose GL version here. |
-> IO Egl |
Initialize EGL with specified display and configurations.
:: Egl | |
-> EGLNativeWindow | Pointer to the native window handler. |
-> IO () |
Start using graphics APIs on this thread. initialization is performed here whenever necessary. EGL context would be re-created if the last context was lost due to power management events such as sleep.
eglSuspend :: Egl -> IO () Source
Stop using graphics APIs on this thread. Should be called before a sleep.
eglInvalidate :: Egl -> IO () Source
Posting the Color Buffer
eglPostFrame :: Egl -> IO () Source
Post EGL surface color buffer to the native window. eglPostFrame calls eglSwapBuffers inside.
eglPostInterval :: Egl -> Int32 -> IO Bool Source
Specifies the minimum number of video frame periods per buffer swap for the window associated with the current context. Returns False on failure. The default swap interval is 1.
Query Context
eglVersion :: Egl -> IO String Source
eglExtensions :: Egl -> IO [String] Source
eglClientAPIs :: Egl -> IO [String] Source
eglScreenDims :: Num a => Egl -> IO (a, a) Source
Attributes
Config Attributes
egl_SurfaceType :: EGLConfAttr Source
Bitmask, see below.
egl_RenderableType :: EGLConfAttr Source
Bitmask, see below.
egl_ConfigCaveat values (except egl_None)
egl_SurfaceType mask bits
egl_TransparentType values (except egl_None)
egl_ColorBufferType values
egl_RenderableType bitmask
egl_OpenGLES3 :: EGLint Source
EGL_KHR_create_context or EGL 1.5 required
Surface
eglGetSurfaceAttr :: Egl -> EGLSurfAttr -> IO Int32 Source
eglSetSurfaceAttr :: Egl -> EGLSurfAttr -> Int32 -> IO Bool Source
Surface Attributes
egl_Height :: EGLSurfAttr Source
int Height of surface.
egl_Width :: EGLSurfAttr Source
int Width of surface.
egl_LargestPbuffer :: EGLSurfAttr Source
boolean If true, create largest pbuffer possible.
egl_TextureFormat :: EGLSurfAttr Source
enum Format of texture: RGB, RGBA, or no texture.
egl_TextureTarget :: EGLSurfAttr Source
enum Type of texture: 2D or no texture.
egl_MipmapTexture :: EGLSurfAttr Source
boolean True if texture has mipmaps.
egl_MipmapLevel :: EGLSurfAttr Source
int Mipmap level to render to.
egl_RenderBuffer :: EGLSurfAttr Source
enum Render buffer, see below.
egl_VGColorspace :: EGLSurfAttr Source
enum Color space for OpenVG, see below.
egl_VGAlphaFormat :: EGLSurfAttr Source
enum Alpha format for OpenVG, see below.
egl_HorizontalResolution :: EGLSurfAttr Source
int Horizontal dot pitch.
egl_VerticalResolution :: EGLSurfAttr Source
int Vertical dot pitch.
egl_PixelAspectRaito :: EGLSurfAttr Source
int Display aspect ratio.
egl_SwapBehavior :: EGLSurfAttr Source
enum Buffer swap behavior, see below.
egl_MultisampleResolve :: EGLSurfAttr Source
enum Multisample resolve behavior, see below.
egl_ConfigId :: EGLSurfAttr Source
int ID of EGLConfig surface was created with egl_Height integer Height of surface.
egl_GLColorspace :: EGLSurfAttr Source
EGL_KHR_gl_colorspace or EGL 1.5+ enum Color space for OpenGL, see below.
egl_Texture{Format,Target} values
egl_RenderBuffer values
egl_{VG,GL}Colorspace values
egl_VGAlphaFormat values
Resolution and Aspect Raito values
egl_DisplayScaling :: EGLint Source
Constant scale factor by which fractional display resolutions & aspect ratio are scaled when queried as integer values.
Unknown display resolution or aspect ratio.
egl_SwapBehavior values
egl_MultisampleResolve values
Context
eglConfigID :: Egl -> IO Int32 Source
eglContextClientType :: Egl -> IO Int32 Source
eglContextClientVersion :: Egl -> IO Int32 Source
eglRenderBuffer :: Egl -> IO Int32 Source
Context Attributes
egl_ClientVersion :: EGLContextAttr Source
Specify context client major version, 2 or later.
egl_GLRobustAccessExt :: EGLContextAttr Source
EGL_EXT_create_context_robustness required Same as unpostfixed version.
egl_GLResetNotificationStrategyExt :: EGLContextAttr Source
EGL_EXT_create_context_robustness required Same as unpostfixed version.
egl_MinorVersion :: EGLContextAttr Source
EGL_KHR_create_context or EGL 1.5 required Specify context client minor version.
egl_GLProfileMask :: EGLContextAttr Source
EGL_KHR_create_context or EGL 1.5 required See below.
egl_GLResetNotificationStrategy :: EGLContextAttr Source
EGL_KHR_create_context or EGL 1.5 required See below.
egl_ContextFlags :: EGLContextAttr Source
EGL_KHR_create_context required See below.
egl_OpenGLProfileMask mask bits
egl_OpenGLResetNotificationStrategy values
egl_ContextFlags bits
Synchronization Primitives
eglWaitGPU :: IO Bool Source
Copying Surface to Texture
type EGLBuffer = EGLint Source
Specify egl_RenderBuffer
value. (Perhaps egl_BackBuffer
only?)
Switching between APIs
pattern OpenGLES :: GraphicsAPI Source
pattern OpenVG :: GraphicsAPI Source
pattern OpenGL :: GraphicsAPI Source
eglBindCurrentAPI :: GraphicsAPI -> IO Bool Source