flipFrame void GraphicsEngine::flip_frame(void); Description: Waits for all the threads that started drawing their last frame to finish drawing, and then flips all the windows. It is not usually necessary to call this explicitly, unless you need to see the previous frame right away. |
getAutoFlip bool GraphicsEngine::get_auto_flip(void) const; Description: Returns the current setting for the auto-flip flag. See set_auto_flip. |
getFrameBufferProperties FrameBufferProperties GraphicsEngine::get_frame_buffer_properties(void) const; Description: Returns the frame buffer properties for future gsg's. See set_frame_buffer_properties(). |
getNumWindows int GraphicsEngine::get_num_windows(void) const; Description: Returns the number of windows (or buffers) managed by the engine. |
getPortalCull bool GraphicsEngine::get_portal_cull(void) const; Description: Returns the current setting for the portal culling flag. |
getThreadingModel GraphicsThreadingModel GraphicsEngine::get_threading_model(void) const; Description: Returns the threading model that will be applied to future objects. See set_threading_model(). |
getWindow GraphicsOutput *GraphicsEngine::get_window(int n) const; Description: Returns the nth window or buffers managed by the engine, in sorted order. |
isEmpty bool GraphicsEngine::is_empty(void) const; Description: Returns true if there are no windows or buffers managed by the engine, false if there is at least one. |
makeBuffer GraphicsOutput *GraphicsEngine::make_buffer(GraphicsStateGuardian *gsg, string const &name, int sort, int x_size, int y_size); Description: Creates a new offscreen buffer using the indicated GraphicsStateGuardian and returns it. The GraphicsEngine becomes the owner of the buffer; it will persist at least until remove_window() is called later. This usually returns a GraphicsBuffer object, but it may actually return a GraphicsWindow if show-buffers is configured true. |
makeGsg PointerTo< GraphicsStateGuardian > GraphicsEngine::make_gsg(GraphicsPipe *pipe); Description: Creates a new gsg using the indicated GraphicsPipe and returns it. The GraphicsEngine does not officially own the pointer to the gsg; but if any windows are created using this GSG, the GraphicsEngine will own the pointers to these windows, which in turn will own the pointer to the GSG. There is no explicit way to release a GSG, but it will be destructed when all windows that reference it are destructed, and the draw thread that owns the GSG runs one more time. This flavor of make_gsg() uses the default frame buffer properties, specified via set_frame_buffer_properties(). |
makeParasite GraphicsOutput *GraphicsEngine::make_parasite(GraphicsOutput *host, string const &name, int sort, int x_size, int y_size); Description: Creates a new offscreen parasite buffer based on the indicated host. See parasiteBuffer.h. The GraphicsEngine becomes the owner of the buffer; it will persist at least until remove_window() is called later. This usually returns a ParasiteBuffer object, but it may actually return a GraphicsWindow if show-buffers is configured true. |
makeWindow GraphicsWindow *GraphicsEngine::make_window(GraphicsStateGuardian *gsg, string const &name, int sort); Description: Creates a new window using the indicated GraphicsStateGuardian and returns it. The GraphicsEngine becomes the owner of the window; it will persist at least until remove_window() is called later. |
openWindows void GraphicsEngine::open_windows(void); Description: Fully opens (or closes) any windows that have recently been requested open or closed, without rendering any frames. It is not necessary to call this explicitly, since windows will be automatically opened or closed when the next frame is rendered, but you may call this if you want your windows now without seeing a frame go by. |
removeAllWindows void GraphicsEngine::remove_all_windows(void); Description: Removes and closes all windows from the engine. This also cleans up and terminates any threads that have been started to service those windows. |
removeWindow bool GraphicsEngine::remove_window(GraphicsOutput *window); Description: Removes the indicated window or offscreen buffer from the set of windows that will be processed when render_frame() is called. This also closes the window if it is open, and removes the window from its GraphicsPipe, allowing the window to be destructed if there are no other references to it. (However, the window may not be actually closed until next frame, if it is controlled by a sub-thread.) The return value is true if the window was removed, false if it was not found. Unlike remove_all_windows(), this function does not terminate any of the threads that may have been started to service this window; they are left running (since you might open a new window later on these threads). If your intention is to clean up before shutting down, it is better to call remove_all_windows() then to call remove_window() one at a time. |
renderFrame void GraphicsEngine::render_frame(void); Description: Renders the next frame in all the registered windows, and flips all of the frame buffers. |
renderSubframe void GraphicsEngine::render_subframe(GraphicsOutput *win, DisplayRegion *dr, bool cull_sorting); Description: Performs a complete cull and draw pass for one particular display region. This is normally useful only for special effects, like shaders, that require a complete offscreen render pass before they can complete. This always executes completely within the calling thread, regardless of the threading model in use. Thus, it must always be called from the draw thread, whichever thread that may be. |
resetAllWindows void GraphicsEngine::reset_all_windows(bool swapchain); Description: Resets the framebuffer of the current window. This is currently used by DirectX 8 only. It calls a reset_window function on each active window to release/create old/new framebuffer |
setAutoFlip void GraphicsEngine::set_auto_flip(bool auto_flip); Filename: graphicsEngine.I Created by: drose (24Feb02) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: Set this flag true to indicate the GraphicsEngine should automatically cause windows to sync and flip as soon as they have finished drawing, rather than waiting for all of the windows to finish drawing first so they can flip together. This only affects the timing of when the flip occurs. If this is true (the default), the flip occurs before render_frame() returns. If this is false, the flip occurs whenever flip_frame() is called, or at the beginning of the next call to render_frame(), if flip_frame() is never called. |
setFrameBufferProperties void GraphicsEngine::set_frame_buffer_properties(FrameBufferProperties const &properties); Description: Specifies the default frame buffer properties for future gsg's created using the one-parameter make_gsg() method. |
setPortalCull void GraphicsEngine::set_portal_cull(bool value); Description: Set this flag true to indicate the GraphicsEngine should start portal culling |
setThreadingModel void GraphicsEngine::set_threading_model(GraphicsThreadingModel const &threading_model); Description: Specifies how future objects created via make_gsg(), make_buffer(), and make_window() will be threaded. This does not affect any already-created objects. |
syncFrame void GraphicsEngine::sync_frame(void); Description: Waits for all the threads that started drawing their last frame to finish drawing. The windows are not yet flipped when this returns; see also flip_frame(). It is not usually necessary to call this explicitly, unless you need to see the previous frame right away. |