#include <texture.h>
Inheritance diagram for Texture:
Public Types | |
enum | FilterType { FT_nearest, FT_linear, FT_nearest_mipmap_nearest, FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, FT_linear_mipmap_linear, FT_invalid } |
enum | WrapMode { WM_clamp, WM_repeat, WM_mirror, WM_mirror_once, WM_border_color, WM_invalid } |
enum | DirtyFlags { DF_image = 0x001, DF_wrap = 0x002, DF_filter = 0x004, DF_mipmap = 0x008 } |
Public Member Functions | |
Texture () | |
Texture (int xsize, int ysize, int components, int component_width, PixelBuffer::Type type, PixelBuffer::Format format, bool bAllocateRAM) | |
~Texture () | |
bool | read (const Filename &fullpath, int primary_file_num_channels=0) |
Reads the texture from the indicated filename. | |
bool | read (const Filename &fullpath, const Filename &alpha_fullpath, int primary_file_num_channels=0, int alpha_file_channel=0) |
Combine a 3-component image with a grayscale image to get a 4-component image. | |
bool | write (const Filename &fullpath="") const |
Writes the texture to the indicated filename. | |
void | set_wrapu (WrapMode wrap) |
void | set_wrapv (WrapMode wrap) |
void | set_minfilter (FilterType filter) |
void | set_magfilter (FilterType filter) |
void | set_anisotropic_degree (int anisotropic_degree) |
Specifies the level of anisotropic filtering to apply to the texture. | |
void | set_border_color (const Colorf &color) |
WrapMode | get_wrapu () const |
WrapMode | get_wrapv () const |
FilterType | get_minfilter () const |
FilterType | get_magfilter () const |
int | get_anisotropic_degree () const |
Returns the degree of anisotropic filtering that should be applied to the texture. | |
bool | uses_mipmaps () const |
Returns true if the minfilter settings on this texture require the use of mipmapping, false otherwise. | |
bool | load (const PNMImage &pnmimage) |
Creates the texture from the already-read PNMImage. | |
bool | store (PNMImage &pnmimage) const |
Saves the texture to the indicated PNMImage, but does not write it to disk. | |
TextureContext * | prepare (GraphicsStateGuardianBase *gsg) |
Creates a context for the texture on the particular GSG, if it does not already exist. | |
void | unprepare () |
Frees the context allocated on all GSG's for which the texture has been declared. | |
void | unprepare (GraphicsStateGuardianBase *gsg) |
Frees the texture context only on the indicated GSG, if it exists there. | |
void | clear_gsg (GraphicsStateGuardianBase *gsg) |
Removes the indicated GSG from the Texture's known GSG's, without actually releasing the texture on that GSG. | |
bool | has_ram_image () const |
PixelBuffer * | get_ram_image () |
Returns the PixelBuffer associated with the texture. | |
void | set_keep_ram_image (bool keep_ram_image) |
Sets the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. | |
bool | get_keep_ram_image () const |
Returns the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. | |
void | apply (GraphicsStateGuardianBase *gsg) |
virtual void | copy (GraphicsStateGuardianBase *gsg, const DisplayRegion *dr) |
virtual void | copy (GraphicsStateGuardianBase *gsg, const DisplayRegion *dr, const RenderBuffer &rb) |
void | mark_dirty (int flags_to_set) |
Sets the indicated dirty bits on for all texture contexts that share this Texture. | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
virtual void | config (void) |
bool | has_filename () const |
Returns true if the filename has been set and is available. | |
const Filename & | get_filename () const |
Returns the filename that has been set. | |
bool | has_alpha_filename () const |
Returns true if the alpha_filename has been set and is available. | |
const Filename & | get_alpha_filename () const |
Returns the alpha_filename that has been set. | |
bool | has_fullpath () const |
Returns true if the fullpath has been set and is available. | |
const Filename & | get_fullpath () const |
Returns the fullpath that has been set. | |
bool | has_alpha_fullpath () const |
Returns true if the alpha_fullpath has been set and is available. | |
const Filename & | get_alpha_fullpath () const |
Returns the alpha_fullpath that has been set. | |
void | set_filename (const Filename &filename) |
Sets the name of the file that contains the image's contents. | |
void | clear_filename () |
Removes the alpha filename, if it was previously set. | |
void | set_alpha_filename (const Filename &alpha_filename) |
Sets the name of the file that contains the image's alpha channel contents. | |
void | clear_alpha_filename () |
Removes the alpha filename, if it was previously set. | |
void | set_fullpath (const Filename &fullpath) |
Sets the full pathname to the file that contains the image's contents, as found along the search path. | |
void | clear_fullpath () |
Removes the alpha fullpath, if it was previously set. | |
void | set_alpha_fullpath (const Filename &alpha_fullpath) |
Sets the full pathname to the file that contains the image's alpha channel contents, as found along the search path. | |
void | clear_alpha_fullpath () |
Removes the alpha fullpath, if it was previously set. | |
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 | check_config () const |
bool | is_dirty (void) const |
void | make_dirty (void) |
virtual int | complete_pointers (TypedWritable **p_list, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). | |
virtual void | finalize () |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed. | |
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. | |
void | set_name (const string &name) |
void | clear_name () |
Resets the Namable's name to empty. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
const string & | get_name () const |
void | output (ostream &out) const |
Outputs the Namable. | |
Static Public Member Functions | |
bool | is_mipmap (FilterType type) |
Returns true if the indicated filter type requires the use of mipmaps, or false if it does not. | |
WrapMode | string_wrap_mode (const string &string) |
Returns the WrapMode value associated with the given string representation, or WM_invalid if the string does not match any known WrapMode value. | |
FilterType | string_filter_type (const string &string) |
Returns the FilterType value associated with the given string representation, or FT_invalid if the string does not match any known FilterType value. | |
void | register_with_read_factory (void) |
Factory method to generate a Texture object. | |
TypedWritable * | make_Texture (const FactoryParams ¶ms) |
Factory method to generate a Texture object. | |
TypeHandle | get_class_type () |
void | init_type () |
Public Attributes | |
PointerTo< PixelBuffer > | _pbuffer |
Static Public Attributes | |
TypedWritable *const | Null = (TypedWritable*)0L |
Protected Member Functions | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place. | |
Protected Attributes | |
int | _primary_file_num_channels |
int | _alpha_file_channel |
Private Types | |
typedef pmap< GraphicsStateGuardianBase *, TextureContext * > | Contexts |
Private Attributes | |
WrapMode | _wrapu |
WrapMode | _wrapv |
FilterType | _minfilter |
FilterType | _magfilter |
int | _anisotropic_degree |
bool | _keep_ram_image |
Colorf | _border_color |
Contexts | _contexts |
int | _all_dirty_flags |
Static Private Attributes | |
TypeHandle | _type_handle |
Friends | |
class | TextureContext |
Definition at line 42 of file texture.h.
|
|
|
|
|
Definition at line 44 of file texture.h. Referenced by DXGraphicsStateGuardian8::draw_sphere(), get_minfilter(), get_wrapv(), and string_wrap_mode(). |
|
Definition at line 72 of file texture.h. Referenced by DXGraphicsStateGuardian8::draw_sphere(), get_wrapu(), and string_wrap_mode(). |
|
Definition at line 155 of file texture.cxx. References _all_dirty_flags, _anisotropic_degree, _border_color, _keep_ram_image, _magfilter, _minfilter, _pbuffer, _wrapu, _wrapv, Colorf, FT_nearest, and WM_repeat. |
|
Definition at line 177 of file texture.cxx. References Filename::get_basename_wo_extension(), Namable::has_name(), PNMImage::read(), and Namable::set_name(). |
|
Definition at line 199 of file texture.cxx. References ImageBuffer::clear_alpha_filename(), and ImageBuffer::set_filename(). |
|
|
|
Definition at line 70 of file writableConfigurable.h. References PUBLISHED. Referenced by Geom::set_lengths(). |
|
Removes the alpha filename, if it was previously set. See set_alpha_filename(). Definition at line 247 of file imageBuffer.I. Referenced by ~Texture(). |
|
Removes the alpha fullpath, if it was previously set. See set_alpha_fullpath(). Definition at line 317 of file imageBuffer.I. |
|
Removes the alpha filename, if it was previously set. See set_filename(). Definition at line 196 of file imageBuffer.I. References ImageBuffer::_fullpath, and INLINE. |
|
Removes the alpha fullpath, if it was previously set. See set_fullpath(). Definition at line 281 of file imageBuffer.I. |
|
Removes the indicated GSG from the Texture's known GSG's, without actually releasing the texture on that GSG. This is intended to be called only from GSG::release_texture(); it should never be called by user code. Definition at line 638 of file texture.cxx. |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). Returns the number of pointers processed. This is the callback function that is made by the BamReader at some later point, after all of the required pointers have been filled in. It is necessary because there might be forward references in a bam file; when we call read_pointer() in fillin(), the object may not have been read from the file yet, so we do not have a pointer available at that time. Thus, instead of returning a pointer, read_pointer() simply reserves a later callback. This function provides that callback. The calling object is responsible for keeping track of the number of times it called read_pointer() and extracting the same number of pointers out of the supplied vector, and storing them appropriately within the object. Reimplemented in AnimBundleNode, AnimGroup, PartBundleNode, PartGroup, Character, CharacterJoint, CollisionNode, GeomSprite, PiecewiseCurve, ClipPlaneAttrib, FogAttrib, LensNode, LightAttrib, MaterialAttrib, RenderEffects, RenderState, TextureAttrib, Person, and Child. Definition at line 94 of file typedWritable.cxx. Referenced by RenderState::do_invert_compose(). |
|
Reimplemented from WritableConfigurable. Reimplemented in PixelBuffer. Definition at line 49 of file imageBuffer.h. References INLINE, and PUBLISHED. Referenced by PixelBuffer::operator=(). |
|
Implements ImageBuffer. Definition at line 721 of file texture.cxx. |
|
Implements ImageBuffer. Definition at line 717 of file texture.cxx. |
|
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place.
Reimplemented from ImageBuffer. Definition at line 935 of file texture.cxx. |
|
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
Reimplemented in PartBundle, RenderAttrib, RenderEffect, RenderEffects, RenderState, and TransformState. Definition at line 112 of file typedWritable.cxx. Referenced by BamReader::skip_pointer(). |
|
Reimplemented from ImageBuffer. |
|
Returns the alpha_filename that has been set. If this is set, it represents the name of the alpha component, which is stored in a separate file. See also get_filename(), and get_alpha_fullpath(). Definition at line 85 of file imageBuffer.I. References ImageBuffer::_fullpath, and INLINE. Referenced by EggGroupNode::remove_child(), and ImageBuffer::~ImageBuffer(). |
|
Returns the alpha_fullpath that has been set. This is the full path to the alpha part of the image file as it was found along the texture search path. Definition at line 151 of file imageBuffer.I. References ImageBuffer::_alpha_filename, and INLINE. Referenced by unprepare(), and ImageBuffer::~ImageBuffer(). |
|
Returns the degree of anisotropic filtering that should be applied to the texture. Normally, this is 1, to indicate that anisotropic filtering should be disabled. If this is a number higher than 1, anisotropic filtering should be enabled (if the rendering backend supports it). Definition at line 90 of file texture.I. Referenced by DXGraphicsStateGuardian8::draw_sphere(). |
|
Reimplemented from ImageBuffer. |
|
Returns the filename that has been set. This is the name of the file as it was requested. Also see get_fullpath(). Definition at line 51 of file imageBuffer.I. References ImageBuffer::_alpha_filename. Referenced by TexturePool::ns_add_texture(), PixelBuffer::read(), EggGroupNode::remove_child(), and ImageBuffer::~ImageBuffer(). |
|
Returns the fullpath that has been set. This is the full path to the file as it was found along the texture search path. Definition at line 117 of file imageBuffer.I. References ImageBuffer::_filename, and INLINE. Referenced by unprepare(), and ImageBuffer::~ImageBuffer(). |
|
Returns the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. See set_keep_ram_image(). |
|
Definition at line 67 of file texture.I. References _anisotropic_degree, and INLINE. Referenced by DXGraphicsStateGuardian8::draw_sphere(), and CRGraphicsStateGuardian::get_internal_coordinate_system(). |
|
Definition at line 55 of file texture.I. References _magfilter, FilterType, and INLINE. Referenced by CRGraphicsStateGuardian::get_internal_coordinate_system(). |
|
|
Returns the PixelBuffer associated with the texture. If the PixelBuffer does not currently have an associated RAM image, and the texture was generated by loading an image from a disk file (the most common case), this forces the reload of the same texture. This can happen if keep_texture_ram is configured to false, and we have previously prepared this texture with a GSG. Note that it is not correct to call has_ram_image() first to test whether this function will fail. A false return value from has_ram_image() indicates only that get_ram_image() may need to reload the texture from disk, which it will do automatically. On the other hand, it is possible that the texture cannot be found on disk or is otherwise unavailable. If that happens, this function returns NULL. There is no way to predict whether get_ram_image() will return NULL without calling it first. Definition at line 697 of file texture.cxx. References FT_linear_mipmap_linear. Referenced by GLGraphicsStateGuardian::begin_bind_clip_planes(), CRGraphicsStateGuardian::set_blend_mode(), GLGraphicsStateGuardian::set_draw_buffer(), and CRGraphicsStateGuardian::set_read_buffer(). |
|
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 ImageBuffer. |
|
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. |
|
Definition at line 31 of file texture.I. References _wrapv, INLINE, and WrapMode. Referenced by DXGraphicsStateGuardian8::draw_sphere(), and CRGraphicsStateGuardian::get_internal_coordinate_system(). |
|
Definition at line 43 of file texture.I. References _minfilter, FilterType, and INLINE. Referenced by DXGraphicsStateGuardian8::draw_sphere(), and CRGraphicsStateGuardian::get_internal_coordinate_system(). |
|
Returns true if the alpha_filename has been set and is available. See set_alpha_filename(). Definition at line 66 of file imageBuffer.I. References ImageBuffer::_fullpath, Filename::empty(), and INLINE. Referenced by EggGroupNode::remove_child(). |
|
Returns true if the alpha_fullpath has been set and is available. See set_alpha_fullpath(). Definition at line 132 of file imageBuffer.I. References ImageBuffer::_filename, and INLINE. Referenced by unprepare(). |
|
Returns true if the filename has been set and is available. See set_filename(). Definition at line 34 of file imageBuffer.I. References ImageBuffer::_filename, and INLINE. Referenced by read(), and unprepare(). |
|
Returns true if the fullpath has been set and is available. See set_fullpath(). Definition at line 100 of file imageBuffer.I. References ImageBuffer::_alpha_fullpath, and INLINE. |
|
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 97 of file namable.I. References Namable::get_name(), and INLINE. Referenced by EggGroupUniquifier::EggGroupUniquifier(), read(), and Texture(). |
|
Referenced by unprepare(). |
|
Reimplemented from ImageBuffer. |
|
Definition at line 82 of file writableConfigurable.h. Referenced by Geom::get_texcoords(), and dDrawable::~dDrawable(). |
|
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 indicated filter type requires the use of mipmaps, or false if it does not.
Definition at line 514 of file texture.cxx. |
|
|
Creates the texture from the already-read PNMImage.
Definition at line 479 of file texture.cxx. References _all_dirty_flags, _keep_ram_image, _pbuffer, PointerTo< PixelBuffer >::clear(), Namable::get_name(), and keep_texture_ram. |
|
Definition at line 83 of file writableConfigurable.h. Referenced by GeomSphere::draw_immediate(), Geom::get_coords_index(), GeomTri::get_tris(), PixelBuffer::set_size(), PixelBuffer::set_xorg(), PixelBuffer::set_ysize(), PixelBuffer::stencil_buffer(), Geom::transform_vertices(), and GeomLine::write_datagram(). |
|
Factory method to generate a Texture object.
Definition at line 858 of file texture.cxx. |
|
Sets the indicated dirty bits on for all texture contexts that share this Texture. Does not change the bits that are not on. This presumably will inform the GSG that the texture properties have changed. See also TextureContext::mark_dirty(). Normally, this does not need to be called directly; changing the properties on the texture will automatically call this. However, if you fiddle with the texture image directly, for instance by meddling with the _pbuffer member, you may need to explicitly call mark_dirty(Texture::DF_image). Definition at line 757 of file texture.cxx. Referenced by set_wrapu(), and set_wrapv(). |
|
Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. Reimplemented in BuilderBucket, AnimBundle, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimGroup, PartBundle, CollisionNode, ButtonNode, HermiteCurve, RopeNode, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, PandaNode, PlaneNode, MouseWatcher, and MouseWatcherRegion. |
|
Creates a context for the texture on the particular GSG, if it does not already exist. Returns the new (or old) TextureContext. Definition at line 540 of file texture.cxx. Referenced by SomeViz::DisplayTexture(), BaseViz::DisplayTexture(), and unprepare(). |
|
Combine a 3-component image with a grayscale image to get a 4-component image.
Definition at line 259 of file texture.cxx. |
|
Reads the texture from the indicated filename. If num_channels is not 0, it specifies the number of components to downgrade the image to if it is greater than this number. Definition at line 218 of file texture.cxx. References consider_rescale(), Filename::get_basename(), Filename::get_basename_wo_extension(), Namable::get_name(), PNMImageHeader::get_x_size(), PNMImageHeader::get_y_size(), ImageBuffer::has_filename(), Namable::has_name(), PNMImage::read(), ImageBuffer::set_alpha_filename(), ImageBuffer::set_alpha_fullpath(), ImageBuffer::set_filename(), ImageBuffer::set_fullpath(), and Namable::set_name(). Referenced by WindowFramework::set_background_type(), and unprepare(). |
|
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(). |
|
Factory method to generate a Texture object.
Definition at line 845 of file texture.cxx. References _pbuffer, and Datagram::add_uint8(). |
|
Sets the name of the file that contains the image's alpha channel contents. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). The ImageBuffer's get_filename() function returns the name of the image file that was loaded into the buffer. In the case where a texture specified two separate files to load, a 1- or 3-channel color image and a 1-channel alpha image, this Filename is update to contain the name of the image file that was loaded into the buffer's alpha channel. Definition at line 232 of file imageBuffer.I. Referenced by read(), and EggGroupNode::remove_child(). |
|
Sets the full pathname to the file that contains the image's alpha channel contents, as found along the search path. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). Definition at line 302 of file imageBuffer.I. Referenced by read(). |
|
Specifies the level of anisotropic filtering to apply to the texture. Normally, this is 1, to indicate anisotropic filtering is disabled. This may be set to a number higher than one to enable anisotropic filtering, if the rendering backend supports this. Definition at line 451 of file texture.cxx. References FT_linear_mipmap_linear, FT_linear_mipmap_nearest, and FT_nearest_mipmap_linear. |
|
Definition at line 466 of file texture.cxx. References _contexts, and GraphicsStateGuardianBase::prepare_texture(). |
|
Sets the name of the file that contains the image's contents. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). The ImageBuffer's get_name() function used to return the filename, but now returns just the basename (without the extension), which is a more useful name for identifying an image in show code. Definition at line 181 of file imageBuffer.I. References ImageBuffer::_fullpath, and INLINE. Referenced by read(), EggGroupNode::remove_child(), and ~Texture(). |
|
Sets the full pathname to the file that contains the image's contents, as found along the search path. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). Definition at line 266 of file imageBuffer.I. Referenced by read(). |
|
Sets the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. This will be true for most textures, which can reload their images if needed by rereading the input file. However, textures that were generated dynamically and cannot be easily reloaded will want to set this flag to true, so that the _pbuffer member will always keep its image copy around. |
|
Definition at line 427 of file texture.cxx. Referenced by WindowFramework::set_background_type(). |
|
Definition at line 408 of file texture.cxx. References _border_color, and Colorf. Referenced by WindowFramework::set_background_type(). |
|
Definition at line 69 of file namable.I. References Namable::_name. Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), read(), PandaNode::reparent(), and Texture(). |
|
Definition at line 378 of file texture.cxx. References _magfilter, DF_filter, and mark_dirty(). |
|
Definition at line 393 of file texture.cxx. References _anisotropic_degree, DF_filter, and mark_dirty(). Referenced by EggLoader::apply_texture_attributes(). |
|
Saves the texture to the indicated PNMImage, but does not write it to disk.
Definition at line 499 of file texture.cxx. References _contexts. |
|
Returns the FilterType value associated with the given string representation, or FT_invalid if the string does not match any known FilterType value.
Definition at line 815 of file texture.cxx. References _pbuffer. |
|
Returns the WrapMode value associated with the given string representation, or WM_invalid if the string does not match any known WrapMode value.
Definition at line 786 of file texture.cxx. References _anisotropic_degree, _magfilter, _minfilter, _pbuffer, _wrapu, _wrapv, FilterType, PixelBuffer::Format, DatagramIterator::get_bool(), DatagramIterator::get_int16(), DatagramIterator::get_uint8(), NULL, and WrapMode. |
|
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(). |
|
Frees the texture context only on the indicated GSG, if it exists there.
Definition at line 612 of file texture.cxx. References GraphicsStateGuardianBase::copy_texture(), and prepare(). |
|
Frees the context allocated on all GSG's for which the texture has been declared.
Definition at line 582 of file texture.cxx. References _pbuffer, ImageBuffer::get_alpha_fullpath(), ImageBuffer::get_fullpath(), Namable::get_name(), ImageBuffer::has_alpha_fullpath(), ImageBuffer::has_filename(), has_ram_image(), NULL, and read(). |
|
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(). |
|
Returns true if the minfilter settings on this texture require the use of mipmapping, false otherwise.
Definition at line 107 of file texture.I. References _pbuffer, and INLINE. Referenced by CRGraphicsStateGuardian::bind_texture(), and GLGraphicsStateGuardian::set_draw_buffer(). |
|
Writes the texture to the indicated filename.
Definition at line 355 of file texture.cxx. |
|
Function to write the important information in the particular object to a Datagram.
Reimplemented from ImageBuffer. Definition at line 977 of file texture.cxx. |
|
|
|
|
|
Definition at line 93 of file imageBuffer.h. |
|
Definition at line 149 of file texture.h. Referenced by get_magfilter(), set_wrapv(), string_wrap_mode(), and Texture(). |
|
Definition at line 151 of file texture.h. Referenced by set_minfilter(), and Texture(). |
|
Definition at line 158 of file texture.h. Referenced by set_border_color(), and store(). |
|
|
|
Definition at line 148 of file texture.h. Referenced by get_minfilter(), set_wrapu(), string_wrap_mode(), and Texture(). |
|
Definition at line 147 of file texture.h. Referenced by get_wrapv(), string_wrap_mode(), and Texture(). |
|
Definition at line 168 of file texture.h. Referenced by GLGraphicsStateGuardian::begin_bind_lights(), load(), motion_display_func(), TexturePool::ns_garbage_collect(), register_with_read_factory(), CRGraphicsStateGuardian::release_geom_node(), string_filter_type(), string_wrap_mode(), Texture(), unprepare(), uses_mipmaps(), and Spotlight::write(). |
|
Definition at line 87 of file imageBuffer.h. |
|
Reimplemented from ImageBuffer. Definition at line 36 of file texture.cxx. |
|
Definition at line 145 of file texture.h. Referenced by string_wrap_mode(), and Texture(). |
|
Definition at line 146 of file texture.h. Referenced by get_wrapu(), string_wrap_mode(), and Texture(). |
|
Definition at line 25 of file typedWritable.cxx. Referenced by Child::complete_pointers(), Parent::complete_pointers(), Person::complete_pointers(), LoaderFileTypeBam::get_extension(), PartGroup::pick_channel_index(), BamReader::read_pointer(), and AnimGroup::write_datagram(). |