14 #ifndef ANDROIDGRAPHICSWINDOW_H 15 #define ANDROIDGRAPHICSWINDOW_H 23 #include <android/native_window.h> 24 #include <android/input.h> 25 #include <android/native_activity.h> 26 #include <android/rect.h> 36 const std::string &name,
52 virtual void close_window();
53 virtual bool open_window();
55 virtual void destroy_surface();
56 virtual bool create_surface();
59 static void handle_command(
struct android_app *app, int32_t command);
60 static int32_t handle_input_event(
struct android_app *app, AInputEvent *event);
62 void ns_handle_command(int32_t command);
63 int32_t handle_key_event(
const AInputEvent *event);
64 int32_t handle_motion_event(
const AInputEvent *event);
69 struct android_app* _app;
71 EGLDisplay _egl_display;
72 EGLSurface _egl_surface;
74 int32_t _mouse_button_state;
82 static void init_type() {
83 GraphicsWindow::init_type();
85 GraphicsWindow::get_class_type());
88 return get_class_type();
90 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
virtual void end_flip()
This function will be called within the draw thread after begin_flip() has been called on all windows...
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.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An interface to manage Android windows and their appropriate EGL surfaces.
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
A container for the various kinds of properties we might ask to have on a graphics window before we o...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void set_properties_now(WindowProperties &properties)
Applies the requested set of properties to the window, if possible, for instance to request a change ...
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...
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.
A thread; that is, a lightweight process.
virtual void process_events()
Do whatever processing is necessary to ensure that the window responds to user events.
Encapsulates all the communication with a particular instance of a given rendering backend.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.