15 #ifndef PANDAFRAMEWORK_H
16 #define PANDAFRAMEWORK_H
18 #include "pandabase.h"
19 #include "config_framework.h"
21 #include "windowFramework.h"
24 #include "eventHandler.h"
25 #include "graphicsPipe.h"
26 #include "graphicsEngine.h"
27 #include "graphicsWindow.h"
28 #include "recorderController.h"
29 #include "pointerTo.h"
30 #include "asyncTaskManager.h"
31 #include "genericAsyncTask.h"
46 void open_framework(
int &argc,
char **&argv);
47 void close_framework();
51 INLINE
const NodePath &get_data_root()
const;
57 void define_key(
const string &event_name,
58 const string &description,
59 EventHandler::EventCallbackFunction *
function,
62 INLINE
void set_window_title(
const string &title);
72 INLINE
int get_num_windows()
const;
76 void close_window(
int n);
78 void close_all_windows();
79 bool all_windows_closed()
const;
83 void report_frame_rate(ostream &out)
const;
84 void reset_frame_rate();
86 void set_wireframe(
bool enable);
87 void set_texture(
bool enable);
88 void set_two_sided(
bool enable);
89 void set_lighting(
bool enable);
90 void set_perpixel(
bool enable);
91 void set_background_type(WindowFramework::BackgroundType type);
93 INLINE
bool get_wireframe()
const;
94 INLINE
bool get_texture()
const;
95 INLINE
bool get_two_sided()
const;
96 INLINE
bool get_lighting()
const;
97 INLINE
bool get_perpixel()
const;
98 INLINE WindowFramework::BackgroundType get_background_type()
const;
100 static int hide_collision_solids(
NodePath node);
101 static int show_collision_solids(
NodePath node);
103 void set_highlight(
const NodePath &node);
104 void clear_highlight();
105 INLINE
bool has_highlight()
const;
106 INLINE
const NodePath &get_highlight()
const;
111 void enable_default_keys();
113 virtual bool do_frame(
Thread *current_thread);
116 INLINE
void set_exit_flag();
117 INLINE
void clear_exit_flag();
124 virtual void make_default_pipe();
125 virtual void do_enable_default_keys();
129 static void event_esc(
const Event *,
void *data);
130 static void event_f(
const Event *,
void *data);
131 static void event_w(
const Event *,
void *data);
132 static void event_t(
const Event *,
void *data);
133 static void event_b(
const Event *,
void *data);
134 static void event_i(
const Event *,
void *data);
135 static void event_l(
const Event *,
void *data);
136 static void event_p(
const Event *,
void *data);
137 static void event_c(
const Event *,
void *data);
138 static void event_a(
const Event *,
void *data);
139 static void event_C(
const Event *,
void *data);
140 static void event_B(
const Event *,
void *data);
141 static void event_L(
const Event *,
void *data);
142 static void event_A(
const Event *,
void *data);
143 static void event_h(
const Event *,
void *data);
144 static void event_arrow_up(
const Event *,
void *data);
145 static void event_arrow_down(
const Event *,
void *data);
146 static void event_arrow_left(
const Event *,
void *data);
147 static void event_arrow_right(
const Event *,
void *data);
148 static void event_S(
const Event *,
void *data);
149 static void event_f9(
const Event *,
void *data);
150 static void event_comma(
const Event *,
void *data);
151 static void event_question(
const Event * event,
void *data);
152 static void event_window_event(
const Event *,
void *data);
155 static AsyncTask::DoneStatus task_data_loop(
GenericAsyncTask *task,
void *data);
156 static AsyncTask::DoneStatus task_event(
GenericAsyncTask *task,
void *data);
157 static AsyncTask::DoneStatus task_clear_screenshot_text(
GenericAsyncTask *task,
void *data);
158 static AsyncTask::DoneStatus task_igloop(
GenericAsyncTask *task,
void *data);
159 static AsyncTask::DoneStatus task_record_frame(
GenericAsyncTask *task,
void *data);
160 static AsyncTask::DoneStatus task_play_frame(
GenericAsyncTask *task,
void *data);
162 static AsyncTask::DoneStatus task_clear_text(
GenericAsyncTask *task,
void *data);
163 static AsyncTask::DoneStatus task_garbage_collect(
GenericAsyncTask *task,
void *data);
167 bool _made_default_pipe;
169 string _window_title;
190 bool _wireframe_enabled;
191 bool _texture_enabled;
192 bool _two_sided_enabled;
193 bool _lighting_enabled;
194 bool _perpixel_enabled;
195 WindowFramework::BackgroundType _background_type;
200 bool _default_keys_enabled;
204 class KeyDefinition {
220 #include "pandaFramework.I"
A class to monitor events from the C++ side of things.
A class to manage a loose queue of isolated tasks, which can be performed either synchronously (in th...
Specifies parameters that may be passed to the loader.
This encapsulates the data that is normally associated with a single window, or with a single display...
A container for the various kinds of properties we might ask to have on a graphics window before we o...
An object to create GraphicsOutputs that share a particular 3-D API.
Associates a generic C-style function pointer with an AsyncTask object.
This is a base class for the various different classes that represent the result of a frame of render...
A thread; that is, a lightweight process.
A named event, possibly with parameters.
Encapsulates all the communication with a particular instance of a given rendering backend...
This object manages the process of recording the user's runtime inputs to a bam file so that the sess...
This class serves to provide a high-level framework for basic applications that use Panda in simple w...
This class is the main interface to controlling the render process.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...