Panda3D
|
A tiny specialization on GLESGraphicsStateGuardian to add some egl-specific information. More...
#include "eglGraphicsStateGuardian.h"
Public Member Functions | |
eglGraphicsStateGuardian (GraphicsEngine *engine, GraphicsPipe *pipe, eglGraphicsStateGuardian *share_with) | |
void | choose_pixel_format (const FrameBufferProperties &properties, X11_Display *_display, int _screen, bool need_pbuffer, bool need_pixmap) |
Selects a visual or fbconfig for all the windows and buffers that use this gsg. | |
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. | |
virtual TypeHandle | force_init_type () |
const FrameBufferProperties & | get_fb_properties () const |
Gets the FrameBufferProperties for all windows and buffers that use this GSG. | |
void | get_properties (FrameBufferProperties &properties, bool &pbuffer_supported, bool &pixmap_supported, bool &slow, EGLConfig config) |
Gets the FrameBufferProperties to match the indicated config. | |
virtual TypeHandle | get_type () const |
virtual void | reset () |
Resets all internal state as if the gsg were newly created. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
EGLContext | _context |
X11_Display * | _display |
EGLDisplay | _egl_display |
EGLConfig | _fbconfig |
FrameBufferProperties | _fbprops |
int | _screen |
EGLContext | _share_context |
XVisualInfo * | _visual |
XVisualInfo * | _visuals |
Protected Member Functions | |
virtual void * | do_get_extension_func (const char *prefix, const char *name) |
Returns the pointer to the GL extension function with the indicated name. | |
virtual void | get_extra_extensions () |
This may be redefined by a derived class (e.g. | |
virtual void | gl_flush () const |
Calls glFlush(). | |
virtual GLenum | gl_get_error () const |
Returns the result of glGetError(). | |
virtual void | query_gl_version () |
Queries the runtime version of OpenGL in use. |
A tiny specialization on GLESGraphicsStateGuardian to add some egl-specific information.
Definition at line 30 of file eglGraphicsStateGuardian.h.
void eglGraphicsStateGuardian::choose_pixel_format | ( | const FrameBufferProperties & | properties, |
X11_Display * | display, | ||
int | screen, | ||
bool | need_pbuffer, | ||
bool | need_pixmap | ||
) |
Selects a visual or fbconfig for all the windows and buffers that use this gsg.
Also creates the GL context and obtains the visual.
Definition at line 145 of file eglGraphicsStateGuardian.cxx.
References FrameBufferProperties::clear(), get_properties(), and FrameBufferProperties::get_quality().
Referenced by eglGraphicsBuffer::open_buffer(), eglGraphicsPixmap::open_buffer(), and eglGraphicsWindow::open_window().
void * eglGraphicsStateGuardian::do_get_extension_func | ( | const char * | prefix, |
const char * | name | ||
) | [protected, virtual] |
Returns the pointer to the GL extension function with the indicated name.
It is the responsibility of the caller to ensure that the required extension is defined in the OpenGL runtime prior to calling this; it is an error to call this for a function that is not defined.
Definition at line 393 of file eglGraphicsStateGuardian.cxx.
bool eglGraphicsStateGuardian::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.
Definition at line 292 of file eglGraphicsStateGuardian.cxx.
void eglGraphicsStateGuardian::get_extra_extensions | ( | ) | [protected, virtual] |
This may be redefined by a derived class (e.g.
glx or wgl) to get whatever further extensions strings may be appropriate to that interface, in addition to the GL extension strings return by glGetString().
Definition at line 378 of file eglGraphicsStateGuardian.cxx.
Referenced by query_gl_version().
const FrameBufferProperties & eglGraphicsStateGuardian::get_fb_properties | ( | ) | const [inline] |
Gets the FrameBufferProperties for all windows and buffers that use this GSG.
Definition at line 22 of file eglGraphicsStateGuardian.I.
Referenced by eglGraphicsBuffer::open_buffer(), eglGraphicsPixmap::open_buffer(), and eglGraphicsWindow::open_window().
void eglGraphicsStateGuardian::get_properties | ( | FrameBufferProperties & | properties, |
bool & | pbuffer_supported, | ||
bool & | pixmap_supported, | ||
bool & | slow, | ||
EGLConfig | config | ||
) |
Gets the FrameBufferProperties to match the indicated config.
Definition at line 78 of file eglGraphicsStateGuardian.cxx.
References FrameBufferProperties::clear().
Referenced by choose_pixel_format().
void eglGraphicsStateGuardian::gl_flush | ( | ) | const [protected, virtual] |
Calls glFlush().
Definition at line 308 of file eglGraphicsStateGuardian.cxx.
GLenum eglGraphicsStateGuardian::gl_get_error | ( | ) | const [protected, virtual] |
Returns the result of glGetError().
Definition at line 324 of file eglGraphicsStateGuardian.cxx.
void eglGraphicsStateGuardian::query_gl_version | ( | ) | [protected, virtual] |
Queries the runtime version of OpenGL in use.
Definition at line 340 of file eglGraphicsStateGuardian.cxx.
References get_extra_extensions().
void eglGraphicsStateGuardian::reset | ( | ) | [virtual] |
Resets all internal state as if the gsg were newly created.
Definition at line 264 of file eglGraphicsStateGuardian.cxx.