16 #include "androidGraphicsPipe.h"
18 #include "androidGraphicsWindow.h"
19 #include "androidGraphicsStateGuardian.h"
20 #include "config_androiddisplay.h"
21 #include "frameBufferProperties.h"
31 AndroidGraphicsPipe() {
33 _supported_types = OT_window | OT_buffer | OT_texture_buffer;
39 _egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
40 if (!eglInitialize(_egl_display, NULL, NULL)) {
41 androiddisplay_cat.error()
42 <<
"Couldn't initialize the EGL display: "
43 << get_egl_error_string(eglGetError()) <<
"\n";
46 if (!eglBindAPI(EGL_OPENGL_ES_API)) {
47 androiddisplay_cat.error()
48 <<
"Couldn't bind EGL to the OpenGL ES API: "
49 << get_egl_error_string(eglGetError()) <<
"\n";
61 ~AndroidGraphicsPipe() {
63 if (!eglTerminate(_egl_display)) {
64 androiddisplay_cat.error() <<
"Failed to terminate EGL display: "
65 << get_egl_error_string(eglGetError()) <<
"\n";
105 GraphicsPipe::PreferredWindowThread
119 make_output(const
string &name,
135 DCAST_INTO_R(androidgsg, gsg, NULL);
141 if (((flags&BF_require_parasite)!=0)||
142 ((flags&BF_refuse_window)!=0)||
143 ((flags&BF_resizeable)!=0)||
144 ((flags&BF_size_track_host)!=0)||
145 ((flags&BF_rtt_cumulative)!=0)||
146 ((flags&BF_can_bind_color)!=0)||
147 ((flags&BF_can_bind_every)!=0)) {
This graphics pipe represents the interface for creating OpenGL ES graphics windows on an X-based (e...
virtual string get_interface_name() const
Returns the name of the rendering interface associated with this GraphicsPipe.
virtual PreferredWindowThread get_preferred_window_thread() const
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be p...
An interface to manage Android windows and their appropriate EGL surfaces.
A container for the various kinds of properties we might ask to have on a graphics window before we o...
An object to create GraphicsOutputs that share a particular 3-D API.
This is a base class for the various different classes that represent the result of a frame of render...
A tiny specialization on GLESGraphicsStateGuardian to add some egl-specific information.
Encapsulates all the communication with a particular instance of a given rendering backend...
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...