mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
add get_window()
This commit is contained in:
parent
07c1718ec9
commit
f36cc707b1
@ -413,14 +413,42 @@ reset_all_windows(bool swapchain) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GraphicsEngine::is_empty
|
// Function: GraphicsEngine::is_empty
|
||||||
// Access: Published
|
// Access: Published
|
||||||
// Description: Returns true if there are no windows managed by the
|
// Description: Returns true if there are no windows or buffers
|
||||||
// engine, false if there is at least one.
|
// managed by the engine, false if there is at least
|
||||||
|
// one.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool GraphicsEngine::
|
bool GraphicsEngine::
|
||||||
is_empty() const {
|
is_empty() const {
|
||||||
return _windows.empty();
|
return _windows.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: GraphicsEngine::get_num_windows
|
||||||
|
// Access: Published
|
||||||
|
// Description: Returns the number of windows (or buffers) managed by
|
||||||
|
// the engine.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
int GraphicsEngine::
|
||||||
|
get_num_windows() const {
|
||||||
|
return _windows.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: GraphicsEngine::get_window
|
||||||
|
// Access: Published
|
||||||
|
// Description: Returns the nth window or buffers managed by the
|
||||||
|
// engine, in sorted order.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
GraphicsOutput *GraphicsEngine::
|
||||||
|
get_window(int n) const {
|
||||||
|
nassertr(n >= 0 && n < (int)_windows.size(), NULL);
|
||||||
|
|
||||||
|
if (!_windows_sorted) {
|
||||||
|
((GraphicsEngine *)this)->do_resort_windows();
|
||||||
|
}
|
||||||
|
return _windows[n];
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GraphicsEngine::render_frame
|
// Function: GraphicsEngine::render_frame
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -88,7 +88,10 @@ PUBLISHED:
|
|||||||
bool remove_window(GraphicsOutput *window);
|
bool remove_window(GraphicsOutput *window);
|
||||||
void remove_all_windows();
|
void remove_all_windows();
|
||||||
void reset_all_windows(bool swapchain);
|
void reset_all_windows(bool swapchain);
|
||||||
|
|
||||||
bool is_empty() const;
|
bool is_empty() const;
|
||||||
|
int get_num_windows() const;
|
||||||
|
GraphicsOutput *get_window(int n) const;
|
||||||
|
|
||||||
void render_frame();
|
void render_frame();
|
||||||
void open_windows();
|
void open_windows();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user