diff --git a/panda/src/egg/eggTexture.I b/panda/src/egg/eggTexture.I index b8106128cd..1aab48a6fa 100644 --- a/panda/src/egg/eggTexture.I +++ b/panda/src/egg/eggTexture.I @@ -165,46 +165,6 @@ get_magfilter() const { return _magfilter; } -//////////////////////////////////////////////////////////////////// -// Function: EggTexture::set_magfilteralpha -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE void EggTexture:: -set_magfilteralpha(FilterType type) { - _magfilteralpha = type; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggTexture::get_magfilteralpha -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE EggTexture::FilterType EggTexture:: -get_magfilteralpha() const { - return _magfilteralpha; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggTexture::set_magfiltercolor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE void EggTexture:: -set_magfiltercolor(FilterType type) { - _magfiltercolor = type; -} - -//////////////////////////////////////////////////////////////////// -// Function: EggTexture::get_magfiltercolor -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE EggTexture::FilterType EggTexture:: -get_magfiltercolor() const { - return _magfiltercolor; -} - //////////////////////////////////////////////////////////////////// // Function: EggTexture::set_anisotropic_degree // Access: Public @@ -253,6 +213,8 @@ has_anisotropic_degree() const { INLINE int EggTexture:: get_anisotropic_degree() const { nassertr(has_anisotropic_degree(), 1); + + // note: _anisotropic_degree's of 0 and 1 are equivalent (no anisotropic filtering to be done by gsg) return _anisotropic_degree; } diff --git a/panda/src/egg/eggTexture.cxx b/panda/src/egg/eggTexture.cxx index 2afbcdbdfd..dfdca82e3b 100644 --- a/panda/src/egg/eggTexture.cxx +++ b/panda/src/egg/eggTexture.cxx @@ -41,8 +41,6 @@ EggTexture(const string &tref_name, const string &filename) _wrap_v = WM_unspecified; _minfilter = FT_unspecified; _magfilter = FT_unspecified; - _magfilteralpha = FT_unspecified; - _magfiltercolor = FT_unspecified; _anisotropic_degree = 0; _env_type = ET_unspecified; _flags = 0; @@ -75,8 +73,6 @@ operator = (const EggTexture ©) { _wrap_v = copy._wrap_v; _minfilter = copy._minfilter; _magfilter = copy._magfilter; - _magfilteralpha = copy._magfilteralpha; - _magfiltercolor = copy._magfiltercolor; _anisotropic_degree = copy._anisotropic_degree; _env_type = copy._env_type; _flags = copy._flags; @@ -127,16 +123,6 @@ write(ostream &out, int indent_level) const { << " magfilter { " << get_magfilter() << " }\n"; } - if (get_magfilteralpha() != FT_unspecified) { - indent(out, indent_level + 2) - << " magfilteralpha { " << get_magfilteralpha() << " }\n"; - } - - if (get_magfiltercolor() != FT_unspecified) { - indent(out, indent_level + 2) - << " magfiltercolor { " << get_magfiltercolor() << " }\n"; - } - if (has_anisotropic_degree()) { indent(out, indent_level + 2) << " anisotropic-degree { " << get_anisotropic_degree() << " }\n"; @@ -244,8 +230,6 @@ is_equivalent_to(const EggTexture &other, int eq) const { _wrap_v != other._wrap_v || _minfilter != other._minfilter || _magfilter != other._magfilter || - _magfilteralpha != other._magfilteralpha || - _magfiltercolor != other._magfiltercolor || _env_type != other._env_type) { return false; } @@ -333,16 +317,12 @@ sorts_less_than(const EggTexture &other, int eq) const { if (_magfilter != other._magfilter) { return (int)_magfilter < (int)other._magfilter; } - if (_magfilteralpha != other._magfilteralpha) { - return (int)_magfilteralpha < (int)other._magfilteralpha; - } - if (_magfiltercolor != other._magfiltercolor) { - return (int)_magfiltercolor < (int)other._magfiltercolor; + if (_anisotropic_degree != other._anisotropic_degree) { + return _anisotropic_degree < other._anisotropic_degree); } if (_env_type != other._env_type) { return (int)_env_type < (int)other._env_type; } - if (EggRenderMode::operator != (other)) { return EggRenderMode::operator < (other); } diff --git a/panda/src/egg/eggTexture.h b/panda/src/egg/eggTexture.h index 1e35b80d7d..9327af8936 100644 --- a/panda/src/egg/eggTexture.h +++ b/panda/src/egg/eggTexture.h @@ -106,12 +106,6 @@ public: INLINE void set_magfilter(FilterType type); INLINE FilterType get_magfilter() const; - INLINE void set_magfilteralpha(FilterType type); - INLINE FilterType get_magfilteralpha() const; - - INLINE void set_magfiltercolor(FilterType type); - INLINE FilterType get_magfiltercolor() const; - INLINE void set_anisotropic_degree(int anisotropic_degree); INLINE void clear_anisotropic_degree(); INLINE bool has_anisotropic_degree() const; diff --git a/panda/src/egg/parser.yxx b/panda/src/egg/parser.yxx index cd173bb3b5..471d44f235 100644 --- a/panda/src/egg/parser.yxx +++ b/panda/src/egg/parser.yxx @@ -351,23 +351,6 @@ texture_body: } else { texture->set_magfilter(f); } - - } else if (cmp_nocase_uh(name, "magfilteralpha") == 0) { - EggTexture::FilterType f = EggTexture::string_filter_type(strval); - if (f == EggTexture::FT_unspecified) { - eggyywarning("Unknown texture filter type " + strval); - } else { - texture->set_magfilteralpha(f); - } - - } else if (cmp_nocase_uh(name, "magfiltercolor") == 0) { - EggTexture::FilterType f = EggTexture::string_filter_type(strval); - if (f == EggTexture::FT_unspecified) { - eggyywarning("Unknown texture filter type " + strval); - } else { - texture->set_magfiltercolor(f); - } - } else if (cmp_nocase_uh(name, "anisotropic_degree") == 0) { texture->set_anisotropic_degree(value); diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index bb5b53a762..0cc76619b6 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -561,8 +561,6 @@ write_datagram(BamWriter *manager, Datagram &me) { me.add_uint8(_wrapv); me.add_uint8(_minfilter); me.add_uint8(_magfilter); - me.add_uint8(_magfiltercolor); - me.add_uint8(_magfilteralpha); me.add_int16(_anisotropic_degree); // We also need to write out the pixel buffer's format, even though @@ -642,9 +640,6 @@ fillin(DatagramIterator &scan, BamReader *manager) { _wrapv = (enum WrapMode) scan.get_uint8(); _minfilter = (enum FilterType) scan.get_uint8(); _magfilter = (enum FilterType) scan.get_uint8(); - _magfiltercolor = (enum FilterType) scan.get_uint8(); - _magfilteralpha = (enum FilterType) scan.get_uint8(); - _anisotropic_degree = scan.get_int16(); if (scan.get_remaining_size() > 0) { diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index 0bdccf1e51..e3a86d72ca 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -133,8 +133,6 @@ private: WrapMode _wrapv; FilterType _minfilter; FilterType _magfilter; - FilterType _magfiltercolor; - FilterType _magfilteralpha; int _anisotropic_degree; // A Texture keeps a list (actually, a map) of all the GSG's that it