19 #include "pandabase.h"
22 #include "config_gobj.h"
23 #include "loaderOptions.h"
26 #include "textureCollection.h"
42 INLINE
static bool has_texture(
const Filename &filename);
43 INLINE
static bool verify_texture(
const Filename &filename);
45 int primary_file_num_channels = 0,
46 bool read_mipmaps =
false,
50 int primary_file_num_channels = 0,
51 int alpha_file_channel = 0,
52 bool read_mipmaps =
false,
54 BLOCKING INLINE
static Texture *load_3d_texture(
const Filename &filename_pattern,
55 bool read_mipmaps =
false,
57 BLOCKING INLINE
static Texture *load_2d_texture_array(
const Filename &filename_pattern,
58 bool read_mipmaps =
false,
60 BLOCKING INLINE
static Texture *load_cube_map(
const Filename &filename_pattern,
61 bool read_mipmaps =
false,
64 INLINE
static Texture *get_normalization_cube_map(
int size);
65 INLINE
static Texture *get_alpha_scale_map();
67 INLINE
static void add_texture(
Texture *texture);
68 INLINE
static void release_texture(
Texture *texture);
69 INLINE
static void release_all_textures();
70 INLINE
static void rehash();
72 INLINE
static int garbage_collect();
74 INLINE
static void list_contents(ostream &out);
75 INLINE
static void list_contents();
77 INLINE
static Texture *find_texture(
const string &name);
80 INLINE
static void set_fake_texture_image(
const Filename &filename);
81 INLINE
static void clear_fake_texture_image();
82 INLINE
static bool has_fake_texture_image();
83 INLINE
static const Filename &get_fake_texture_image();
84 INLINE
static PT(
Texture) make_texture(
const string &extension);
86 static void write(ostream &out);
89 typedef Texture::MakeTextureFunc MakeTextureFunc;
90 void register_texture_type(MakeTextureFunc *func,
const string &extensions);
93 MakeTextureFunc *get_texture_type(
const string &extension)
const;
94 void write_texture_types(ostream &out,
int indent_level)
const;
101 bool ns_has_texture(
const Filename &orig_filename);
103 int primary_file_num_channels,
107 const Filename &orig_alpha_filename,
108 int primary_file_num_channels,
109 int alpha_file_channel,
121 Texture *ns_get_normalization_cube_map(
int size);
122 Texture *ns_get_alpha_scale_map();
124 void ns_add_texture(
Texture *texture);
125 void ns_release_texture(
Texture *texture);
126 void ns_release_all_textures();
127 int ns_garbage_collect();
128 void ns_list_contents(ostream &out)
const;
129 Texture *ns_find_texture(
const string &name)
const;
131 PT(
Texture) ns_make_texture(
const string &extension)
const;
133 void resolve_filename(
Filename &new_filename,
const Filename &orig_filename,
138 bool &compressed_cache_record,
140 void report_texture_unreadable(
const Filename &filename)
const;
144 const Filename &orig_alpha_filename,
145 int primary_file_num_channels,
146 int alpha_file_channel,
162 PT(
Texture) _normalization_cube_map;
172 #include "texturePool.I"
Specifies parameters that may be passed to the loader.
This class maintains a cache of Bam and/or Txo objects generated from model files and texture images ...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
A standard mutex, or mutual exclusion lock.
The name of a file, such as a texture file or an Egg file.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
Manages a list of Texture objects, as returned by TexturePool::find_all_textures().
This is an abstract base class, a placeholder for any number of different classes that may wish to im...
This is the preferred interface for loading textures from image files.