Wraps a native window into an EGL window surface. The EGL surface serves as a drawing target for OpenGL and OpenGL ES drawing commands.
EGL-Window | Wraps a native window into an EGL window surface. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file EGL-Window. |
C-kern/ | Implementation file EGL-Window impl. |
Types | |
struct eglwindow_t | Export eglwindow_t into global namespace. |
Functions | |
test | |
unittest_platform_opengl_egl_eglwindow | Test eglwindow_t functionality. |
eglwindow_t | Wraps a native window into an EGL specific type. |
lifetime | |
eglwindow_FREE | Static initializer. |
initx11_eglwindow | Initializes eglwin with x11win. |
free_eglwindow | Frees resources allocated by eglwin window surface. |
update | |
swapbuffer_eglwindow | Swaps the content of the back and from buffer. |
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.
© 2014 Jörg Seebohn
Header file EGL-Window.
Implementation file EGL-Window impl.
Export eglwindow_t into global namespace.
test | |
unittest_platform_opengl_egl_eglwindow | Test eglwindow_t functionality. |
int unittest_platform_opengl_egl_eglwindow( void )
Test eglwindow_t functionality.
typedef struct opengl_surface_t * eglwindow_t
Wraps a native window into an EGL specific type.
lifetime | |
eglwindow_FREE | Static initializer. |
initx11_eglwindow | Initializes eglwin with x11win. |
free_eglwindow | Frees resources allocated by eglwin window surface. |
update | |
swapbuffer_eglwindow | Swaps the content of the back and from buffer. |
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.
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 specific type.
typedef struct opengl_surface_t * eglwindow_t
Test eglwindow_t functionality.
int unittest_platform_opengl_egl_eglwindow( void )
Static initializer.
#define eglwindow_FREE 0
Initializes eglwin with x11win.
int initx11_eglwindow( /*out*/eglwindow_t * eglwin, struct opengl_display_t * egldisp, struct opengl_config_t * eglconf, struct x11window_t * x11win )
Frees resources allocated by eglwin window surface.
int free_eglwindow( eglwindow_t * eglwin, struct opengl_display_t * egldisp )
Swaps the content of the back and from buffer.
int swapbuffer_eglwindow( eglwindow_t eglwin, struct opengl_display_t * egldisp )