Panda3D
|
An interface to the egl system for managing GLES windows under X. More...
#include "eglGraphicsWindow.h"
Classes | |
struct | MouseDeviceInfo |
Public Member Functions | |
eglGraphicsWindow (GraphicsEngine *engine, GraphicsPipe *pipe, const string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg, GraphicsOutput *host) | |
virtual void | begin_flip () |
This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers. | |
virtual bool | begin_frame (FrameMode mode, Thread *current_thread) |
This function will be called within the draw thread before beginning rendering for a given frame. | |
virtual void | end_frame (FrameMode mode, Thread *current_thread) |
This function will be called within the draw thread after rendering is completed for a given frame. | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
Window | get_xwindow () const |
Returns the X11 Window handle. | |
virtual bool | move_pointer (int device, int x, int y) |
Forces the pointer to the indicated position within the window, if possible. | |
virtual void | process_events () |
Do whatever processing is necessary to ensure that the window responds to user events. | |
virtual void | set_properties_now (WindowProperties &properties) |
Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Protected Member Functions | |
virtual void | close_window () |
Closes the window right now. | |
virtual bool | open_window () |
Opens the window right now. |
An interface to the egl system for managing GLES windows under X.
Definition at line 31 of file eglGraphicsWindow.h.
void eglGraphicsWindow::begin_flip | ( | ) | [virtual] |
This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers.
This should instruct the window to prepare for the flip at the next video sync, but it should not wait.
We have the two separate functions, begin_flip() and end_flip(), to make it easier to flip all of the windows at the same time.
Reimplemented from GraphicsOutput.
Definition at line 234 of file eglGraphicsWindow.cxx.
bool eglGraphicsWindow::begin_frame | ( | FrameMode | mode, |
Thread * | current_thread | ||
) | [virtual] |
This function will be called within the draw thread before beginning rendering for a given frame.
It should do whatever setup is required, and return true if the frame should be rendered, or false if it should be skipped.
Reimplemented from GraphicsOutput.
Definition at line 143 of file eglGraphicsWindow.cxx.
References GraphicsOutput::begin_frame_spam(), GraphicsOutput::clear_cube_map_selection(), and GraphicsOutput::get_fb_properties().
void eglGraphicsWindow::close_window | ( | ) | [protected, virtual] |
Closes the window right now.
Called from the window thread.
Reimplemented from GraphicsWindow.
Definition at line 589 of file eglGraphicsWindow.cxx.
Referenced by open_window(), and process_events().
void eglGraphicsWindow::end_frame | ( | FrameMode | mode, |
Thread * | current_thread | ||
) | [virtual] |
This function will be called within the draw thread after rendering is completed for a given frame.
It should do whatever finalization is required.
Reimplemented from GraphicsOutput.
Definition at line 199 of file eglGraphicsWindow.cxx.
References GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::copy_to_textures(), GraphicsOutput::end_frame_spam(), GraphicsOutput::prepare_for_deletion(), and GraphicsOutput::trigger_flip().
Window eglGraphicsWindow::get_xwindow | ( | ) | const [inline] |
Returns the X11 Window handle.
Definition at line 22 of file eglGraphicsWindow.I.
Referenced by eglGraphicsPixmap::open_buffer().
bool eglGraphicsWindow::move_pointer | ( | int | device, |
int | x, | ||
int | y | ||
) | [virtual] |
Forces the pointer to the indicated position within the window, if possible.
Returns true if successful, false on failure. This may fail if the mouse is not currently within the window, or if the API doesn't support this operation.
Reimplemented from GraphicsWindow.
Definition at line 104 of file eglGraphicsWindow.cxx.
References WindowProperties::get_foreground().
bool eglGraphicsWindow::open_window | ( | ) | [protected, virtual] |
Opens the window right now.
Called from the window thread. Returns true if the window is successfully opened, or false if there was a problem.
Reimplemented from GraphicsWindow.
Definition at line 630 of file eglGraphicsWindow.cxx.
References eglGraphicsStateGuardian::choose_pixel_format(), close_window(), WindowProperties::get_cursor_hidden(), eglGraphicsPipe::get_display(), eglGraphicsStateGuardian::get_fb_properties(), eglGraphicsPipe::get_hidden_cursor(), eglGraphicsPipe::get_im(), WindowHandle::get_os_handle(), WindowProperties::get_parent_window(), WindowProperties::get_raw_mice(), eglGraphicsPipe::get_root(), eglGraphicsPipe::get_screen(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), WindowProperties::get_y_size(), WindowProperties::has_origin(), WindowProperties::has_size(), TypedObject::is_of_type(), WindowProperties::set_origin(), WindowProperties::set_size(), FrameBufferProperties::subsumes(), and FrameBufferProperties::verify_hardware_software().
void eglGraphicsWindow::process_events | ( | ) | [virtual] |
Do whatever processing is necessary to ensure that the window responds to user events.
Also, honor any requests recently made via request_properties()
This function is called only within the window thread.
Reimplemented from GraphicsWindow.
Definition at line 259 of file eglGraphicsWindow.cxx.
References close_window(), GraphicsWindow::get_close_request_event(), WindowProperties::get_fixed_size(), GraphicsWindow::get_properties(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), WindowProperties::set_foreground(), WindowProperties::set_minimized(), WindowProperties::set_open(), WindowProperties::set_size(), and GraphicsWindow::system_changed_properties().
void eglGraphicsWindow::set_properties_now | ( | WindowProperties & | properties | ) | [virtual] |
Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status.
The window properties are applied immediately, rather than waiting until the next frame. This implies that this method may *only* be called from within the window thread.
The return value is true if the properties are set, false if they are ignored. This is mainly useful for derived classes to implement extensions to this function.
Reimplemented from GraphicsWindow.
Definition at line 461 of file eglGraphicsWindow.cxx.
References WindowProperties::add_properties(), WindowProperties::clear_cursor_hidden(), WindowProperties::clear_foreground(), WindowProperties::clear_fullscreen(), WindowProperties::clear_origin(), WindowProperties::clear_size(), WindowProperties::clear_title(), WindowProperties::clear_z_order(), WindowProperties::get_cursor_hidden(), GraphicsPipe::get_display_height(), GraphicsPipe::get_display_width(), WindowProperties::get_foreground(), WindowProperties::get_fullscreen(), eglGraphicsPipe::get_hidden_cursor(), WindowProperties::get_title(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), WindowProperties::get_y_size(), WindowProperties::get_z_order(), WindowProperties::has_cursor_hidden(), WindowProperties::has_foreground(), WindowProperties::has_fullscreen(), WindowProperties::has_origin(), WindowProperties::has_size(), WindowProperties::has_title(), WindowProperties::has_z_order(), WindowProperties::is_any_specified(), WindowProperties::set_cursor_hidden(), WindowProperties::set_fullscreen(), WindowProperties::set_origin(), WindowProperties::set_size(), WindowProperties::set_title(), WindowProperties::set_undecorated(), and WindowProperties::set_z_order().