24 return get_ptr()->ns_has_shader(filename);
39 return load_shader(filename) != (
Shader *)NULL;
52 load_shader(const
Filename &filename) {
53 return get_ptr()->ns_load_shader(filename);
66 get_ptr()->ns_add_shader(filename, shader);
80 get_ptr()->ns_release_shader(filename);
91 get_ptr()->ns_release_all_shaders();
104 return get_ptr()->ns_garbage_collect();
115 get_ptr()->ns_list_contents(out);
static void add_shader(const Filename &filename, Shader *shader)
Adds the indicated already-loaded shader to the pool.
static void release_all_shaders()
Releases all shaders in the pool and restores the pool to the empty state.
This is the preferred interface for loading shaders for the TextNode system.
static int garbage_collect()
Releases only those shaders in the pool that have a reference count of exactly 1; i...
The name of a file, such as a texture file or an Egg file.
static bool verify_shader(const Filename &filename)
Loads the given filename up into a shader, if it has not already been loaded, and returns true to ind...
static void release_shader(const Filename &filename)
Removes the indicated shader from the pool, indicating it will never be loaded again; the shader may ...
static void list_contents(ostream &out)
Lists the contents of the shader pool to the indicated output stream.
static bool has_shader(const Filename &filename)
Returns true if the shader has ever been loaded, false otherwise.