Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes

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

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
virtual TypeHandle get_type () const
virtual void output (ostream &out) const
virtual PT (Texture) post_load(Texture *tex)
virtual PT (Texture) pre_load(const Filename &orig_filename

Static Public Member Functions

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 LoaderOptions
options
virtual const Filenameorig_alpha_filename
virtual const Filename int primary_file_num_channels
virtual const Filename int int bool read_mipmaps

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 47 of file texturePoolFilter.h.


Member Function Documentation

static void TexturePoolFilter::init_type ( ) [inline, static]

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 TypedObject.

Reimplemented in TxaFileFilter.

Definition at line 65 of file texturePoolFilter.h.

References TypedObject::init_type().

Referenced by TxaFileFilter::init_type().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations