Add in hashing / comparison methods for TextureStates so multiple instances against the same texture work.
Add in hashing / comparison methods for TextureStates so multiple
instances against the same texture work.


Stupid line endings. I can't figure the Subversion magic :(

The real diff is:


Index: graphics/__init__.py
===================================================================
--- graphics/__init__.py        (revision 1505)
+++ graphics/__init__.py        (working copy)
@@ -195,3 +195,15 @@

     def unset(self):
          glDisable(self.texture.target)
+
+    def __hash__(self):
+        return hash((self.texture.target, self.texture.id))
+
+    def __cmp__(self, other):
+        return cmp((self.texture.target, self.texture.id),
+            (other.texture.target, other.texture.id))
+
+    def __eq__(self, other):
+        return (self.texture.target == other.texture.target and
+            self.texture.id == other.texture.id)
+



git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@1506 14d46d22-621c-0410-bb3d-6f67920f7d95

regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations