#include <textureContext.h>
Inheritance diagram for TextureContext:
Public Member Functions | |
TextureContext (Texture *tex) | |
virtual size_t | estimate_texture_memory () |
Estimates the amount of texture memory that will be consumed by loading this texture. | |
void | mark_dirty (int flags_to_set) |
Marks the context "dirty", i.e. | |
void | clear_dirty_flags (int flags_to_clear=~0) |
Removes the indicated flags from the "dirty" bits. | |
int | get_dirty_flags () const |
Returns the current state of the dirty flags. | |
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. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Public Attributes | |
Texture * | _texture |
Private Attributes | |
int | _dirty_flags |
Static Private Attributes | |
TypeHandle | _type_handle |
Textures typically have an immediate-mode and a retained-mode operation. When using textures in retained-mode (in response to Texture::prepare_texture()), the GSG will create some internal handle for the texture and store it here. The texture stores all of these handles internally.
Definition at line 55 of file textureContext.h.
|
Definition at line 31 of file textureContext.I. References _dirty_flags, and INLINE. |
|
Removes the indicated flags from the "dirty" bits. See mark_dirty(). The value is the union of all the bits that are to be cleared; if a bit is set in the parameter, it will be removed from the dirty set. Bits that are not set in this parameter are left unchanged. This function is intended to be called by the GSG after it has updated the texture parameters. Definition at line 103 of file textureContext.I. Referenced by DXGraphicsStateGuardian8::draw_sphere(). |
|
Estimates the amount of texture memory that will be consumed by loading this texture. This is mainly useful for debugging and reporting purposes. Returns a value in bytes. Definition at line 46 of file textureContext.cxx. References _texture, Texture::FT_linear_mipmap_linear, Texture::FT_linear_mipmap_nearest, Texture::FT_nearest_mipmap_linear, Texture::FT_nearest_mipmap_nearest, and size_t. |
|
Reimplemented from SavedContext. Reimplemented in CRTextureContext, DXTextureContext7, DXTextureContext8, and GLTextureContext. Definition at line 86 of file textureContext.h. |
|
Reimplemented from SavedContext. Reimplemented in CRTextureContext, DXTextureContext7, DXTextureContext8, and GLTextureContext. Definition at line 75 of file textureContext.h. Referenced by GLTextureContext::init_type(), DXTextureContext8::init_type(), DXTextureContext7::init_type(), and CRTextureContext::init_type(). |
|
Returns the current state of the dirty flags. If this is non-zero, it represents the union of all properties that have been changed since the last call to clear_dirty_flags(). This function is intended to be called by the GSG to determine what properties need to be updated. See Texture::DirtyFlags for a list of possible bits. Definition at line 131 of file textureContext.I. Referenced by DXGraphicsStateGuardian8::draw_sphere(). |
|
Reimplemented from SavedContext. Reimplemented in CRTextureContext, DXTextureContext7, DXTextureContext8, and GLTextureContext. Definition at line 83 of file textureContext.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. |
|
This function is declared non-inline to work around a compiler bug in g++ 2.96. Making it inline seems to cause problems in the optimizer. Reimplemented from SavedContext. Reimplemented in CRTextureContext, DXTextureContext7, DXTextureContext8, and GLTextureContext. Definition at line 78 of file textureContext.h. |
|
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(). |
|
|
Marks the context "dirty", i.e. its properties are different from the last time the GSG has seen them. Presumably, the GSG will respond by updating the properties and clearing the dirty bits the next time it renders the texture. The value is the union of all the bits that are to be set dirty; bits that are not set in this parameter are left unchanged. See Texture::DirtyFlags for a list of available bits. Usually this function is not called directly, but rather is called by Texture::mark_dirty() as a result of changing properties directly on the texture. Definition at line 72 of file textureContext.I. References _texture. |
|
Definition at line 71 of file textureContext.h. Referenced by TextureContext(). |
|
Definition at line 64 of file textureContext.h. Referenced by GLGraphicsStateGuardian::bind_texture(), DXGraphicsStateGuardian8::draw_sphere(), estimate_texture_memory(), DXTextureContext8::FillDDSurfTexturePixels(), mark_dirty(), and CRGraphicsStateGuardian::release_geom_node(). |
|
Reimplemented from SavedContext. Reimplemented in CRTextureContext, DXTextureContext7, DXTextureContext8, and GLTextureContext. Definition at line 27 of file textureContext.cxx. |