#include <texture.hpp>

Definition at line 113 of file texture.hpp.
Public Member Functions | |
| void | bind (gsgl::flags_t render_flags=TEXTURE_NO_FLAGS) |
| Bind the texture for use in OpenGL. | |
| const int | get_texture_unit () const |
| texture (SDL_Surface *surface, const gsgl::flags_t flags=TEXTURE_NO_FLAGS, const texture_format &format=TEXTURE_COLORMAP, const gsgl::string &identifier=gsgl::string::EMPTY_STRING, const int &texture_unit=0) | |
| texture (const gsgl::string &fname, const gsgl::flags_t flags=TEXTURE_NO_FLAGS, const texture_format &format=TEXTURE_COLORMAP, const int &texture_unit=0) | |
| texture (const texture &tex) | |
| void | unbind () |
| Unbind the texture for use in OpenGL. | |
| void | unload () |
| Unload the texture from the video card. | |
| void | update () |
| Update the texture on the card from the memory buffer. | |
| ~texture () | |
Static Public Member Functions | |
| static gsgl::data_object * | create_global_texture_cache () |
Private Member Functions | |
| void | assign_gl_modes () |
Private Attributes | |
| gsgl::flags_t | flags |
| int | gl_env |
| int | gl_filter |
| int | gl_wrap |
| texture_impl * | impl |
| texture | ( | const gsgl::string & | fname, | |
| const gsgl::flags_t | flags = TEXTURE_NO_FLAGS, |
|||
| const texture_format & | format = TEXTURE_COLORMAP, |
|||
| const int & | texture_unit = 0 | |||
| ) | [explicit] |
Definition at line 343 of file texture.cpp.
References texture::assign_gl_modes(), shared_object::attach(), cache::contains_index(), string::format(), file::get_full_path(), singleton::global_instance(), texture::impl, and string::w_string().
| texture | ( | SDL_Surface * | surface, | |
| const gsgl::flags_t | flags = TEXTURE_NO_FLAGS, |
|||
| const texture_format & | format = TEXTURE_COLORMAP, |
|||
| const gsgl::string & | identifier = gsgl::string::EMPTY_STRING, |
|||
| const int & | texture_unit = 0 | |||
| ) | [explicit] |
Definition at line 372 of file texture.cpp.
References texture::assign_gl_modes(), shared_object::attach(), cache::contains_index(), string::format(), singleton::global_instance(), texture::impl, and string::w_string().
| ~texture | ( | ) |
| void assign_gl_modes | ( | ) | [private] |
Definition at line 459 of file texture.cpp.
References texture::flags, texture::gl_env, texture::gl_filter, texture::gl_wrap, gsgl::platform::TEXTURE_ENV_MODULATE, gsgl::platform::TEXTURE_ENV_REPLACE, gsgl::platform::TEXTURE_FILTER_LINEAR, gsgl::platform::TEXTURE_WRAP_CLAMP, and gsgl::platform::TEXTURE_WRAP_REPEAT.
Referenced by texture::texture().
| void bind | ( | gsgl::flags_t | render_flags = TEXTURE_NO_FLAGS |
) |
Bind the texture for use in OpenGL.
Bind the texture for use in OpenGL, if necessary loading it first.
Definition at line 414 of file texture.cpp.
References assert, texture_impl::bind(), CHECK_GL_ERRORS, texture::flags, texture::gl_env, texture::gl_filter, texture::gl_wrap, texture::impl, gsgl::platform::TEXTURE_LOAD_NO_PARAMS, and gsgl::platform::TEXTURE_RENDER_ANISOTROPIC.
Referenced by material::bind(), widget::draw(), simple_sphere::draw(), star::draw(), lithosphere_qt_node::draw(), font_impl::draw(), and application::draw_splash_screen().
| gsgl::data_object * create_global_texture_cache | ( | ) | [static] |
| const int get_texture_unit | ( | ) | const |
Definition at line 408 of file texture.cpp.
References texture_impl::get_texture_unit(), and texture::impl.
| void unbind | ( | ) |
Unbind the texture for use in OpenGL.
Definition at line 438 of file texture.cpp.
References assert, texture::impl, and texture_impl::unbind().
Referenced by simple_sphere::draw().
| void unload | ( | ) |
Unload the texture from the video card.
Definition at line 452 of file texture.cpp.
References assert, texture::impl, and texture_impl::unload().
| void update | ( | ) |
Update the texture on the card from the memory buffer.
Definition at line 445 of file texture.cpp.
References assert, texture::impl, and texture_impl::update().
gsgl::flags_t flags [private] |
Definition at line 117 of file texture.hpp.
Referenced by texture::assign_gl_modes(), and texture::bind().
int gl_env [private] |
Definition at line 118 of file texture.hpp.
Referenced by texture::assign_gl_modes(), and texture::bind().
int gl_filter [private] |
Definition at line 118 of file texture.hpp.
Referenced by texture::assign_gl_modes(), and texture::bind().
int gl_wrap [private] |
Definition at line 118 of file texture.hpp.
Referenced by texture::assign_gl_modes(), and texture::bind().
texture_impl* impl [private] |
Definition at line 115 of file texture.hpp.
Referenced by texture::bind(), texture::get_texture_unit(), texture::texture(), texture::unbind(), texture::unload(), texture::update(), and texture::~texture().
1.5.5