Implemented GetHashCode and ToString.

This commit is contained in:
the_fiddler 2008-11-25 17:25:10 +00:00
parent 732a602578
commit 5d1eda9289

View file

@ -177,10 +177,27 @@ namespace OpenTK.Graphics
#endregion
//public override int GetHashCode()
//{
// return (this as IGraphicsResource).Id;
//}
#region public override int GetHashCode()
public override int GetHashCode()
{
return (this as IGraphicsResource).Id;
}
#endregion
#region public overrid string ToString()
public override string ToString()
{
return String.Format("Texture2D #{0} ({1}x{2}, {3})",
(this as IGraphicsResource).Id.ToString(),
Width.ToString(),
Height.ToString(),
InternalFormat.ToString());
}
#endregion
#endregion