Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TexturePoolFilter Class Reference

This is an abstract base class, a placeholder for any number of different classes that may wish to implement an effect on every texture loaded from disk via the TexturePool. More...

#include "texturePoolFilter.h"

Inheritance diagram for TexturePoolFilter:
TypedObject MemoryBase TxaFileFilter

Public Member Functions

virtual TypeHandle force_init_type ()
 
virtual TypeHandle get_type () const
 
virtual void output (std::ostream &out) const
 
virtual PT (Texture) post_load(Texture *tex)
 
virtual PT (Texture) pre_load(const Filename &orig_filename
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
int get_best_parent_from_Set (const std::set< int > &) const
 
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_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.
 

Public Attributes

virtual const Filename int int alpha_file_channel
 
virtual const Filename int int bool const LoaderOptionsoptions
 
virtual const Filenameorig_alpha_filename
 
virtual const Filename int primary_file_num_channels
 
virtual const Filename int int bool read_mipmaps
 
- Public Attributes inherited from TypedObject
 get_type
 

Detailed Description

This is an abstract base class, a placeholder for any number of different classes that may wish to implement an effect on every texture loaded from disk via the TexturePool.

In practice, as of the time of this writing, only the TxaFileFilter (in pandatool) actually implements this. But other kinds of filters are possible.

This filter, once registered, will get a callback and a chance to modify each texture as it is loaded from disk the first time. If more than one filter is registered, each will be called in sequence, in the order in which they were registered.

The filter does not get called again if the texture is subsequently reloaded from disk. It is suggested that filters for which this might be a problem should call tex->set_keep_ram_image(true).

Definition at line 42 of file texturePoolFilter.h.

Constructor & Destructor Documentation

◆ ~TexturePoolFilter()

TexturePoolFilter::~TexturePoolFilter ( )
virtual

Definition at line 21 of file texturePoolFilter.cxx.

Member Function Documentation

◆ force_init_type()

virtual TypeHandle TexturePoolFilter::force_init_type ( )
inlinevirtual

Implements TypedObject.

Definition at line 68 of file texturePoolFilter.h.

◆ get_class_type()

static TypeHandle TexturePoolFilter::get_class_type ( )
inlinestatic

Definition at line 57 of file texturePoolFilter.h.

◆ get_type()

virtual TypeHandle TexturePoolFilter::get_type ( ) const
inlinevirtual

Implements TypedObject.

Definition at line 65 of file texturePoolFilter.h.

◆ init_type()

static void TexturePoolFilter::init_type ( )
inlinestatic

Definition at line 60 of file texturePoolFilter.h.

◆ output()

void TexturePoolFilter::output ( std::ostream & out) const
virtual

Definition at line 53 of file texturePoolFilter.cxx.

Member Data Documentation

◆ alpha_file_channel

virtual const Filename int int TexturePoolFilter::alpha_file_channel

Definition at line 49 of file texturePoolFilter.h.

◆ options

virtual const Filename int int bool const LoaderOptions& TexturePoolFilter::options

Definition at line 51 of file texturePoolFilter.h.

◆ orig_alpha_filename

virtual const Filename& TexturePoolFilter::orig_alpha_filename

Definition at line 47 of file texturePoolFilter.h.

◆ primary_file_num_channels

virtual const Filename int TexturePoolFilter::primary_file_num_channels

Definition at line 48 of file texturePoolFilter.h.

◆ read_mipmaps

virtual const Filename int int bool TexturePoolFilter::read_mipmaps

Definition at line 50 of file texturePoolFilter.h.


The documentation for this class was generated from the following files: