#include <texture.h>
Inheritance diagram for Texture:
Public Types | |
enum | DirtyFlags { DF_image = 0x001, DF_wrap = 0x002, DF_filter = 0x004, DF_mipmap = 0x008 } |
Public Member Functions | |
bool | load (const PNMImage &pnmimage) |
bool | store (PNMImage &pnmimage) const |
TextureContext * | prepare (GraphicsStateGuardianBase *gsg) |
void | unprepare () |
void | unprepare (GraphicsStateGuardianBase *gsg) |
void | clear_gsg (GraphicsStateGuardianBase *gsg) |
INLINE bool | has_ram_image () const |
PixelBuffer * | get_ram_image () |
INLINE void | set_keep_ram_image (bool keep_ram_image) |
INLINE bool | get_keep_ram_image () const |
INLINE void | apply (GraphicsStateGuardianBase *gsg) |
virtual void | copy (GraphicsStateGuardianBase *gsg, const DisplayRegion *dr) |
virtual void | copy (GraphicsStateGuardianBase *gsg, const DisplayRegion *dr, const RenderBuffer &rb) |
void | mark_dirty (int flags_to_set) |
PT (PixelBuffer) _pbuffer | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
Static Public Member Functions | |
bool | is_mipmap (FilterType type) |
WrapMode | string_wrap_mode (const string &string) |
FilterType | string_filter_type (const string &string) |
void | register_with_read_factory (void) |
TypedWritable * | make_Texture (const FactoryParams ¶ms) |
TypeHandle | get_class_type () |
void | init_type () |
Protected Member Functions | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Private Types | |
typedef pmap< GraphicsStateGuardianBase *, TextureContext * > | Contexts |
enum | WrapMode { WM_clamp, WM_repeat, WM_mirror, WM_mirror_once, WM_border_color, WM_invalid } |
Private Member Functions | |
Texture (int xsize, int ysize, int components, int component_width, PixelBuffer::Type type, PixelBuffer::Format format, bool bAllocateRAM) | |
~Texture () | |
bool | read (const Filename &fullpath, int primary_file_num_channels=0) |
bool | read (const Filename &fullpath, const Filename &alpha_fullpath, int primary_file_num_channels=0, int alpha_file_channel=0) |
bool | write (const Filename &fullpath="") const |
void | set_wrapu (WrapMode wrap) |
void | set_wrapv (WrapMode wrap) |
void | set_minfilter (FilterType filter) |
void | set_magfilter (FilterType filter) |
void | set_anisotropic_degree (int anisotropic_degree) |
void | set_border_color (const Colorf &color) |
INLINE WrapMode | get_wrapu () const |
INLINE WrapMode | get_wrapv () const |
INLINE FilterType | get_minfilter () const |
INLINE FilterType | get_magfilter () const |
INLINE int | get_anisotropic_degree () const |
INLINE bool | uses_mipmaps () const |
Private Attributes | |
PUBLISHED | __pad0__: enum FilterType { FT_nearest |
PUBLISHED | FT_linear |
PUBLISHED | FT_nearest_mipmap_nearest |
PUBLISHED | FT_linear_mipmap_nearest |
PUBLISHED | FT_nearest_mipmap_linear |
PUBLISHED | FT_linear_mipmap_linear |
PUBLISHED | FT_invalid |
PUBLISHED | __pad1__: Texture() |
WrapMode | _wrapu |
WrapMode | _wrapv |
FilterType | _minfilter |
FilterType | _magfilter |
int | _anisotropic_degree |
bool | _keep_ram_image |
Colorf | _border_color |
Contexts | _contexts |
int | _all_dirty_flags |
Static Private Attributes | |
TypeHandle | _type_handle |
Friends | |
class | TextureContext |
|
Definition at line 151 of file texture.h. Referenced by unprepare(). |
|
|
|
Definition at line 66 of file texture.h. Referenced by DXGraphicsStateGuardian8::apply_texture(), fillin(), and DXGraphicsStateGuardian7::prepare_texture(). |
|
Definition at line 154 of file texture.cxx. References _all_dirty_flags, _anisotropic_degree, _border_color, _keep_ram_image, _magfilter, _minfilter, _wrapu, _wrapv, Colorf, format, and type. |
|
Definition at line 174 of file texture.cxx. References unprepare(). |
|
Referenced by GLGraphicsStateGuardian::issue_texture(), DXGraphicsStateGuardian8::issue_texture(), CRGraphicsStateGuardian::issue_texture(), and DXGraphicsStateGuardian7::prepare_texture(). |
|
Definition at line 552 of file texture.cxx. References _contexts. Referenced by DXGraphicsStateGuardian7::prepare_texture(), RIBGraphicsStateGuardian::release_texture(), GLGraphicsStateGuardian::release_texture(), DXGraphicsStateGuardian8::release_texture(), and CRGraphicsStateGuardian::release_texture(). |
|
Implements ImageBuffer. Definition at line 613 of file texture.cxx. References GraphicsStateGuardianBase::copy_texture(), and prepare(). |
|
Implements ImageBuffer. Definition at line 609 of file texture.cxx. References GraphicsStateGuardianBase::copy_texture(), and prepare(). Referenced by SpheretexReflector::pre_apply(). |
|
Reimplemented from ImageBuffer. Definition at line 791 of file texture.cxx. References _anisotropic_degree, _magfilter, _minfilter, _wrapu, _wrapv, format, PixelBuffer::Format, DatagramIterator::get_bool(), DatagramIterator::get_int16(), DatagramIterator::get_uint8(), NULL, and WrapMode. |
|
Reimplemented from ImageBuffer. Definition at line 197 of file texture.h. References ImageBuffer::get_class_type(), and ImageBuffer::init_type(). |
|
|
Reimplemented from ImageBuffer. Definition at line 186 of file texture.h. Referenced by register_with_read_factory(). |
|
|
|
|
|
|
Reimplemented from ImageBuffer. Definition at line 194 of file texture.h. References ImageBuffer::get_class_type(). |
|
|
|
Referenced by DXTextureContext8::CreateTexture(), SomeViz::DisplayTexture(), BaseViz::DisplayTexture(), get_ram_image(), and write(). |
|
Reimplemented from ImageBuffer. Definition at line 189 of file texture.h. References ImageBuffer::get_class_type(), ImageBuffer::init_type(), and register_type(). Referenced by ConfigureFn(). |
|
Definition at line 448 of file texture.cxx. References FT_linear_mipmap_linear, FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, and FT_nearest_mipmap_nearest. Referenced by set_minfilter(). |
|
Definition at line 421 of file texture.cxx. References DF_image, and mark_dirty(). |
|
Definition at line 720 of file texture.cxx. References BamReader::get_file_minor_ver(), DatagramIterator::get_string(), DatagramIterator::get_uint8(), TexturePool::load_texture(), NULL, params, parse_params(), and PT(). Referenced by register_with_read_factory(). |
|
Definition at line 635 of file texture.cxx. References _all_dirty_flags, and _contexts. Referenced by load(), set_anisotropic_degree(), set_magfilter(), set_minfilter(), set_wrapu(), and set_wrapv(). |
|
Definition at line 469 of file texture.cxx. References _all_dirty_flags, _contexts, _keep_ram_image, Namable::get_name(), keep_texture_ram, GraphicsStateGuardianBase::prepare_texture(), and tc. Referenced by copy(), SomeViz::DisplayTexture(), and BaseViz::DisplayTexture(). |
|
Referenced by make_Texture(). |
|
|
Definition at line 187 of file texture.cxx. References ImageBuffer::_alpha_file_channel, ImageBuffer::_primary_file_num_channels, ImageBuffer::clear_alpha_filename(), ImageBuffer::clear_alpha_fullpath(), consider_downgrade(), consider_rescale(), Namable::get_name(), Namable::has_name(), image, load(), ImageBuffer::set_filename(), ImageBuffer::set_fullpath(), and Namable::set_name(). Referenced by get_ram_image(), herc_keys(), TexturePool::ns_load_texture(), PT(), shader_keys(), and text_keys(). |
|
Definition at line 710 of file texture.cxx. References get_class_type(), BamReader::get_factory(), make_Texture(), and Factory< TypedWritable >::register_factory(). Referenced by ConfigureFn(). |
|
Definition at line 398 of file texture.cxx. References _anisotropic_degree, DF_filter, and mark_dirty(). Referenced by EggLoader::apply_texture_attributes(), and DXTextureContext8::CreateTexture(). |
|
Definition at line 411 of file texture.cxx. References _border_color, and Colorf. |
|
|
|
Definition at line 381 of file texture.cxx. References _magfilter, DF_filter, filter, and mark_dirty(). Referenced by EggLoader::apply_texture_attributes(), DXTextureContext8::CreateTexture(), herc_keys(), WindowFramework::load_default_model(), min_shader_keys(), PT(), and text_keys(). |
|
Definition at line 364 of file texture.cxx. References _minfilter, DF_filter, DF_mipmap, filter, is_mipmap(), and mark_dirty(). Referenced by EggLoader::apply_texture_attributes(), DXTextureContext8::CreateTexture(), event_T(), herc_keys(), WindowFramework::load_default_model(), min_shader_keys(), PT(), and text_keys(). |
|
Definition at line 338 of file texture.cxx. References _wrapu, DF_wrap, and mark_dirty(). Referenced by EggLoader::apply_texture_attributes(), herc_keys(), and min_shader_keys(). |
|
Definition at line 351 of file texture.cxx. References _wrapv, DF_wrap, and mark_dirty(). Referenced by EggLoader::apply_texture_attributes(), herc_keys(), and min_shader_keys(). |
|
Definition at line 437 of file texture.cxx. |
|
Definition at line 683 of file texture.cxx. References cmp_nocase_uh(), FT_invalid, FT_linear, FT_linear_mipmap_linear, FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, and FT_nearest_mipmap_nearest. Referenced by init_libtext(). |
|
Definition at line 659 of file texture.cxx. References cmp_nocase_uh(), WM_border_color, WM_clamp, and WM_invalid. |
|
Definition at line 533 of file texture.cxx. References _contexts, GraphicsStateGuardianBase::release_texture(), and tc. |
|
Definition at line 507 of file texture.cxx. References _contexts, Contexts, GraphicsStateGuardianBase::release_texture(), and tc. Referenced by ~Texture(). |
|
Referenced by GLGraphicsStateGuardian::apply_texture_immediate(), and CRGraphicsStateGuardian::apply_texture_immediate(). |
|
Definition at line 317 of file texture.cxx. References has_ram_image(), and PNMImage::write(). Referenced by RIBGraphicsStateGuardian::define_texture(). |
|
Reimplemented from ImageBuffer. Definition at line 829 of file texture.cxx. References _anisotropic_degree, _magfilter, _minfilter, _wrapu, _wrapv, Datagram::add_bool(), Datagram::add_int16(), Datagram::add_uint8(), NULL, and ImageBuffer::write_datagram(). |
|
|
|
Reimplemented from ImageBuffer. |
|
Reimplemented from ImageBuffer. |
|
Definition at line 157 of file texture.h. Referenced by mark_dirty(), prepare(), and Texture(). |
|
Definition at line 143 of file texture.h. Referenced by fillin(), set_anisotropic_degree(), Texture(), and write_datagram(). |
|
Definition at line 145 of file texture.h. Referenced by set_border_color(), and Texture(). |
|
Definition at line 152 of file texture.h. Referenced by clear_gsg(), mark_dirty(), prepare(), and unprepare(). |
|
|
|
Definition at line 142 of file texture.h. Referenced by fillin(), set_magfilter(), Texture(), and write_datagram(). |
|
Definition at line 141 of file texture.h. Referenced by fillin(), set_minfilter(), Texture(), and write_datagram(). |
|
Reimplemented from ImageBuffer. Definition at line 33 of file texture.cxx. |
|
Definition at line 139 of file texture.h. Referenced by fillin(), set_wrapu(), Texture(), and write_datagram(). |
|
Definition at line 140 of file texture.h. Referenced by fillin(), set_wrapv(), Texture(), and write_datagram(). |
|
Definition at line 42 of file texture.h. Referenced by GLGraphicsStateGuardian::get_texture_filter_type(), CRGraphicsStateGuardian::get_texture_filter_type(), init_libtext(), and string_filter_type(). |
|
|
|
|
|