39 INLINE
static bool has_texture(
const Filename &filename);
40 INLINE
static bool verify_texture(
const Filename &filename);
42 int primary_file_num_channels = 0,
43 bool read_mipmaps =
false);
46 int primary_file_num_channels = 0,
47 int alpha_file_channel = 0,
48 bool read_mipmaps =
false);
50 int primary_file_num_channels = 0,
51 bool read_mipmaps =
false,
55 int primary_file_num_channels = 0,
56 int alpha_file_channel = 0,
57 bool read_mipmaps =
false,
59 BLOCKING INLINE
static Texture *load_3d_texture(
const Filename &filename_pattern,
60 bool read_mipmaps =
false,
62 BLOCKING INLINE
static Texture *load_2d_texture_array(
const Filename &filename_pattern,
63 bool read_mipmaps =
false,
65 BLOCKING INLINE
static Texture *load_cube_map(
const Filename &filename_pattern,
66 bool read_mipmaps =
false,
69 INLINE
static Texture *get_normalization_cube_map(
int size);
70 INLINE
static Texture *get_alpha_scale_map();
72 INLINE
static void add_texture(
Texture *texture);
73 INLINE
static void release_texture(
Texture *texture);
74 INLINE
static void release_all_textures();
75 INLINE
static void rehash();
77 INLINE
static int garbage_collect();
79 INLINE
static void list_contents(std::ostream &out);
80 INLINE
static void list_contents();
82 INLINE
static Texture *find_texture(
const std::string &name);
85 INLINE
static void set_fake_texture_image(
const Filename &filename);
86 INLINE
static void clear_fake_texture_image();
87 INLINE
static bool has_fake_texture_image();
88 INLINE
static const Filename &get_fake_texture_image();
89 INLINE
static PT(
Texture) make_texture(
const std::string &extension);
91 static void write(std::ostream &out);
94 typedef Texture::MakeTextureFunc MakeTextureFunc;
95 void register_texture_type(MakeTextureFunc *func,
const std::string &extensions);
98 MakeTextureFunc *get_texture_type(
const std::string &extension)
const;
99 void write_texture_types(std::ostream &out,
int indent_level)
const;
106 bool ns_has_texture(
const Filename &orig_filename);
108 int primary_file_num_channels = 0,
109 bool read_mipmaps =
false);
112 int primary_file_num_channels = 0,
113 int alpha_file_channel = 0,
114 bool read_mipmaps =
false);
116 int primary_file_num_channels,
120 const Filename &orig_alpha_filename,
121 int primary_file_num_channels,
122 int alpha_file_channel,
134 Texture *ns_get_normalization_cube_map(
int size);
135 Texture *ns_get_alpha_scale_map();
137 void ns_add_texture(
Texture *texture);
138 void ns_release_texture(
Texture *texture);
139 void ns_release_all_textures();
140 int ns_garbage_collect();
141 void ns_list_contents(std::ostream &out)
const;
142 Texture *ns_find_texture(
const std::string &name)
const;
144 PT(
Texture) ns_make_texture(
const std::string &extension)
const;
146 void resolve_filename(
Filename &new_filename,
const Filename &orig_filename,
151 bool &compressed_cache_record,
153 void report_texture_unreadable(
const Filename &filename)
const;
157 const Filename &orig_alpha_filename,
158 int primary_file_num_channels,
159 int alpha_file_channel,
171 int _primary_file_num_channels = 0;
172 int _alpha_file_channel = 0;
173 Texture::TextureType _texture_type = Texture::TT_2d_texture;
175 INLINE
bool operator < (
const LookupKey &other)
const;
184 PT(
Texture) _normalization_cube_map;
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This class maintains a cache of Bam and/or Txo objects generated from model files and texture images ...
The name of a file, such as a texture file or an Egg file.
Specifies parameters that may be passed to the loader.
A standard mutex, or mutual exclusion lock.
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.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.