EGL-Window

Wraps a native window into an EGL window surface.  The EGL surface serves as a drawing target for OpenGL and OpenGL ES drawing commands.

Summary
EGL-WindowWraps a native window into an EGL window surface.
CopyrightThis program is free software.
Files
C-kern/api/platform/OpenGL/EGL/eglwindow.hHeader file EGL-Window.
C-kern/platform/OpenGL/EGL/eglwindow.cImplementation file EGL-Window impl.
Types
struct eglwindow_tExport eglwindow_t into global namespace.
Functions
test
unittest_platform_opengl_egl_eglwindowTest eglwindow_t functionality.
eglwindow_tWraps a native window into an EGL specific type.
lifetime
eglwindow_FREEStatic initializer.
initx11_eglwindowInitializes eglwin with x11win.
free_eglwindowFrees resources allocated by eglwin window surface.
update
swapbuffer_eglwindowSwaps the content of the back and from buffer.

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/eglwindow.h

Header file EGL-Window.

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

Implementation file EGL-Window impl.

Types

struct eglwindow_t

Export eglwindow_t into global namespace.

Functions

test

unittest_platform_opengl_egl_eglwindow

int unittest_platform_opengl_egl_eglwindow(void)

Test eglwindow_t functionality.

eglwindow_t

typedef struct opengl_surface_t * eglwindow_t

Wraps a native window into an EGL specific type.

Summary
lifetime
eglwindow_FREEStatic initializer.
initx11_eglwindowInitializes eglwin with x11win.
free_eglwindowFrees resources allocated by eglwin window surface.
update
swapbuffer_eglwindowSwaps the content of the back and from buffer.

lifetime

eglwindow_FREE

#define eglwindow_FREE 0

Static initializer.

initx11_eglwindow

int initx11_eglwindow(/*out*/eglwindow_t *eglwin,
struct opengl_display_t *egldisp,
struct opengl_config_t *eglconf,
struct x11window_t *x11win)

Initializes eglwin with x11win.  Returns EINVAL if any parameter is not initialized or invalid or EALLOC if the egl specific part of the window could not be initialized.  Parameter egldisp must be a valid egldisplay_t and parameter eglconf a valid eglconfig_t.  Do not free x11win as long as eglwin is not freed.

free_eglwindow

int free_eglwindow(eglwindow_t *eglwin,
struct opengl_display_t *egldisp)

Frees resources allocated by eglwin window surface.  Parameter egldisp must point to a valid egl egldisp.

update

swapbuffer_eglwindow

int swapbuffer_eglwindow(eglwindow_t eglwin,
struct opengl_display_t *egldisp)

Swaps the content of the back and from buffer.  The front is the one which is shown on the screen.  The back buffer is the offscreen drawing area.  Call this function whenever you are ready with drawing.  After return the content of the back buffer is undefined.

Wraps a native window into an EGL window surface.
Implements EGL-Window.
typedef struct opengl_surface_t * eglwindow_t
Wraps a native window into an EGL specific type.
int unittest_platform_opengl_egl_eglwindow(void)
Test eglwindow_t functionality.
#define eglwindow_FREE 0
Static initializer.
int initx11_eglwindow(/*out*/eglwindow_t *eglwin,
struct opengl_display_t *egldisp,
struct opengl_config_t *eglconf,
struct x11window_t *x11win)
Initializes eglwin with x11win.
int free_eglwindow(eglwindow_t *eglwin,
struct opengl_display_t *egldisp)
Frees resources allocated by eglwin window surface.
int swapbuffer_eglwindow(eglwindow_t eglwin,
struct opengl_display_t *egldisp)
Swaps the content of the back and from buffer.
Close