/[gr2lib]/trunk/gr2lib/core/coretypes/implementation/Texture.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/coretypes/implementation/Texture.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib/core/coretypes/implementation/Texture.cs	2010/07/15 14:22:00	72
+++ trunk/gr2lib/core/coretypes/implementation/Texture.cs	2010/07/15 23:36:04	82
@@ -3,25 +3,13 @@
 using System.Text;
 using gr2lib.core.helpers;
 
+using gr2lib.core.interfaces;
+
 namespace gr2lib.core.coretypes.implementation
 {
-
-    public interface ITexture
-    {
-        string FromFileName { get; set; }
-        int TextureType { get; set; }
-        int Width { get; set; }
-        int Height { get; set; }
-        int Encoding { get; set; }
-        int SubFormat { get; set; }
-        Layout Layout { get; set; }
-        List<Image> Images { get; set; }
-        IntPtr ExtendedData { get; set; }
-    }
-
     public class Texture : ITexture
     {
-        private string _FromFileName;
+        private FilePath _FromFileName;
         private int _TextureType;
         private int _Width;
         private int _Height;
@@ -29,12 +17,22 @@
         private int _SubFormat;
         private Layout _Layout;
         private List<Image> _Images;
-        private IntPtr _ExtendedData;
 
-        public IntPtr NativePointer;
+
+        
 
         public Texture()
         {
+            this.FromFileName = "";
+            this.TextureType = 0;
+            this.Width = 0;
+            this.Height = 0;
+            this.Encoding = 0;
+            this.SubFormat = 0;
+            this.Layout = new Layout();
+            this.Images = new List<Image>();
+            this.ExtendedData = IntPtr.Zero;
+            this.NativePointer = IntPtr.Zero;
         }
 
         internal static Texture ReadFromMemory(IntPtr pointer)
@@ -72,7 +70,7 @@
         }
 
         #region ITexture Members
-        public string FromFileName { get { return _FromFileName; } set { _FromFileName = value; } }
+        public FilePath FromFileName { get { return _FromFileName; } set { _FromFileName = value; } }
         public int TextureType { get { return _TextureType; } set { _TextureType = value; } }
         public int Width { get { return _Width; } set { _Width = value; } }
         public int Height { get { return _Height; } set { _Height = value; } }
@@ -80,6 +78,15 @@
         public int SubFormat { get { return _SubFormat; } set { _SubFormat = value; } }
         public Layout Layout { get { return _Layout; } set { _Layout = value; } }
         public List<Image> Images { get { return _Images; } set { _Images = value; } }
+        #endregion
+
+        #region INativePointer Members
+        private IntPtr _NativePointer;
+        public IntPtr NativePointer { get { return _NativePointer; } set { _NativePointer = value; } }
+        #endregion
+
+        #region IExtendedData Members
+        private IntPtr _ExtendedData;
         public IntPtr ExtendedData { get { return _ExtendedData; } set { _ExtendedData = value; } }
         #endregion
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22