EGL-Display

Implements the binding of a native os-specific graphics display to OpenGL / OpenGLES.  The implementation uses the EGL API which adapts OpenGL to the native windowing system.

Summary
EGL-DisplayImplements the binding of a native os-specific graphics display to OpenGL / OpenGLES.
CopyrightThis program is free software.
Files
C-kern/api/platform/OpenGL/EGL/egldisplay.hHeader file EGL-Display.
C-kern/platform/OpenGL/EGL/egldisplay.cImplementation file EGL-Display impl.
Types
opengl_display_tType which tags the native implementation of an OpenGL capable display.
struct egldisplay_tExport egldisplay_t into global namespace.
Functions
test
unittest_platform_opengl_egl_egldisplayTest egldisplay_t functionality.
egldisplay_tWrapper of a native display type.
lifetime
egldisplay_FREEStatic initializer.
initdefault_egldisplayInitializes egldisp with the default display connection.
initx11_egldisplayInitializes egldisp with x11disp.
free_egldisplayFrees all associated resources with a display.

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2014 Jörg Seebohn

Files

C-kern/api/platform/OpenGL/EGL/egldisplay.h

Header file EGL-Display.

C-kern/platform/OpenGL/EGL/egldisplay.c

Implementation file EGL-Display impl.

Types

opengl_display_t

typedef struct opengl_display_t opengl_display_t

Type which tags the native implementation of an OpenGL capable display.

struct egldisplay_t

Export egldisplay_t into global namespace.

test

unittest_platform_opengl_egl_egldisplay

int unittest_platform_opengl_egl_egldisplay(void)

Test egldisplay_t functionality.

egldisplay_t

typedef struct opengl_display_t * egldisplay_t

Wrapper of a native display type.  Adds additional information used by OpenGL / EGL.

Summary
lifetime
egldisplay_FREEStatic initializer.
initdefault_egldisplayInitializes egldisp with the default display connection.
initx11_egldisplayInitializes egldisp with x11disp.
free_egldisplayFrees all associated resources with a display.

lifetime

egldisplay_FREE

#define egldisplay_FREE 0

Static initializer.

initdefault_egldisplay

int initdefault_egldisplay(/*out*/egldisplay_t *egldisp)

Initializes egldisp with the default display connection.  Returns EINVAL if there is no default display connection or EALLOC if the egl specific part could not be initialized.

initx11_egldisplay

int initx11_egldisplay(/*out*/egldisplay_t *egldisp,
struct x11display_t *x11disp)

Initializes egldisp with x11disp.  Returns EINVAL if x11disp is not initialized or invalid or EALLOC if the egl specific part could not be initialized.  Do not free x11disp as long as egldisp is not freed.

free_egldisplay

int free_egldisplay(egldisplay_t *egldisp)

Frees all associated resources with a display.  If one or more threads has a current context and surface these resources are marked for deletion.

Implements the binding of a native os-specific graphics display to OpenGL / OpenGLES.
Implements EGL-Display.
typedef struct opengl_display_t opengl_display_t
Type which tags the native implementation of an OpenGL capable display.
typedef struct opengl_display_t * egldisplay_t
Wrapper of a native display type.
int unittest_platform_opengl_egl_egldisplay(void)
Test egldisplay_t functionality.
#define egldisplay_FREE 0
Static initializer.
int initdefault_egldisplay(/*out*/egldisplay_t *egldisp)
Initializes egldisp with the default display connection.
int initx11_egldisplay(/*out*/egldisplay_t *egldisp,
struct x11display_t *x11disp)
Initializes egldisp with x11disp.
int free_egldisplay(egldisplay_t *egldisp)
Frees all associated resources with a display.
Close