zenilib
0.5.3.0
|
A Texture Database Singleton. More...
#include <Textures.h>
Inherits Zeni::Singleton< Textures >, and Zeni::Database< Texture >.
Public Member Functions | |
void | apply_Texture (const String &name) |
Apply a texture for upcoming polygons (Called by Video::apply_Texture) More... | |
void | apply_Texture (const unsigned long &id) |
Apply a texture for upcoming polygons. More... | |
int | get_current_frame (const unsigned long &id) |
Get the currently selected frame number for a Sprite. More... | |
int | get_num_frames (const unsigned long &id) |
Get the number of frames; returns 0 if it is not a Sprite. More... | |
bool | is_Sprite (const unsigned long &id) |
Does this id point to a Sprite. More... | |
void | set_current_frame (const unsigned long &id, const int &frame_number) |
Set the frame number for a Sprite. More... | |
![]() | |
void | fax_post_reinit (Event::Handler *const &handler) |
void | fax_pre_uninit (Event::Handler *const &handler) |
void | give_post_reinit (Event::Handler *const &handler) |
void | give_pre_uninit (Event::Handler *const &handler) |
void | lend_post_reinit (Event::Handler *const &handler) |
void | lend_pre_uninit (Event::Handler *const &handler) |
![]() | |
Database (const String &filename, const String &xml_identifier) | |
virtual | ~Database () |
void | clear (const String &name, const String &filename="") |
Clear an entry. More... | |
void | clear () |
Permanently clear all resources. More... | |
unsigned long | find (const String &name) const |
Get an id by name, without throwing an Error. More... | |
bool | find (const unsigned long &id) const |
Check to see that an id is valid. More... | |
unsigned long | get_id (const String &name) const |
Get an id by name, possibly throwing an Error. More... | |
unsigned long | give (const String &name, Texture *const &type, const bool &keep, const String &filename="") |
Add an entry (which it will later delete) More... | |
unsigned long | lend (const String &name, Texture *const &type, const bool &keep) |
Add an entry (which it will NEVER delete) More... | |
void | load_file (const String &filename) |
Load all resources from a given file, giving them highest priority. More... | |
void | lose_resources () |
Wipe losable resources and prepare to reload them when they are next needed. More... | |
const bool & | lost_resources () |
Check to see if resources have been lost. More... | |
Texture & | operator[] (const String &name) const |
Get a TYPE by name. More... | |
Texture & | operator[] (const unsigned long &id) const |
Get a TYPE by id. More... | |
void | reload () |
lose_resources + init More... | |
void | unload_file (const String &filename) |
Unload all resources from a given file, reloading lower priority resources. More... | |
void | unlose_resources () |
If resources have been lost, then reload them. More... | |
Static Public Member Functions | |
static int | get_anisotropic_filtering () |
Check the current level of anisotropy. More... | |
static bool | get_bilinear_filtering () |
Check if bilinear filtering is in use. More... | |
static bool | get_lazy_loading () |
static bool | get_mipmapping () |
Check if mipmapping is in use. More... | |
static bool | get_trilinear_filtering () |
Check if trilinear filtering (the combination of bilinear filtering and mipmapping) is in use. More... | |
static void | set_lazy_loading (const bool &lazy_loading=true) |
Set whether Textures should use lazy loading if possible, or if it should always load Textures immediately. More... | |
static void | set_texturing_mode (const int &anisotropic_filtering_, const bool &bilinear_filtering_, const bool &mipmapping_) |
Check to see if Textures is set to use lazy loading if possible. More... | |
![]() | |
static void | completely_destroy () |
static void | destroy () |
static Textures & | get () |
static bool | is_initialized () |
static void | remove_post_reinit (Event::Handler *const &handler) |
static void | remove_pre_uninit (Event::Handler *const &handler) |
Friends | |
class | Singleton< Textures > |
Additional Inherited Members | |
![]() | |
Singleton () | |
virtual | ~Singleton () |
![]() | |
bool | give_priority (const String &name, const bool &lent, const bool &keep, const String &filename="") |
If 'lent', 'keep', and 'filename' match, give priority over other 'name' entries. More... | |
void | init () |
void | uninit () |
Contact: bazal d@ze nipex .com
Definition at line 52 of file Textures.h.
Apply a texture for upcoming polygons (Called by Video::apply_Texture)
Definition at line 68 of file Textures.cpp.
Referenced by Zeni::Sprite::apply_Texture(), Zeni::Video_GL_Shader::apply_Texture(), Zeni::Video_GL_Fixed::apply_Texture(), and Zeni::Video_DX9::apply_Texture().
Apply a texture for upcoming polygons.
Definition at line 72 of file Textures.cpp.
|
inlinestatic |
Check the current level of anisotropy.
Definition at line 40 of file Textures.hxx.
Referenced by Zeni::Video::save().
|
inlinestatic |
Check if bilinear filtering is in use.
Definition at line 28 of file Textures.hxx.
Referenced by Zeni::Video::save(), and Zeni::Video_GL_Shader::unset_render_target().
Get the currently selected frame number for a Sprite.
Definition at line 88 of file Textures.cpp.
References Zeni::Sprite::get_current_frame().
|
inlinestatic |
Definition at line 44 of file Textures.hxx.
|
inlinestatic |
Check if mipmapping is in use.
Definition at line 32 of file Textures.hxx.
Referenced by Zeni::Video::save(), and Zeni::Video_GL_Shader::unset_render_target().
Get the number of frames; returns 0 if it is not a Sprite.
Definition at line 80 of file Textures.cpp.
References Zeni::Sprite::get_num_frames().
Referenced by Zeni::sprite_num_frames().
|
inlinestatic |
Check if trilinear filtering (the combination of bilinear filtering and mipmapping) is in use.
Definition at line 36 of file Textures.hxx.
bool Zeni::Textures::is_Sprite | ( | const unsigned long & | id | ) |
Does this id point to a Sprite.
Definition at line 76 of file Textures.cpp.
Referenced by Zeni::is_sprite().
Set the frame number for a Sprite.
Definition at line 96 of file Textures.cpp.
References Zeni::Sprite::set_current_frame().
Referenced by Zeni::set_sprite_frame().
Set whether Textures should use lazy loading if possible, or if it should always load Textures immediately.
Definition at line 48 of file Textures.hxx.
|
static |
Check to see if Textures is set to use lazy loading if possible.
Set the texturing mode
Definition at line 104 of file Textures.cpp.
References Zeni::Video::get_maximum_anisotropy(), Zeni::get_Textures(), Zeni::get_Video(), Zeni::Database< TYPE >::lost_resources(), and Zeni::Database< TYPE >::reload().
Referenced by load_config(), and Zeni::Video::set_failsafe_defaults().
Definition at line 53 of file Textures.h.