#include <hardwareChannel.h>
Inheritance diagram for HardwareChannel:
Public Member Functions | |
HardwareChannel (GraphicsWindow *window) | |
~HardwareChannel (void) | |
virtual void | window_resized (int x, int y) |
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. | |
int | get_id (void) const |
int | get_xorg (void) const |
int | get_yorg (void) const |
int | get_xsize (void) const |
int | get_ysize (void) const |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
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. | |
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 Attributes | |
int | _id |
int | _xorg |
int | _yorg |
int | _xsize |
int | _ysize |
Mutex | _lock |
GraphicsWindow * | _window |
bool | _is_active |
GraphicsLayers | _layers |
Static Private Attributes | |
TypeHandle | _type_handle |
Definition at line 52 of file hardwareChannel.h.
|
Definition at line 87 of file graphicsChannel.h. |
|
Definition at line 40 of file hardwareChannel.cxx. |
|
Definition at line 60 of file hardwareChannel.cxx. |
|
Reimplemented from GraphicsChannel. Definition at line 88 of file hardwareChannel.h. |
|
Reimplemented from GraphicsChannel. Definition at line 77 of file hardwareChannel.h. |
|
Definition at line 29 of file hardwareChannel.I. |
|
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. References GraphicsChannel::_layers, GraphicsChannel::_lock, nassertv, and PT. |
|
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 GraphicsChannel. Definition at line 85 of file hardwareChannel.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. |
|
Definition at line 41 of file hardwareChannel.I. |
|
Definition at line 65 of file hardwareChannel.I. References _ysize. |
|
Definition at line 53 of file hardwareChannel.I. |
|
Definition at line 77 of file hardwareChannel.I. |
|
Reimplemented from GraphicsChannel. Definition at line 80 of file hardwareChannel.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. References GraphicsChannel::_layers, GraphicsChannel::_lock, and NULL. |
|
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. References GraphicsChannel::_lock, and GraphicsChannel::_window. |
|
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 GraphicsChannel::_is_active, GraphicsChannel::_lock, and GraphicsChannel::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(). |
|
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 from GraphicsChannel. Definition at line 77 of file hardwareChannel.cxx. |
|
Definition at line 69 of file hardwareChannel.h. |
|
Definition at line 85 of file graphicsChannel.h. Referenced by GraphicsChannel::GraphicsChannel(), and GraphicsChannel::remove_layer(). |
|
Definition at line 88 of file graphicsChannel.h. Referenced by GraphicsChannel::get_num_layers(), GraphicsChannel::make_layer(), GraphicsChannel::operator=(), and GraphicsWindow::process_events(). |
|
Definition at line 83 of file graphicsChannel.h. Referenced by GraphicsChannel::get_num_layers(), GraphicsChannel::make_layer(), GraphicsChannel::move_layer(), and GraphicsChannel::remove_layer(). |
|
Reimplemented from GraphicsChannel. Definition at line 30 of file hardwareChannel.cxx. |
|
Definition at line 84 of file graphicsChannel.h. Referenced by GraphicsChannel::move_layer(). |
|
Definition at line 70 of file hardwareChannel.h. Referenced by get_id(). |
|
Definition at line 72 of file hardwareChannel.h. Referenced by get_yorg(). |
|
Definition at line 71 of file hardwareChannel.h. Referenced by get_xorg(). |
|
Definition at line 73 of file hardwareChannel.h. Referenced by get_xsize(). |