소스 검색

remove obsolete magfilteralpha/color

cxgeorge 24 년 전
부모
커밋
48987c00a9
6개의 변경된 파일4개의 추가작업 그리고 92개의 파일을 삭제
  1. 2 40
      panda/src/egg/eggTexture.I
  2. 2 22
      panda/src/egg/eggTexture.cxx
  3. 0 6
      panda/src/egg/eggTexture.h
  4. 0 17
      panda/src/egg/parser.yxx
  5. 0 5
      panda/src/gobj/texture.cxx
  6. 0 2
      panda/src/gobj/texture.h

+ 2 - 40
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;
 }
 

+ 2 - 22
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 &copy) {
   _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 {
       << "<Scalar> magfilter { " << get_magfilter() << " }\n";
   }
 
-  if (get_magfilteralpha() != FT_unspecified) {
-    indent(out, indent_level + 2)
-      << "<Scalar> magfilteralpha { " << get_magfilteralpha() << " }\n";
-  }
-
-  if (get_magfiltercolor() != FT_unspecified) {
-    indent(out, indent_level + 2)
-      << "<Scalar> magfiltercolor { " << get_magfiltercolor() << " }\n";
-  }
-
   if (has_anisotropic_degree()) {
     indent(out, indent_level + 2)
       << "<Scalar> 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);
     }

+ 0 - 6
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;

+ 0 - 17
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);
 

+ 0 - 5
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) {

+ 0 - 2
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