15 #ifndef ANDROIDGRAPHICSSTATEGUARDIAN_H 16 #define ANDROIDGRAPHICSSTATEGUARDIAN_H 18 #include "pandabase.h" 19 #include "androidGraphicsPipe.h" 34 bool &pbuffer_supported,
bool &pixmap_supported,
35 bool &slow, EGLConfig config);
37 bool need_pbuffer,
bool need_pixmap);
51 EGLContext _share_context;
53 EGLDisplay _egl_display;
59 virtual void gl_flush()
const;
60 virtual GLenum gl_get_error()
const;
62 virtual void query_gl_version();
63 virtual void get_extra_extensions();
64 virtual void *do_get_extension_func(
const char *name);
67 int _egl_version_major, _egl_version_minor;
75 static void init_type() {
77 GLES2GraphicsStateGuardian::init_type();
78 register_type(_type_handle,
"AndroidGraphicsStateGuardian",
79 GLES2GraphicsStateGuardian::get_class_type());
81 GLESGraphicsStateGuardian::init_type();
82 register_type(_type_handle,
"AndroidGraphicsStateGuardian",
83 GLESGraphicsStateGuardian::get_class_type());
87 return get_class_type();
89 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
95 #include "androidGraphicsStateGuardian.I" const FrameBufferProperties & get_fb_properties() const
Gets the FrameBufferProperties for all windows and buffers that use this GSG.
bool create_context()
Creates the context based on the config previously obtained in choose_pixel_format.
void choose_pixel_format(const FrameBufferProperties &properties, bool need_pbuffer, bool need_pixmap)
Selects a visual or fbconfig for all the windows and buffers that use this gsg.
An interface to manage Android windows and their appropriate EGL surfaces.
virtual void reset()
Resets all internal state as if the gsg were newly created.
bool egl_is_at_least_version(int major_version, int minor_version) const
Returns true if the runtime GLX version number is at least the indicated value, false otherwise...
An object to create GraphicsOutputs that share a particular 3-D API.
void get_properties(FrameBufferProperties &properties, bool &pbuffer_supported, bool &pixmap_supported, bool &slow, EGLConfig config)
Gets the FrameBufferProperties to match the indicated config.
A tiny specialization on GLESGraphicsStateGuardian to add some egl-specific information.
void destroy_context()
Destroys the context previously created by create_context.
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...