opengles-0.7.0: OpenGL ES 2.0 and 3.0 with EGL 1.4

Safe HaskellNone
LanguageHaskell2010

Graphics.EGL

Contents

Description

EGL 1.4, carefully reconstructed. You can still use the rest of C APIs via Graphics.EGL.Base.

Synopsis

EGL Lifecycle

eglInit :: IO Egl Source

Initialize EGL with default display.

eglInitializeOn Source

Arguments

:: 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.

eglResume Source

Arguments

:: Egl 
-> EGLNativeWindow

Window handler

-> IO () 

Start using graphics APIs on this thread. EGL context would be recreated if the last context was lost due to power management events.

eglSuspend :: Egl -> IO () Source

Stop using graphics APIs on this thread. Should be called before a sleep.

eglInvalidate :: Egl -> IO () Source

Invalidate EGL objects and terminates the display on this thread. You can still reuse Egl because Egl is designed for state management.

Posting the Color Buffer

eglPostFrame :: Egl -> IO () Source

Post EGL surface color buffer to a native window.

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

eglScreenDims :: Num a => Egl -> IO (a, a) Source

Attributes

EGLConfig Attributes

egl_SlowConfig :: EGLint Source

EGL_CONFIG_CAVEAT value EGL_NONE | 0x3050 | 0x3051

egl_NonConformantConfig :: EGLint Source

EGL_CONFIG_CAVEAT value EGL_NONE | 0x3050 | 0x3051

egl_TransparentRgb :: EGLint Source

EGL_TRANSPARENT_TYPE value EGL_NONE | 0x3052

egl_RgbBuffer :: EGLint Source

EGL_COLOR_BUFFER_TYPE value

egl_LuminanceBuffer :: EGLint Source

EGL_COLOR_BUFFER_TYPE value

egl_NoTexture :: EGLint Source

EGL_TEXTURE_FORMAT value

egl_Texture2D :: EGLint Source

EGL_TEXTURE_FORMAT value

egl_TextureRgba :: EGLint Source

EGL_TEXTURE_FORMAT value

egl_TextureRgb :: EGLint Source

EGL_TEXTURE_FORMAT value

egl_PBuffer :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_SwapBehaviorPreserved :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_MultisampleResolveBox :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_VGAlphaFormatPre :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_VGColorspaceLinear :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_Window :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_Pixmap :: EGLint Source

EGL_SURFACE_TYPE mask bits

egl_OpenGLES :: EGLint Source

EGL_RENDERABLE_TYPE bitmask

egl_OpenGL :: EGLint Source

EGL_RENDERABLE_TYPE bitmask

egl_OpenGLES2 :: EGLint Source

EGL_RENDERABLE_TYPE bitmask

egl_OpenVG :: EGLint Source

EGL_RENDERABLE_TYPE bitmask

EGLSurface Attributes

egl_Height :: EGLSurfAttr Source

int Height of surface

egl_ConfigId :: EGLSurfAttr Source

int ID of EGLConfig surface was created with EGL_HEIGHT integer Height of surface

egl_MultisampleResolve :: EGLSurfAttr Source

enum Multisample resolve behavior

egl_SwapBehavior :: EGLSurfAttr Source

enum Buffer swap behavior

egl_PixelAspectRaito :: EGLSurfAttr Source

int Display aspect ratio

egl_VerticalResolution :: EGLSurfAttr Source

int Vertical dot pitch

egl_HorizontalResolution :: EGLSurfAttr Source

int Horizontal dot pitch

egl_VGAlphaFormat :: EGLSurfAttr Source

enum Alpha format for OpenVG

egl_VGColorspace :: EGLSurfAttr Source

enum Color space for OpenVG

egl_RenderBuffer :: EGLSurfAttr Source

enum Render buffer

egl_MipmapLevel :: EGLSurfAttr Source

int Mipmap level to render to

egl_MipmapTexture :: EGLSurfAttr Source

boolean True if texture has mipmaps

egl_TextureTarget :: EGLSurfAttr Source

enum Type of texture: 2D or no texture

egl_TextureFormat :: EGLSurfAttr Source

enum Format of texture: RGB, RGBA, or no texture

egl_LargestPbuffer :: EGLSurfAttr Source

boolean If true, create largest pbuffer possible

egl_Width :: EGLSurfAttr Source

int Width of surface

EGLContext Attributes