Panda3D
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions
eglGraphicsWindow Class Reference

An interface to the egl system for managing GLES windows under X. More...

#include "eglGraphicsWindow.h"

Inheritance diagram for eglGraphicsWindow:
GraphicsWindow GraphicsOutput GraphicsOutputBase DrawableRegion TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase

List of all members.

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 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_flip ()
 This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers.
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
X11_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.

Detailed Description

An interface to the egl system for managing GLES windows under X.

Definition at line 30 of file eglGraphicsWindow.h.


Member Function Documentation

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 141 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 581 of file eglGraphicsWindow.cxx.

Referenced by open_window(), and process_events().

void eglGraphicsWindow::end_flip ( ) [virtual]

This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers.

This should cause the window to wait for the flip, if necessary.

Reimplemented from GraphicsOutput.

Definition at line 225 of file eglGraphicsWindow.cxx.

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 197 of file eglGraphicsWindow.cxx.

References GraphicsOutput::clear_cube_map_selection(), GraphicsOutput::copy_to_textures(), GraphicsOutput::end_frame_spam(), and GraphicsOutput::trigger_flip().

X11_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 102 of file eglGraphicsWindow.cxx.

References WindowProperties::get_foreground().

bool eglGraphicsWindow::open_window ( ) [protected, 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 251 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 453 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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations