#include <wglGraphicsWindow.h>
Inheritance diagram for wglGraphicsWindow:
Public Member Functions | |
wglGraphicsWindow (GraphicsPipe *pipe, GraphicsStateGuardian *gsg) | |
virtual | ~wglGraphicsWindow () |
virtual void | make_current () |
This function will be called within the draw thread during begin_frame() to ensure the graphics context is ready for drawing. | |
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 TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
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. | |
virtual LONG | window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
This is the nonstatic window_proc function. | |
virtual bool | handle_mouse_motion (int x, int y) |
virtual void | handle_mouse_exit (void) |
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. | |
virtual bool | begin_frame () |
This function will be called within the draw thread before beginning rendering for a given frame. | |
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 | end_frame () |
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, to finish the exchange of the front and back buffers. | |
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 | |
TypeHandle | get_class_type () |
void | init_type () |
LONG WINAPI | static_window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
This is attached to the window class for all WinGraphicsWindow windows; it is called to handle window events. | |
Protected Types | |
typedef vector_GraphicsWindowInputDevice | InputDevices |
Protected Member Functions | |
virtual void | close_window () |
Closes the window right now. | |
virtual bool | open_window () |
Opens the window right now. | |
virtual void | reconsider_fullscreen_size (DWORD &x_size, DWORD &y_size, DWORD &bitdepth) |
Called before creating a fullscreen window to give the driver a chance to adjust the particular resolution request, if necessary. | |
virtual void | fullscreen_minimized (WindowProperties &properties) |
This is a hook for derived classes to do something special, if necessary, when a fullscreen window has been minimized. | |
virtual void | fullscreen_restored (WindowProperties &properties) |
This is a hook for derived classes to do something special, if necessary, when a fullscreen window has been restored after being minimized. | |
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. | |
virtual void | handle_reshape () |
Called in the window thread when the window size or location is changed, this updates the properties structure accordingly. | |
virtual bool | do_fullscreen_resize (int x_size, int y_size) |
Called in the window thread to resize a fullscreen 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. | |
Protected Attributes | |
HWND | _hWnd |
InputDevices | _input_devices |
Mutex | _input_lock |
PointerTo< GraphicsStateGuardian > | _gsg |
PointerTo< GraphicsPipe > | _pipe |
WindowProperties | _properties |
Static Protected Attributes | |
bool | _loaded_custom_cursor |
HCURSOR | _mouse_cursor |
const char *const | _window_class_name = "WinGraphicsWindow" |
bool | _window_class_registered = false |
Private Member Functions | |
void | setup_colormap (const PIXELFORMATDESCRIPTOR &pixelformat) |
Sets up a colormap for the window matching the selected pixel format. | |
Private Attributes | |
HDC | _hdc |
HPALETTE | _colormap |
Static Private Attributes | |
TypeHandle | _type_handle |
Definition at line 37 of file wglGraphicsWindow.h.
|
Definition at line 169 of file graphicsWindow.h. |
|
Definition at line 140 of file wglGraphicsWindow.cxx. |
|
Definition at line 154 of file wglGraphicsWindow.cxx. References GraphicsWindow::_gsg, _hdc, DCAST_INTO_V, wglGraphicsStateGuardian::get_context(), and GraphicsStateGuardian::reset_if_new(). |
|
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 from WinGraphicsWindow. Definition at line 231 of file wglGraphicsWindow.cxx. References _hdc. |
|
This function will be called within the draw thread before beginning rendering for a given frame. It should do whatever setup is required, and return true if the frame should be rendered, or false if it should be skipped. Reimplemented in wdxGraphicsWindow8, glxGraphicsWindow, and RIBGraphicsWindow. Definition at line 758 of file graphicsWindow.cxx. |
|
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 from WinGraphicsWindow. Definition at line 250 of file wglGraphicsWindow.cxx. |
|
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 in the window thread to resize a fullscreen window.
Reimplemented in wdxGraphicsWindow7, and wdxGraphicsWindow8. Definition at line 467 of file winGraphicsWindow.cxx. References GraphicsWindow::_properties, and DWORD. |
|
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 from GraphicsWindow. Definition at line 389 of file winGraphicsWindow.cxx. |
|
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. |
|
This function will be called within the draw thread after rendering is completed for a given frame. It should do whatever finalization is required. Reimplemented in RIBGraphicsWindow, and wcrGraphicsWindow. Definition at line 818 of file graphicsWindow.cxx. Referenced by RIBGraphicsWindow::begin_frame(). |
|
Reimplemented from WinGraphicsWindow. Definition at line 75 of file wglGraphicsWindow.h. |
|
This is a hook for derived classes to do something special, if necessary, when a fullscreen window has been minimized. The given WindowProperties struct will be applied to this window's properties after this function returns. Definition at line 349 of file winGraphicsWindow.cxx. References WinGraphicsWindow::_hWnd, WindowProperties::set_origin(), and WindowProperties::set_size(). |
|
This is a hook for derived classes to do something special, if necessary, when a fullscreen window has been restored after being minimized. The given WindowProperties struct will be applied to this window's properties after this function returns. Reimplemented in wdxGraphicsWindow7, and wdxGraphicsWindow8. Definition at line 369 of file winGraphicsWindow.cxx. |
|
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 WinGraphicsWindow. Definition at line 64 of file wglGraphicsWindow.h. |
|
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 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(). |
|
Reimplemented from WinGraphicsWindow. Definition at line 72 of file wglGraphicsWindow.h. |
|
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. |
|
Definition at line 1536 of file winGraphicsWindow.cxx. |
|
Reimplemented in wdxGraphicsWindow8. Definition at line 1523 of file winGraphicsWindow.cxx. |
|
Called in the window thread when the window size or location is changed, this updates the properties structure accordingly.
Reimplemented in wdxGraphicsWindow7, and wdxGraphicsWindow8. Definition at line 433 of file winGraphicsWindow.cxx. Referenced by wdxGraphicsWindow8::end_flip(), and WinGraphicsWindow::window_proc(). |
|
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(). |
|
Reimplemented from WinGraphicsWindow. Definition at line 67 of file wglGraphicsWindow.h. Referenced by ConfigureFn(). |
|
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 170 of file wglGraphicsWindow.cxx. References _hdc, NULL, and GraphicsWindow::release_gsg(). |
|
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 from WinGraphicsWindow. Definition at line 269 of file wglGraphicsWindow.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 from GraphicsWindow. Definition at line 139 of file winGraphicsWindow.cxx. |
|
Called before creating a fullscreen window to give the driver a chance to adjust the particular resolution request, if necessary.
Reimplemented from WinGraphicsWindow. Definition at line 327 of file wglGraphicsWindow.cxx. |
|
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 from GraphicsWindow. Definition at line 199 of file wglGraphicsWindow.cxx. |
|
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. |
|
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. |
|
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 from GraphicsWindow. Definition at line 204 of file winGraphicsWindow.cxx. References WinGraphicsWindow::open_fullscreen_window(). |
|
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. |
|
Sets up a colormap for the window matching the selected pixel format. This is necessary before creating a GL context. Definition at line 365 of file wglGraphicsWindow.cxx. References ICD, MCD, OGLDriverType, and Software. |
|
This is attached to the window class for all WinGraphicsWindow windows; it is called to handle window events.
Definition at line 1139 of file winGraphicsWindow.cxx. References get_icon_filename(), get_mono_cursor_filename(), NULL, WinGraphicsWindow::static_window_proc(), and Filename::to_os_specific(). Referenced by WinGraphicsWindow::static_window_proc(). |
|
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(). |
|
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. |
|
This is the nonstatic window_proc function. It is called to handle window events for this particular window. Reimplemented in wdxGraphicsWindow8. Definition at line 744 of file winGraphicsWindow.cxx. References WinGraphicsWindow::_maximized, and WinGraphicsWindow::handle_reshape(). |
|
Definition at line 61 of file wglGraphicsWindow.h. |
|
|
Definition at line 60 of file wglGraphicsWindow.h. Referenced by begin_flip(), make_current(), and ~wglGraphicsWindow(). |
|
Definition at line 116 of file winGraphicsWindow.h. Referenced by WinGraphicsWindow::fullscreen_minimized(). |
|
|
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 35 of file winGraphicsWindow.cxx. |
|
Definition at line 36 of file winGraphicsWindow.cxx. Referenced by WinGraphicsWindow::update_cursor_window(). |
|
Definition at line 174 of file graphicsWindow.h. Referenced by GraphicsWindow::is_fullscreen(), and GraphicsEngine::setup_scene(). |
|
|
Reimplemented from WinGraphicsWindow. Definition at line 31 of file wglGraphicsWindow.cxx. |
|
Definition at line 37 of file winGraphicsWindow.cxx. |
|
Definition at line 38 of file winGraphicsWindow.cxx. |