14 #ifndef CALLBACKGRAPHICSWINDOW_H
15 #define CALLBACKGRAPHICSWINDOW_H
30 const std::string &name,
45 MAKE_PROPERTY(window, get_window);
54 static void init_type() {
55 CallbackData::init_type();
56 register_type(_type_handle,
"CallbackGraphicsWindow::WindowCallbackData",
57 CallbackData::get_class_type());
60 return get_class_type();
62 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
73 virtual void upcall();
79 static void init_type() {
80 WindowCallbackData::init_type();
81 register_type(_type_handle,
"CallbackGraphicsWindow::EventsCallbackData",
82 WindowCallbackData::get_class_type());
85 return get_class_type();
87 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
100 virtual void upcall();
109 static void init_type() {
110 WindowCallbackData::init_type();
111 register_type(_type_handle,
"CallbackGraphicsWindow::PropertiesCallbackData",
112 WindowCallbackData::get_class_type());
115 return get_class_type();
117 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
123 enum RenderCallbackType {
135 INLINE CallbackGraphicsWindow::RenderCallbackType get_callback_type()
const;
136 INLINE GraphicsOutput::FrameMode get_frame_mode()
const;
137 MAKE_PROPERTY(callback_type, get_callback_type);
138 MAKE_PROPERTY(frame_mode, get_frame_mode);
140 INLINE
void set_render_flag(
bool render_flag);
141 INLINE
bool get_render_flag()
const;
142 MAKE_PROPERTY(render_flag, get_render_flag, set_render_flag);
144 virtual void upcall();
147 RenderCallbackType _callback_type;
148 FrameMode _frame_mode;
155 static void init_type() {
156 WindowCallbackData::init_type();
157 register_type(_type_handle,
"CallbackGraphicsWindow::RenderCallbackData",
158 WindowCallbackData::get_class_type());
161 return get_class_type();
163 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
170 INLINE
void clear_events_callback();
174 INLINE
void clear_properties_callback();
178 INLINE
void clear_render_callback();
181 int create_input_device(
const std::string &name);
194 virtual bool open_window();
195 virtual bool do_reshape_request(
int x_origin,
int y_origin,
bool has_origin,
196 int x_size,
int y_size);
207 static void init_type() {
208 GraphicsWindow::init_type();
210 GraphicsWindow::get_class_type());
211 WindowCallbackData::init_type();
212 EventsCallbackData::init_type();
213 PropertiesCallbackData::init_type();
214 RenderCallbackData::init_type();
217 return get_class_type();
219 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic data block that is passed along to a CallbackObject when a callback is made.
This special window object doesn't represent a window in its own right, but instead hooks into some t...
This is a generic object that can be assigned to a callback at various points in the rendering proces...
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
This class is the main interface to controlling the render process.
virtual void begin_flip()
This function will be called within the draw thread after end_frame() 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.
virtual void end_flip()
This function will be called within the draw thread after begin_flip() has been called on all windows...
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.
An object to create GraphicsOutputs that share a particular 3-D API.
Encapsulates all the communication with a particular instance of a given rendering backend.
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
get_properties
Returns the current properties of the window.
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 ...
A thread; that is, a lightweight 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 window before we o...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...