Wraps the creation of an OpenGL graphics context using the EGL api.
EGl-Context | Wraps the creation of an OpenGL graphics context using the EGL api. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file EGl-Context. |
C-kern/ | Implementation file EGl-Context impl. |
Types | |
opengl_context_t | Type which tags the native implementation of an OpenGL capable graphics context. |
struct eglcontext_t | Export eglcontext_t into global namespace. |
Functions | |
test | |
unittest_platform_opengl_egl_eglcontext | Test eglcontext_t functionality. |
eglcontext_t | Points to an OpenGL graphics context. |
lifetime | |
eglcontext_FREE | Static initializer. |
init_eglcontext | Initializes eglcont with a graphic context. |
free_eglcontext | Frees all associated resources with this context. |
query | |
api_eglcontext | Returns in api the client rendering API the context supports. |
configid_eglcontext | Returns id of the configuration used during context creation in configid. |
current_eglcontext | Gibt den aktuellen OpenGL Kontext in eglcont zurück. |
update | |
setcurrent_eglcontext | Setzt den aktuellen OpenGL Kontext für diesen Thread auf eglcont. |
releasecurrent_eglcontext | Der Verbindung des Threads mit dem aktuellen Kontextes wird aufgehoben. |
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-Context.
Implementation file EGl-Context impl.
Export eglcontext_t into global namespace.
test | |
unittest_platform_opengl_egl_eglcontext | Test eglcontext_t functionality. |
int unittest_platform_opengl_egl_eglcontext( void )
Test eglcontext_t functionality.
typedef opengl_context_t * eglcontext_t
Points to an OpenGL graphics context. The implementation uses EGL to create the context.
lifetime | |
eglcontext_FREE | Static initializer. |
init_eglcontext | Initializes eglcont with a graphic context. |
free_eglcontext | Frees all associated resources with this context. |
query | |
api_eglcontext | Returns in api the client rendering API the context supports. |
configid_eglcontext | Returns id of the configuration used during context creation in configid. |
current_eglcontext | Gibt den aktuellen OpenGL Kontext in eglcont zurück. |
update | |
setcurrent_eglcontext | Setzt den aktuellen OpenGL Kontext für diesen Thread auf eglcont. |
releasecurrent_eglcontext | Der Verbindung des Threads mit dem aktuellen Kontextes wird aufgehoben. |
int init_eglcontext( /*out*/eglcontext_t * eglcont, struct opengl_display_t * egldisp, struct opengl_config_t * eglconf, uint8_t api )
Initializes eglcont with a graphic context. The context supports rendering with a render API determined by api. Parameter api must be a value from gcontext_api_e. If eglconf does not support the rendering API EINVAL is returned. The version used by OpenGLES is hard coded to 2.
int api_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, /*out*/uint8_t * api )
Returns in api the client rendering API the context supports. See gcontext_api_e for a list of possible values.
void current_eglcontext( /*out*/eglcontext_t * eglcont, /*out*/struct opengl_display_t ** egldisp, /*out*/struct opengl_surface_t ** drawsurf, /*out*/struct opengl_surface_t ** readsurf )
Gibt den aktuellen OpenGL Kontext in eglcont zurück. Die damit verbundenen Typen egldisp, drawsurf and readsurf werden auch zurückgegeben, es sei denn, ein Parameter ist auf 0 gesetzt. FEHLER: Kann für alle out Parameter 0 zurückliefern, falls aktuelles API != gcontext_api_OPENGLES.
int setcurrent_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, struct opengl_surface_t * drawsurf, struct opengl_surface_t * readsurf )
Setzt den aktuellen OpenGL Kontext für diesen Thread auf eglcont. Das aktuelle render API wird auf das von eglcont unterstützte API umgeschalten. Gibt EACCES zurück falls eglcont gerade von einem anderen Thread verwendet wird oder drawsurf bzw. readsurf an einen anderen Kontext gebunden sind.
int releasecurrent_eglcontext( struct opengl_display_t * egldisp )
Der Verbindung des Threads mit dem aktuellen Kontextes wird aufgehoben. Nach erfolgreicher Rückkehr gibt current_eglcontext 0 in allen out Parametern zurück.
Type which tags the native implementation of an OpenGL capable graphics context.
typedef struct opengl_context_t opengl_context_t
Points to an OpenGL graphics context.
typedef opengl_context_t * eglcontext_t
Test eglcontext_t functionality.
int unittest_platform_opengl_egl_eglcontext( void )
Static initializer.
#define eglcontext_FREE 0
Initializes eglcont with a graphic context.
int init_eglcontext( /*out*/eglcontext_t * eglcont, struct opengl_display_t * egldisp, struct opengl_config_t * eglconf, uint8_t api )
Frees all associated resources with this context.
int free_eglcontext( eglcontext_t * eglcont, struct opengl_display_t * egldisp )
Returns in api the client rendering API the context supports.
int api_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, /*out*/uint8_t * api )
Returns id of the configuration used during context creation in configid.
int configid_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, /*out*/uint32_t * configid )
Gibt den aktuellen OpenGL Kontext in eglcont zurück.
void current_eglcontext( /*out*/eglcontext_t * eglcont, /*out*/struct opengl_display_t ** egldisp, /*out*/struct opengl_surface_t ** drawsurf, /*out*/struct opengl_surface_t ** readsurf )
Setzt den aktuellen OpenGL Kontext für diesen Thread auf eglcont.
int setcurrent_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, struct opengl_surface_t * drawsurf, struct opengl_surface_t * readsurf )
Der Verbindung des Threads mit dem aktuellen Kontextes wird aufgehoben.
int releasecurrent_eglcontext( struct opengl_display_t * egldisp )