#include <graphicsChannel.h>
Inheritance diagram for GraphicsChannel:
Public Member Functions | |
GraphicsChannel (GraphicsWindow *window) | |
This is public just so derived window types can easily call it. | |
virtual | ~GraphicsChannel () |
GraphicsLayer * | make_layer (int index=-1) |
Creates a new GraphicsLayer, associated with the window, at the indicated index position. | |
int | get_num_layers () const |
Returns the number of layers currently associated with the channel. | |
GraphicsLayer * | get_layer (int index) const |
Returns the nth layer associated with the channel. | |
void | move_layer (int from_index, int to_index) |
Changes the ordering of the layers so that the indicated layer will move to the indicated position. | |
void | remove_layer (int index) |
Removes the nth layer. | |
GraphicsWindow * | get_window () const |
Returns the GraphicsWindow that this channel is associated with. | |
GraphicsPipe * | get_pipe () const |
Returns the GraphicsPipe that this channel is ultimately associated with, or NULL if no pipe is associated. | |
void | set_active (bool active) |
Sets the active flag on the channel. | |
bool | is_active () const |
Returns the active flag on the channel. | |
virtual void | window_resized (int x_size, int y_size) |
This is called whenever the parent window has been resized; it should do whatever needs to be done to adjust the channel to account for it. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
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. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Protected Types | |
typedef pvector< PointerTo< GraphicsLayer > > | GraphicsLayers |
Protected Member Functions | |
GraphicsChannel () | |
Protected Attributes | |
Mutex | _lock |
GraphicsWindow * | _window |
bool | _is_active |
GraphicsLayers | _layers |
Private Member Functions | |
GraphicsChannel (const GraphicsChannel ©) | |
void | operator= (const GraphicsChannel ©) |
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. | |
Static Private Attributes | |
TypeHandle | _type_handle |
Friends | |
class | GraphicsWindow |
class | GraphicsLayer |
Typically there is exactly one channel per window, but some implementations (e.g. SGI) support potentially several different video channel ports connected to different parts within a window.
Definition at line 51 of file graphicsChannel.h.
|
Definition at line 87 of file graphicsChannel.h. |
|
Definition at line 40 of file graphicsChannel.cxx. References _is_active. |
|
This is public just so derived window types can easily call it. Don't call it directly; instead, use GraphicsWindow::get_channel() to get a channel. Definition at line 58 of file graphicsChannel.cxx. |
|
Definition at line 72 of file graphicsChannel.cxx. |
|
Definition at line 96 of file graphicsChannel.cxx. |
|
Reimplemented from TypedReferenceCount. Reimplemented in HardwareChannel. Definition at line 102 of file graphicsChannel.h. |
|
Reimplemented from TypedReferenceCount. Reimplemented in HardwareChannel. Definition at line 91 of file graphicsChannel.h. |
|
Returns the nth layer associated with the channel.
Definition at line 170 of file graphicsChannel.cxx. |
|
Returns the number of layers currently associated with the channel.
Definition at line 156 of file graphicsChannel.cxx. |
|
Returns the GraphicsPipe that this channel is ultimately associated with, or NULL if no pipe is associated.
Definition at line 268 of file graphicsChannel.cxx. Referenced by GraphicsLayer::remove_dr(). |
|
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(). |
|
Reimplemented from TypedReferenceCount. Reimplemented in HardwareChannel. Definition at line 99 of file graphicsChannel.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 GraphicsWindow that this channel is associated with. It is possible that the GraphicsWindow might have been deleted while an outstanding PT(GraphicsChannel) prevented all of its children channels from also being deleted; in this unlikely case, get_window() may return NULL. Definition at line 250 of file graphicsChannel.cxx. |
|
Reimplemented from TypedReferenceCount. Reimplemented in HardwareChannel. Definition at line 94 of file graphicsChannel.h. |
|
Returns the active flag on the channel.
Definition at line 32 of file graphicsChannel.I. Referenced by GraphicsWindow::process_events(). |
|
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(). |
|
|
Creates a new GraphicsLayer, associated with the window, at the indicated index position. If the index position negative or past the end of the array, the end of the array is assumed. The layers will be rendered on top of each other, in increasing order by index, from back to front. Definition at line 134 of file graphicsChannel.cxx. |
|
Changes the ordering of the layers so that the indicated layer will move to the indicated position. If to_index is negative or past the end of the array, the end of the array is assumed. Definition at line 193 of file graphicsChannel.cxx. |
|
Definition at line 84 of file graphicsChannel.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(). |
|
Removes the nth layer. This changes the numbers of all subsequent layers. Definition at line 225 of file graphicsChannel.cxx. References _is_active, _lock, and win_display_regions_changed(). |
|
Sets the active flag on the channel. If the channel is marked as inactive, nothing will be rendered. Definition at line 284 of file graphicsChannel.cxx. |
|
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(). |
|
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. It is assumed the lock is already held. Definition at line 335 of file graphicsChannel.cxx. Referenced by GraphicsLayer::get_window(), and remove_layer(). |
|
This is called whenever the parent window has been resized; it should do whatever needs to be done to adjust the channel to account for it.
Reimplemented in HardwareChannel. Definition at line 305 of file graphicsChannel.cxx. Referenced by GraphicsWindow::begin_flip(). |
|
Definition at line 108 of file graphicsChannel.h. |
|
Definition at line 107 of file graphicsChannel.h. |
|
Definition at line 85 of file graphicsChannel.h. Referenced by GraphicsChannel(), and remove_layer(). |
|
Definition at line 88 of file graphicsChannel.h. Referenced by get_num_layers(), make_layer(), operator=(), and GraphicsWindow::process_events(). |
|
Definition at line 83 of file graphicsChannel.h. Referenced by get_num_layers(), make_layer(), move_layer(), and remove_layer(). |
|
Reimplemented from TypedReferenceCount. Reimplemented in HardwareChannel. Definition at line 30 of file graphicsChannel.cxx. |
|
Definition at line 84 of file graphicsChannel.h. Referenced by move_layer(). |