#include <ribGraphicsWindow.h>
Inheritance diagram for RIBGraphicsWindow:
Public Member Functions | |
RIBGraphicsWindow (GraphicsPipe *pipe) | |
RIBGraphicsWindow (GraphicsPipe *pipe, const GraphicsWindow::Properties &props) | |
virtual | ~RIBGraphicsWindow (void) |
void | set_rib_filename_template (const string &str) |
Specifies the string that defines the filename that will be generated for each RIB file output by the GraphicsWindow. | |
string | get_rib_filename_template () const |
Returns the string that defines the RIB filename. | |
string | get_rib_filename () const |
Returns the name of the RIB file that will be created at the next (or possibly only the first) call to begin_frame(). | |
bool | rib_per_frame () const |
Returns true if the RIB filename template contains the format specification f, which means there will be a separate RIB file generated for each frame. | |
void | set_image_filename_template (const string &str) |
Specifies the string that defines the filename that will be written to the RIB file as an output filename request. | |
string | get_image_filename_template () const |
Returns the string that defines the image filename. | |
string | get_image_filename () const |
Returns the name of the image file that will be created at the next call to begin_frame(). | |
bool | image_per_frame () const |
Returns true if the image filename template contains the format specification f, which means there will be a separate image file generated for each frame. | |
void | set_texture_directory (const string &directory) |
Sets the name of the directory into which texture maps are copied to be available to the RIB file. | |
string | get_texture_directory () const |
Returns the name of the directory into which texture maps are copied to be available to the RIB file. | |
void | set_texture_extension (const string &extension) |
Specifies the filename extension that texture map files are given when they are copied into the directory for RIB files. | |
string | get_texture_extension () const |
Returns the filename extension that texture map files are given when they are copied into the directory for RIB files. | |
void | flush_file () |
Finishes the RIB file currently being output and closes it. | |
virtual void | begin_frame () |
Prepares to write a new frame to the RIB file. | |
virtual void | end_frame () |
Finalizes a frame. | |
virtual void | make_current (void) |
This function will be called within the draw thread during begin_frame() to ensure the graphics context is ready for drawing. | |
virtual void | unmake_current (void) |
virtual TypeHandle | get_gsg_type () const |
Returns the TypeHandle of the kind of GSG preferred by this kind of window. | |
virtual TypeHandle | get_type (void) const |
virtual TypeHandle | force_init_type () |
WindowProperties | get_properties () const |
Returns the current properties of the window. | |
WindowProperties | get_requested_properties () const |
Returns the properties of the window that are currently requested. | |
void | clear_rejected_properties () |
Empties the set of failed properties that will be returned by get_rejected_properties(). | |
WindowProperties | get_rejected_properties () const |
Returns the set of properties that have recently been requested, but could not be applied to the window for some reason. | |
void | request_properties (const WindowProperties &requested_properties) |
Requests a property change on the window. | |
bool | is_closed () const |
Returns true if the window has not yet been opened, or has been fully closed, false if it is open. | |
bool | is_active () const |
Returns true if the window is ready to be rendered into, false otherwise. | |
bool | is_fullscreen () const |
Returns true if the window has been opened as a fullscreen window, false otherwise. | |
void | set_window_event (const string &window_event) |
Changes the name of the event that is generated when this window is modified externally, e.g. | |
string | get_window_event () const |
Returns the name of the event that is generated when this window is modified externally, e.g. | |
GraphicsStateGuardian * | get_gsg () const |
Returns the GSG that is associated with this window. | |
GraphicsPipe * | get_pipe () const |
Returns the GraphicsPipe that this window is associated with. | |
GraphicsChannel * | get_channel (int index) |
Returns a GraphicsChannel pointer that can be used to access the indicated channel number. | |
void | remove_channel (int index) |
Deletes a GraphicsChannel that was previously created via a call to get_channel(). | |
int | get_max_channel_index () const |
Returns the largest channel index number yet created, plus 1. | |
bool | is_channel_defined (int index) const |
Returns true if the channel with the given index number has already been defined, false if it hasn't. | |
int | get_num_display_regions () const |
Returns the number of active DisplayRegions that have been created within the various layers and channels of the window. | |
DisplayRegion * | get_display_region (int n) const |
Returns the nth active DisplayRegion of those that have been created within the various layers and channels of the window. | |
int | get_num_input_devices () const |
Returns the number of separate input devices associated with the window. | |
string | get_input_device_name (int device) const |
Returns the name of the nth input device. | |
bool | has_pointer (int device) const |
Returns true if the nth input device has a screen-space pointer (for instance, a mouse), false otherwise. | |
bool | has_keyboard (int device) const |
Returns true if the nth input device has a keyboard, false otherwise. | |
MouseData | get_mouse_data (int device) const |
Returns the MouseData associated with the nth input device. | |
bool | has_button_event (int device) const |
Returns true if the indicated device has a pending button event (a mouse button or keyboard button down/up), false otherwise. | |
ButtonEvent | get_button_event (int device) |
Assuming a previous call to has_button_event() returned true, this returns the pending button event. | |
virtual int | verify_window_sizes (int numsizes, int *dimen) |
Determines which of the indicated window sizes are supported by available hardware (e.g. | |
PointerTo< DisplayRegion > | make_scratch_display_region (int x_size, int y_size) const |
Allocates and returns a temporary DisplayRegion that may be used to render offscreen into. | |
void | win_display_regions_changed () |
Intended to be called when the active state on a nested channel or layer or display region changes, forcing the window to recompute its list of active display regions. | |
void | clear () |
Clears the entire framebuffer before rendering, according to the settings of get_color_clear_active() and get_depth_clear_active() (inherited from ClearableRegion). | |
virtual void | release_gsg () |
Releases the current GSG pointer, if it is currently held, and resets the GSG to NULL. | |
virtual void | begin_flip () |
This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers. | |
virtual void | end_flip () |
This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers. | |
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 in size or minimization status. | |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
void | copy_clear_settings (const ClearableRegion ©) |
A convenience function that does the same thing as the assignment operator; this is just syntactically a little nicer (and a little clearer) to call from a derived class. | |
void | set_clear_color_active (bool clear_color_active) |
Toggles the flag that indicates whether the color buffer should be cleared every frame. | |
bool | get_clear_color_active () const |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. | |
void | set_clear_depth_active (bool clear_depth_active) |
Toggles the flag that indicates whether the depth buffer should be cleared every frame. | |
bool | get_clear_depth_active () const |
Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. | |
void | set_clear_color (const Colorf &color) |
Sets the clear color to the indicated value. | |
const Colorf & | get_clear_color () const |
Returns the current clear color value. | |
void | set_clear_depth (float depth) |
Sets the clear depth to the indicated value. | |
float | get_clear_depth () const |
Returns the current clear depth value. | |
bool | is_any_clear_active () const |
Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear. | |
Static Public Member Functions | |
GraphicsWindow * | make_RibGraphicsWindow (const FactoryParams ¶ms) |
TypeHandle | get_class_type (void) |
void | init_type (void) |
Protected Types | |
typedef vector_GraphicsWindowInputDevice | InputDevices |
Protected Member Functions | |
void | setup_window (GraphicsPipe *pipe) |
Called by the constructor to initialize whatever internal structures are necessary, given the indicated pipe and requested properties. | |
void | begin_file () |
Called internally when a new RIB file needs to be created and its suitable headers written. | |
void | end_file () |
Called internally to wrap up the current RIB file and close it. | |
string | format_name (const string &name_template) const |
Given a filename template which contains symbols like f etc., replaces the symbols with the appropriate values to generate an actual filename. | |
virtual void | close_window () |
Closes the window right now. | |
virtual bool | open_window () |
Opens the window right now. | |
virtual bool | do_reshape_request (int x_origin, int y_origin, int x_size, int y_size) |
Called from the window thread in response to a request from within the code (via request_properties()) to change the size and/or position of the window. | |
void | declare_channel (int index, GraphicsChannel *chan) |
An internal function to add the indicated newly-created channel to the list at the indicated channel number. | |
void | system_changed_properties (const WindowProperties &properties) |
Should be called (from within the window thread) when process_events() detects an external change in some important window property; for instance, when the user resizes the window. | |
void | system_changed_size (int x_size, int y_size) |
An internal function to update all the channels with the new size of the window. | |
Static Protected Member Functions | |
string | format_integer (const string &format_spec, int number) |
Formats an integer according to a d-like format specification found in a filename template. | |
string | format_string (const string &format_spec, const string &str) |
Formats a string according to a s-like format specification found in a filename template. | |
bool | check_per_frame (const string &name_template) |
Scans a name template for the appearance of f (or some variant), and returns true if it appears, false otherwise. | |
Protected Attributes | |
string | _rib_filename_template |
string | _image_filename_template |
bool | _rib_per_frame |
bool | _image_per_frame |
bool | _file_begun |
Filename | _current_rib_filename |
ofstream | _file |
InputDevices | _input_devices |
Mutex | _input_lock |
PointerTo< GraphicsStateGuardian > | _gsg |
PointerTo< GraphicsPipe > | _pipe |
WindowProperties | _properties |
Static Private Attributes | |
TypeHandle | _type_handle |
Rendering to a RIB file means writing out a scene description to the file.
The filename of the RIB file is initially taken from the name of the RIBGraphicsPipe used to create the window, but it may subsequently be changed via set_rib_filename_template(). The filename may contain any of the sequences described above.
Definition at line 94 of file ribGraphicsWindow.h.
|
Definition at line 169 of file graphicsWindow.h. |
|
Definition at line 39 of file ribGraphicsWindow.cxx. References setup_window(). |
|
Definition at line 51 of file ribGraphicsWindow.cxx. References flush_file(). |
|
Definition at line 67 of file ribGraphicsWindow.cxx. References end_file(). |
|
Called internally when a new RIB file needs to be created and its suitable headers written.
Definition at line 171 of file ribGraphicsWindow.cxx. References _file, and get_image_filename(). Referenced by flush_file(). |
|
This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers. This should instruct the window to prepare for the flip at the next video sync, but it should not wait. We have the two separate functions, begin_flip() and end_flip(), to make it easier to flip all of the windows at the same time. Reimplemented in glxGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow. Definition at line 887 of file graphicsWindow.cxx. References GraphicsWindow::_channels, GraphicsWindow::_properties, WindowProperties::get_x_size(), WindowProperties::get_y_size(), and GraphicsChannel::window_resized(). |
|
Prepares to write a new frame to the RIB file.
Reimplemented from GraphicsWindow. Definition at line 99 of file ribGraphicsWindow.cxx. References _file, end_file(), GraphicsWindow::end_frame(), and rib_per_frame(). |
|
Scans a name template for the appearance of f (or some variant), and returns true if it appears, false otherwise.
Definition at line 396 of file ribGraphicsWindow.cxx. Referenced by get_rib_filename(). |
|
Clears the entire framebuffer before rendering, according to the settings of get_color_clear_active() and get_depth_clear_active() (inherited from ClearableRegion). This function is called only within the draw thread. Definition at line 787 of file graphicsWindow.cxx. References GraphicsWindow::_properties, WindowProperties::add_properties(), WindowProperties::clear_origin(), WindowProperties::clear_size(), GraphicsWindow::do_reshape_request(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), WindowProperties::get_y_size(), WindowProperties::has_origin(), WindowProperties::has_size(), GraphicsWindow::is_fullscreen(), WindowProperties::set_origin(), WindowProperties::set_size(), and GraphicsWindow::system_changed_size(). |
|
Empties the set of failed properties that will be returned by get_rejected_properties().
Definition at line 174 of file graphicsWindow.cxx. References GraphicsWindow::_lock, GraphicsWindow::_requested_properties, and WindowProperties::add_properties(). |
|
Closes the window right now. Called from the window thread. Reimplemented in glxGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow. Definition at line 1088 of file graphicsWindow.cxx. Referenced by wcrGraphicsWindow::do_close_window(). |
|
A convenience function that does the same thing as the assignment operator; this is just syntactically a little nicer (and a little clearer) to call from a derived class.
Definition at line 85 of file clearableRegion.I. References ClearableRegion::_flags, and ClearableRegion::F_clear_color_active. |
|
An internal function to add the indicated newly-created channel to the list at the indicated channel number. The caller must grab and hold _lock before making this call. Definition at line 1203 of file graphicsWindow.cxx. Referenced by GraphicsWindow::get_window_event(). |
|
Called from the window thread in response to a request from within the code (via request_properties()) to change the size and/or position of the window. Returns true if the window is successfully changed, or false if there was a problem. Reimplemented in WinGraphicsWindow. Definition at line 1125 of file graphicsWindow.cxx. Referenced by GraphicsWindow::clear(). |
|
Called internally to wrap up the current RIB file and close it.
Definition at line 227 of file ribGraphicsWindow.cxx. References format_integer(), and format_string(). Referenced by begin_frame(), and ~RIBGraphicsWindow(). |
|
This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers. This should cause the window to wait for the flip, if necessary. Reimplemented in wdxGraphicsWindow7, and wdxGraphicsWindow8. Definition at line 909 of file graphicsWindow.cxx. References GraphicsWindow::_channels, nassertv, and NULL. |
|
Finalizes a frame.
Reimplemented from GraphicsWindow. Definition at line 124 of file ribGraphicsWindow.cxx. References _file_begun, DCAST, RIBGraphicsPipe::get_file_name(), set_image_filename_template(), and set_rib_filename_template(). |
|
Finishes the RIB file currently being output and closes it.
Definition at line 83 of file ribGraphicsWindow.cxx. References _file, _file_begun, begin_file(), get_image_filename(), and image_per_frame(). Referenced by RIBGraphicsWindow(). |
|
Reimplemented from GraphicsWindow. Definition at line 154 of file ribGraphicsWindow.h. |
|
Formats an integer according to a d-like format specification found in a filename template. format_spec is the string between the percent sign and the command letter (which might be empty, or might contain a field width), and number is the value to format. Definition at line 320 of file ribGraphicsWindow.cxx. References width. Referenced by end_file(). |
|
Given a filename template which contains symbols like f etc., replaces the symbols with the appropriate values to generate an actual filename.
Definition at line 251 of file ribGraphicsWindow.cxx. |
|
Formats a string according to a s-like format specification found in a filename template. format_spec is the string between the percent sign and the command letter (which might be empty, or might contain a field width), and str is the value to format. Definition at line 367 of file ribGraphicsWindow.cxx. Referenced by end_file(). |
|
Assuming a previous call to has_button_event() returned true, this returns the pending button event.
Definition at line 642 of file graphicsWindow.cxx. References GraphicsWindow::_gsg, and PointerTo< GraphicsStateGuardian >::clear(). |
|
Returns a GraphicsChannel pointer that can be used to access the indicated channel number. All windows have at least one channel, channel 0, which corresponds to the entire window. If the hardware supports it, some kinds of windows may also have a number of hardware channels available at indices 1..n, which will correspond to a subregion of the window. This function returns a GraphicsChannel pointer if a channel is available, or NULL if it is not. If called twice with the same index number, it will return the same pointer. Definition at line 313 of file graphicsWindow.cxx. Referenced by ChanConfig::chan_eval(). |
|
Reimplemented from GraphicsWindow. Definition at line 461 of file ribGraphicsWindow.cxx. |
|
Returns the current clear color value. This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless. Definition at line 211 of file clearableRegion.I. |
|
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. Definition at line 127 of file clearableRegion.I. References ClearableRegion::_flags, and ClearableRegion::F_clear_depth_active. |
|
Returns the current clear depth value. This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless. Definition at line 253 of file clearableRegion.I. |
|
Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. Definition at line 169 of file clearableRegion.I. References ClearableRegion::_clear_depth. |
|
Returns the nth active DisplayRegion of those that have been created within the various layers and channels of the window. This may return NULL if n is out of bounds; particularly likely if the number of display regions has changed since the last call to get_num_display_regions(). Definition at line 478 of file graphicsWindow.cxx. References GraphicsWindow::_input_devices, GraphicsWindow::_input_lock, and nassertr. |
|
Returns the GSG that is associated with this window. There is a one-to-one association between windows and GSG's. This may return NULL if the graphics context has not yet been created for the window, e.g. before the first frame has rendered; or after the window has been closed. Definition at line 102 of file graphicsWindow.I. Referenced by NonlinearImager::set_texture_size(). |
|
Returns the TypeHandle of the kind of GSG preferred by this kind of window.
Definition at line 438 of file ribGraphicsWindow.cxx. |
|
Returns the name of the image file that will be created at the next call to begin_frame().
Definition at line 165 of file ribGraphicsWindow.I. Referenced by begin_file(), and flush_file(). |
|
Returns the string that defines the image filename. See set_image_filename_template(). Definition at line 150 of file ribGraphicsWindow.I. |
|
Returns the name of the nth input device.
Definition at line 529 of file graphicsWindow.cxx. |
|
Returns the largest channel index number yet created, plus 1. All channels associated with this window will have an index number in the range [0, get_max_channel_index()). This function, in conjunction with is_channel_defined(), below, may be used to determine the complete set of channels associated with the window. Definition at line 395 of file graphicsWindow.cxx. References GraphicsWindow::_input_devices, and GraphicsWindow::_input_lock. |
|
Returns the MouseData associated with the nth input device.
Definition at line 594 of file graphicsWindow.cxx. References GraphicsWindow::_gsg, GraphicsWindow::_lock, GraphicsWindow::_properties, PointerTo< GraphicsStateGuardian >::clear(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), ClearableRegion::is_any_clear_active(), GraphicsWindow::make_scratch_display_region(), nassertv, NULL, and PT. |
|
Returns the number of active DisplayRegions that have been created within the various layers and channels of the window.
Definition at line 449 of file graphicsWindow.cxx. References GraphicsWindow::_input_devices. |
|
Returns the number of separate input devices associated with the window. Typically, a window will have exactly one input device: the keyboard/mouse pair. However, some windows may have no input devices, and others may add additional devices, for instance for a joystick. Definition at line 511 of file graphicsWindow.cxx. |
|
Returns the GraphicsPipe that this window is associated with. It is possible that the GraphicsPipe might have been deleted while an outstanding PT(GraphicsWindow) prevented all of its children windows from also being deleted; in this unlikely case, get_pipe() may return NULL. Definition at line 125 of file graphicsWindow.I. Referenced by GraphicsEngine::setup_scene(). |
|
Returns the current properties of the window.
Definition at line 130 of file graphicsWindow.cxx. References GraphicsWindow::_lock, and GraphicsWindow::_requested_properties. Referenced by wdxGraphicsWindow8::end_flip(), DisplayRegion::get_pipe(), and DisplayRegion::get_right(). |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Returns the set of properties that have recently been requested, but could not be applied to the window for some reason. This set of properties will remain unchanged until they are changed by a new failed request, or clear_rejected_properties() is called. Definition at line 196 of file graphicsWindow.cxx. References GraphicsWindow::_lock, and GraphicsWindow::_window_event. |
|
Returns the properties of the window that are currently requested. These properties will be applied to the window (if valid) at the next execution of process_events(). Definition at line 154 of file graphicsWindow.cxx. References GraphicsWindow::_lock, and GraphicsWindow::_rejected_properties. Referenced by DisplayRegion::get_pipe(). |
|
Returns the name of the RIB file that will be created at the next (or possibly only the first) call to begin_frame().
Definition at line 80 of file ribGraphicsWindow.I. References _image_filename_template, _image_per_frame, check_per_frame(), and INLINE. |
|
Returns the string that defines the RIB filename. See set_rib_filename_template(). Definition at line 63 of file ribGraphicsWindow.I. References _rib_per_frame, and INLINE. |
|
Returns the name of the directory into which texture maps are copied to be available to the RIB file.
Definition at line 212 of file ribGraphicsWindow.I. |
|
Returns the filename extension that texture map files are given when they are copied into the directory for RIB files.
Definition at line 250 of file ribGraphicsWindow.I. |
|
Reimplemented from GraphicsWindow. Definition at line 471 of file ribGraphicsWindow.cxx. |
|
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). Definition at line 71 of file typedObject.I. References TypeHandle::get_name(), TypedObject::get_type(), and INLINE. |
|
Returns the name of the event that is generated when this window is modified externally, e.g. to be resized or closed by the user. See set_window_event(). Definition at line 272 of file graphicsWindow.cxx. References GraphicsWindow::declare_channel(), and NULL. |
|
Returns true if the indicated device has a pending button event (a mouse button or keyboard button down/up), false otherwise. If this returns true, the particular event may be extracted via get_button_event(). Definition at line 621 of file graphicsWindow.cxx. References GraphicsWindow::_gsg, nassertv, and NULL. |
|
Returns true if the nth input device has a keyboard, false otherwise.
Definition at line 573 of file graphicsWindow.cxx. References GraphicsWindow::_gsg, GraphicsWindow::make_current(), and NULL. |
|
Returns true if the nth input device has a screen-space pointer (for instance, a mouse), false otherwise.
Definition at line 552 of file graphicsWindow.cxx. References GraphicsWindow::_properties, WindowProperties::get_x_size(), and WindowProperties::get_y_size(). |
|
Returns true if the image filename template contains the format specification f, which means there will be a separate image file generated for each frame.
Definition at line 182 of file ribGraphicsWindow.I. Referenced by flush_file(). |
|
Reimplemented from GraphicsWindow. Definition at line 465 of file ribGraphicsWindow.cxx. |
|
Returns true if the window is ready to be rendered into, false otherwise.
Definition at line 59 of file graphicsWindow.I. References GraphicsWindow::_gsg, and INLINE. Referenced by wdxGraphicsWindow8::begin_frame(). |
|
Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.
Definition at line 272 of file clearableRegion.I. Referenced by GraphicsWindow::get_mouse_data(). |
|
Returns true if the channel with the given index number has already been defined, false if it hasn't. If this returns true, calling get_channel() on the given index number will return the channel pointer. If it returns false, calling get_channel() will create and return a new channel pointer. Definition at line 423 of file graphicsWindow.cxx. References GraphicsWindow::_input_devices, GraphicsWindow::_input_lock, and nassertr. |
|
Returns true if the window has not yet been opened, or has been fully closed, false if it is open. The window is not opened immediately after GraphicsEngine::make_window() is called; nor is it closed immediately after GraphicsEngine::remove_window() is called. Either operation may take a frame or two. Definition at line 44 of file graphicsWindow.I. References GraphicsWindow::_properties. |
|
Returns true if the current object is the indicated type exactly.
Definition at line 101 of file typedObject.I. Referenced by PT(), and CollisionNode::xform(). |
|
Returns true if the window has been opened as a fullscreen window, false otherwise.
Definition at line 75 of file graphicsWindow.I. References GraphicsWindow::_pipe, and INLINE. Referenced by GraphicsWindow::clear(), and wdxGraphicsWindow8::create_screen_buffers_and_device(). |
|
|
This function will be called within the draw thread during begin_frame() to ensure the graphics context is ready for drawing.
Reimplemented from GraphicsWindow. Definition at line 421 of file ribGraphicsWindow.cxx. |
|
Definition at line 443 of file ribGraphicsWindow.cxx. |
|
Allocates and returns a temporary DisplayRegion that may be used to render offscreen into. This DisplayRegion is not associated with any layer. To allocate a normal DisplayRegion for rendering, use the interface provided in GraphicsLayer. Definition at line 719 of file graphicsWindow.cxx. Referenced by GraphicsWindow::get_mouse_data(). |
|
Opens the window right now. Called from the window thread. Returns true if the window is successfully opened, or false if there was a problem. Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow. Definition at line 1104 of file graphicsWindow.cxx. |
|
Do whatever processing is necessary to ensure that the window responds to user events. Also, honor any requests recently made via request_properties(). This function is called only within the window thread. Reimplemented in glxGraphicsWindow, wcrGraphicsWindow, and WinGraphicsWindow. Definition at line 931 of file graphicsWindow.cxx. References GraphicsWindow::_channels, GraphicsLayer::_display_regions, GraphicsWindow::_display_regions, GraphicsWindow::_display_regions_stale, GraphicsChannel::_layers, GraphicsWindow::_lock, DisplayRegion::is_active(), GraphicsLayer::is_active(), and GraphicsChannel::is_active(). |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Releases the current GSG pointer, if it is currently held, and resets the GSG to NULL. The window will be permanently unable to render; this is normally called only just before destroying the window. This should only be called from within the draw thread. Reimplemented in glxGraphicsWindow, and wglGraphicsWindow. Definition at line 856 of file graphicsWindow.cxx. Referenced by GraphicsEngine::WindowRenderer::add_gsg(), wglGraphicsWindow::make_current(), and glxGraphicsWindow::make_current(). |
|
Deletes a GraphicsChannel that was previously created via a call to get_channel(). Note that the channel is not actually deleted until all pointers to it are cleared. Definition at line 367 of file graphicsWindow.cxx. References GraphicsWindow::_display_regions, GraphicsWindow::_lock, GraphicsWindow::determine_display_regions(), and NULL. |
|
Requests a property change on the window. For example, use this method to request a window change size or minimize or something. The change is not made immediately; rather, the request is saved and will be applied the next time the window task is run (probably at the next frame). Definition at line 226 of file graphicsWindow.cxx. References GraphicsWindow::_channels, GraphicsWindow::_lock, nassertr, NULL, and PT. |
|
Returns true if the RIB filename template contains the format specification f, which means there will be a separate RIB file generated for each frame.
Definition at line 97 of file ribGraphicsWindow.I. References _image_filename_template, and INLINE. Referenced by begin_frame(). |
|
Sets the clear color to the indicated value. This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless. Definition at line 190 of file clearableRegion.I. References ClearableRegion::_flags, and INLINE. |
|
Toggles the flag that indicates whether the color buffer should be cleared every frame. If this is true, the color buffer will be cleared to the color indicated by set_clear_color(); otherwise, it will be left alone. Definition at line 106 of file clearableRegion.I. References ClearableRegion::_flags, ClearableRegion::F_clear_depth_active, and INLINE. |
|
Sets the clear depth to the indicated value. This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless. Definition at line 232 of file clearableRegion.I. |
|
Toggles the flag that indicates whether the depth buffer should be cleared every frame. If this is true, the depth buffer will be cleared to the depth value indicated by set_clear_depth(); otherwise, it will be left alone. Definition at line 148 of file clearableRegion.I. References ClearableRegion::_clear_color, Colorf, and INLINE. |
|
Specifies the string that defines the filename that will be written to the RIB file as an output filename request. The template may contain any of the format characters descimageed in RIBGraphicsWindow.h. In particular, if it contains f (or some variant), there will be a separate image file generated for each frame; otherwise, all the frames will be written to the same image file, whatever that might mean. This string may also be empty. If it is, no "Display" command will be written to the RIB file, and the renderer will choose whatever output filename is appropriate. Definition at line 134 of file ribGraphicsWindow.I. References GraphicsWindow::_gsg, DCAST, and INLINE. Referenced by end_frame(). |
|
Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status. The window properties are applied immediately, rather than waiting until the next frame. This implies that this method may *only* be called from within the window thread. The properties that have been applied are cleared from the structure by this function; so on return, whatever remains in the properties structure are those that were unchanged for some reason (probably because the underlying interface does not support changing that property on an open window). Reimplemented in glxGraphicsWindow, and WinGraphicsWindow. Definition at line 990 of file graphicsWindow.cxx. Referenced by GraphicsWindow::verify_window_sizes(). |
|
Specifies the string that defines the filename that will be generated for each RIB file output by the GraphicsWindow. The template may contain any of the format characters described in ribGraphicsWindow.h. In particular, if it contains f (or some variant), there will be a separate RIB file generated for each frame; otherwise, all the frames will be written to the same RIB file. Definition at line 47 of file ribGraphicsWindow.I. References _rib_filename_template. Referenced by end_frame(). |
|
Sets the name of the directory into which texture maps are copied to be available to the RIB file.
Definition at line 197 of file ribGraphicsWindow.I. |
|
Specifies the filename extension that texture map files are given when they are copied into the directory for RIB files. This might also imply an image type. The default is "tiff", which implies TIFF files. Definition at line 233 of file ribGraphicsWindow.I. |
|
Changes the name of the event that is generated when this window is modified externally, e.g. to be resized or closed by the user. By default, all windows have the same window event unless they are explicitly changed. When the event is generated, it includes one parameter: the window itself. Definition at line 254 of file graphicsWindow.cxx. |
|
Called by the constructor to initialize whatever internal structures are necessary, given the indicated pipe and requested properties.
Definition at line 148 of file ribGraphicsWindow.cxx. References _current_rib_filename, and _file. Referenced by RIBGraphicsWindow(). |
|
Should be called (from within the window thread) when process_events() detects an external change in some important window property; for instance, when the user resizes the window.
Definition at line 1144 of file graphicsWindow.cxx. |
|
An internal function to update all the channels with the new size of the window. This should always be called before changing the _size members of the _properties structure. Definition at line 1173 of file graphicsWindow.cxx. Referenced by GraphicsWindow::clear(). |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Definition at line 424 of file ribGraphicsWindow.cxx. |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
Determines which of the indicated window sizes are supported by available hardware (e.g. in fullscreen mode). On entry, dimen is an array containing contiguous x,y pairs specifying possible display sizes; it is numsizes*2 words long. The function will zero out any invalid x,y size pairs. The return value is the number of valid sizes that were found. Note this doesn't guarantee a resize attempt will work; you still need to check the return value. (It might be better to implement some sort of query interface that returns an array of supported sizes, but this way is somewhat simpler and will do the job on most cards, assuming they handle the std sizes the app knows about.) Reimplemented in wdxGraphicsWindow8. Definition at line 696 of file graphicsWindow.cxx. References GraphicsWindow::_lock, GraphicsWindow::_rejected_properties, GraphicsWindow::_requested_properties, WindowProperties::add_properties(), WindowProperties::clear(), WindowProperties::is_any_specified(), and GraphicsWindow::set_properties_now(). |
|
Intended to be called when the active state on a nested channel or layer or display region changes, forcing the window to recompute its list of active display regions.
Definition at line 144 of file graphicsWindow.I. |
|
Definition at line 146 of file ribGraphicsWindow.h. Referenced by setup_window(). |
|
Definition at line 147 of file ribGraphicsWindow.h. Referenced by begin_file(), begin_frame(), flush_file(), and setup_window(). |
|
Definition at line 145 of file ribGraphicsWindow.h. Referenced by end_frame(), and flush_file(). |
|
|
Definition at line 141 of file ribGraphicsWindow.h. Referenced by get_rib_filename(), and rib_per_frame(). |
|
Definition at line 143 of file ribGraphicsWindow.h. Referenced by get_rib_filename(). |
|
|
Definition at line 171 of file graphicsWindow.h. Referenced by GraphicsWindow::get_display_region(), GraphicsWindow::get_max_channel_index(), and GraphicsWindow::is_channel_defined(). |
|
Definition at line 174 of file graphicsWindow.h. Referenced by GraphicsWindow::is_fullscreen(), and GraphicsEngine::setup_scene(). |
|
|
Definition at line 140 of file ribGraphicsWindow.h. Referenced by set_rib_filename_template(). |
|
Definition at line 142 of file ribGraphicsWindow.h. Referenced by get_rib_filename_template(). |
|
Reimplemented from GraphicsWindow. Definition at line 29 of file ribGraphicsWindow.cxx. |