#include <texturegl.H>
Inheritance diagram for TEXTUREgl:
Public Member Functions | |
TEXTUREgl (Cstr_ptr &file="", GLenum target=GL_TEXTURE_2D) | |
TEXTUREgl (CBBOX2D &bb, CVIEWptr &v) | |
TEXTUREgl (GLenum target, GLenum unit=GL_TEXTURE0) | |
virtual | ~TEXTUREgl () |
mlib::Point2i | get_size () const |
virtual int | load_image () |
virtual int | set_image (unsigned char *data, int w, int h, uint bpp=3) |
void | set_texture (Cstr_ptr &filename) |
GLuint | get_tex_id () const |
bool | is_valid () const |
virtual bool | load_texture (unsigned char **copy=0) |
virtual void | apply_texture (const mlib::Wtransf *xf=0) |
void | copy_texture (CBBOX2D &bb, CVIEWptr &v) |
void | set_format (GLenum format) |
GLenum | format () const |
void | set_tex_unit (GLenum unit) |
GLenum | get_tex_unit () const |
void | set_tex_fn (GLint fn) |
GLint | tex_fn () const |
void | set_wrap_r (GLint wrapr) |
GLint | wrap_r () const |
void | set_wrap_s (GLint wraps) |
GLint | wrap_s () const |
void | set_wrap_t (GLint wrapt) |
GLint | wrap_t () const |
void | set_min_filter (GLint minfilt) |
void | set_max_filter (GLint maxfilt) |
bool | mipmap () const |
void | set_mipmap (bool mipmap) |
void | set_save_img (bool b=1) |
const GLenum | target () const |
void | declare_texture () |
Cstr_ptr & | file () const |
const Image & | image () const |
Image & | image () |
bool | load_attempt_failed () const |
void | expand_image () |
virtual void | apply_texture (mlib::CWtransf *xf=0)=0 |
void | set_expand_image (bool expand) |
virtual int | dimension () const |
void | Own () const |
void | Free () const |
int | Lock () |
void | Unlock () |
int | Unique () const |
Protected Member Functions | |
GLenum | bpp_to_format () const |
void | free_dl () |
void | init_settings () |
void | expand_power2 (int width, int height) |
Protected Attributes | |
GLuint | _dl |
bool | _dl_valid |
GLenum | _format |
GLenum | _tex_unit |
bool | _save_img |
bool | _mipmap |
GLint | _min_filter |
GLint | _max_filter |
GLint | _wrap_r |
GLint | _wrap_s |
GLint | _wrap_t |
GLint | _tex_fn |
const GLenum | _target |
str_ptr | _file |
Image | _img |
mlib::Wtransf | _scale |
bool | _image_not_available |
bool | _expand_image |
Definition at line 18 of file texturegl.H.
|
Definition at line 35 of file texturegl.C. References init_settings(), and set_mipmap(). |
|
Definition at line 55 of file texturegl.C. References copy_texture(), init_settings(), and set_mipmap(). |
|
Definition at line 16 of file texturegl.C. References init_settings(). |
|
Definition at line 25 of file texturegl.H. References free_dl(). |
|
|
|
|
|
Definition at line 90 of file texturegl.H. References TEXTURE::_img, Image::bpp(), GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, and GL_RGBA. Referenced by load_image(), and set_image(). |
|
Definition at line 331 of file texturegl.C. References TEXTURE::_img, _save_img, _target, Image::clear(), declare_texture(), getPower2Size(), GL_BACK, GL_RGB, GL_TEXTURE_2D, glCopyTexImage2D(), glReadBuffer(), and int(). Referenced by TEXTUREgl(). |
|
Definition at line 172 of file texturegl.C. References _dl, _dl_valid, TEXTURE::_file, _target, _tex_unit, debug, err_adv(), glActiveTexture, glBindTexture(), and glGenTextures(). Referenced by copy_texture(), and load_texture(). |
|
|
|
Resizes an image to the least powers of 2 greater than width and height. Definition at line 44 of file texture.C. References TEXTURE::_expand_image, TEXTURE::_img, TEXTURE::_scale, debug, Image::empty(), err_adv(), Image::expand_power2(), Image::height(), mlib::Mat4< Wtransf, Wpt, Wvec, Wline, Wquat >::scaling(), and Image::width(). Referenced by TEXTURE::load_image(), and TEXTURE::set_image(). |
|
Definition at line 64 of file texture.C. References TEXTURE::_img, Image::bpp(), Image::expand_power2(), and Image::resize(). |
|
Definition at line 32 of file texture.H. References TEXTURE::_file. |
|
Definition at line 49 of file texturegl.H. References _format. Referenced by load_texture(). |
|
Definition at line 76 of file ref.H. References REFcounter::_mutex, REFcounter::_u, and REF_ME. |
|
Definition at line 154 of file texturegl.C. References _dl, _dl_valid, TEXTURE::_file, debug, err_adv(), and glDeleteTextures(). Referenced by load_image(), set_image(), set_texture(), and ~TEXTUREgl(). |
|
Definition at line 27 of file texturegl.H. References TEXTURE::_img, and Image::dims(). |
|
Definition at line 36 of file texturegl.H. References _dl. |
|
Definition at line 52 of file texturegl.H. References _tex_unit. |
|
Definition at line 34 of file texture.H. References TEXTURE::_img. |
|
Definition at line 33 of file texture.H. References TEXTURE::_img. |
|
Definition at line 365 of file texturegl.C. References _max_filter, _min_filter, _tex_fn, _wrap_r, _wrap_s, _wrap_t, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_MODULATE, and GL_REPEAT. Referenced by TEXTUREgl(). |
|
Definition at line 37 of file texturegl.H. References _dl_valid. Referenced by load_texture(). |
|
Definition at line 36 of file texture.H. References TEXTURE::_image_not_available. |
|
Reimplemented from TEXTURE. Definition at line 96 of file texturegl.C. References TEXTURE::_file, _format, bpp_to_format(), debug, err_adv(), free_dl(), and TEXTURE::load_image(). Referenced by load_texture(). |
|
Implements TEXTURE. Definition at line 197 of file texturegl.C. References _dl, _dl_valid, TEXTURE::_file, TEXTURE::_img, _mipmap, _save_img, _target, Image::bpp(), Image::copy(), Image::data(), debug, declare_texture(), Image::empty(), err_adv(), format(), Image::freedata(), GL_TEXTURE_2D, GL_UNSIGNED_BYTE, glTexImage1D(), glTexImage2D(), Image::height(), is_valid(), load_image(), and Image::width(). |
|
Definition at line 105 of file ref.H. References REFcounter::_mutex, and REFcounter::_u. Referenced by REFlock::REFlock(). |
|
Definition at line 67 of file texturegl.H. References _mipmap. |
|
Definition at line 59 of file ref.H. References REFcounter::_mutex, REFcounter::_u, and REF_ME. |
|
Definition at line 55 of file texture.H. References TEXTURE::_expand_image. Referenced by set_mipmap(). |
|
Definition at line 48 of file texturegl.H. References _format. |
|
Reimplemented from TEXTURE. Definition at line 113 of file texturegl.C. References TEXTURE::_file, _format, bpp_to_format(), debug, err_adv(), free_dl(), and TEXTURE::set_image(). |
|
Definition at line 65 of file texturegl.H. References _max_filter. |
|
Definition at line 64 of file texturegl.H. References _min_filter. |
|
Definition at line 76 of file texturegl.C. References _dl_valid, _max_filter, _min_filter, _mipmap, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_NEAREST, and TEXTURE::set_expand_image(). Referenced by TEXTUREgl(). |
|
Definition at line 70 of file texturegl.H. References _save_img. |
|
Definition at line 54 of file texturegl.H. References _tex_fn. |
|
Definition at line 51 of file texturegl.H. References _tex_unit. |
|
Definition at line 123 of file texturegl.C. References TEXTURE::_file, TEXTURE::_image_not_available, debug, and free_dl(). |
|
Definition at line 57 of file texturegl.H. References _wrap_s. |
|
Definition at line 59 of file texturegl.H. References _wrap_s. |
|
Definition at line 61 of file texturegl.H. References _wrap_t. |
|
Definition at line 71 of file texturegl.H. References _target. |
|
Definition at line 55 of file texturegl.H. References _tex_fn. |
|
Definition at line 115 of file ref.H. References REFcounter::_mutex, and REFcounter::_u. |
|
Definition at line 111 of file ref.H. References REFcounter::_mutex, and REFcounter::_u. Referenced by REFlock::~REFlock(). |
|
Definition at line 58 of file texturegl.H. References _wrap_r. |
|
Definition at line 60 of file texturegl.H. References _wrap_s. |
|
Definition at line 62 of file texturegl.H. References _wrap_t. |
|
Definition at line 76 of file texturegl.H. Referenced by declare_texture(), free_dl(), get_tex_id(), and load_texture(). |
|
Definition at line 77 of file texturegl.H. Referenced by declare_texture(), free_dl(), is_valid(), load_texture(), and set_mipmap(). |
|
Definition at line 65 of file texture.H. Referenced by TEXTURE::expand_image(), and TEXTURE::set_expand_image(). |
|
Definition at line 61 of file texture.H. Referenced by declare_texture(), TEXTURE::file(), free_dl(), load_image(), TEXTURE::load_image(), load_texture(), set_image(), and set_texture(). |
|
Definition at line 78 of file texturegl.H. Referenced by format(), load_image(), set_format(), and set_image(). |
|
Definition at line 64 of file texture.H. Referenced by TEXTURE::load_attempt_failed(), TEXTURE::load_image(), and set_texture(). |
|
Definition at line 62 of file texture.H. Referenced by bpp_to_format(), copy_texture(), TEXTURE::expand_image(), TEXTURE::expand_power2(), get_size(), TEXTURE::image(), TEXTURE::load_image(), load_texture(), and TEXTURE::set_image(). |
|
Definition at line 83 of file texturegl.H. Referenced by init_settings(), set_max_filter(), and set_mipmap(). |
|
Definition at line 82 of file texturegl.H. Referenced by init_settings(), set_min_filter(), and set_mipmap(). |
|
Definition at line 81 of file texturegl.H. Referenced by load_texture(), mipmap(), and set_mipmap(). |
|
Definition at line 80 of file texturegl.H. Referenced by copy_texture(), load_texture(), and set_save_img(). |
|
Definition at line 63 of file texture.H. Referenced by TEXTURE::expand_image(). |
|
Definition at line 88 of file texturegl.H. Referenced by copy_texture(), declare_texture(), load_texture(), and target(). |
|
Definition at line 87 of file texturegl.H. Referenced by init_settings(), set_tex_fn(), and tex_fn(). |
|
Definition at line 79 of file texturegl.H. Referenced by declare_texture(), get_tex_unit(), and set_tex_unit(). |
|
Definition at line 84 of file texturegl.H. Referenced by init_settings(), and wrap_r(). |
|
Definition at line 85 of file texturegl.H. Referenced by init_settings(), set_wrap_r(), set_wrap_s(), and wrap_s(). |
|
Definition at line 86 of file texturegl.H. Referenced by init_settings(), set_wrap_t(), and wrap_t(). |