/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Diff of /trunk/gr2lib_UnitTest/Program.cs

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

--- trunk/gr2lib_UnitTest/Program.cs	2010/07/15 22:18:17	80
+++ trunk/gr2lib_UnitTest/Program.cs	2010/07/15 22:18:29	81
@@ -136,6 +136,34 @@
                     }
                     #endregion
 
+                    #region Read Materials
+                    Console.WriteLine();
+                    Console.WriteLine("Material List:");
+                    foreach (Material m in info.Materials)
+                    {
+                        Console.WriteLine("\tMaterial Name: " + m.Name);
+                        Console.WriteLine("\t\tMaterial IsTexture: " + m.IsTexture.ToString());
+                        if (m.IsTexture)
+                        {
+                            Texture t = m.Texture;
+                            Console.WriteLine("\t\tTexture:");
+                            Console.WriteLine("\t\t\tName: " + t.FromFileName);
+                            Console.WriteLine("\t\t\tType: " + t.TextureType);
+                            Console.WriteLine("\t\t\tWidth: " + t.Width);
+                            Console.WriteLine("\t\t\tHeight: " + t.Height);
+                            Console.WriteLine("\t\t\tEncoding: " + t.Encoding);
+                            Console.WriteLine("\t\t\tSubFormat: " + t.SubFormat);
+                            // layout
+                            Console.WriteLine("\t\t\tBytes Per Pixel: " + t.Layout.BytesPerPixel);
+                            Console.WriteLine("\t\t\tShiftForComponent: " + new arraytostring<int, int[]>(t.Layout.ShiftForComponent));
+                            Console.WriteLine("\t\t\tBitsForComponent: " + new arraytostring<int, int[]>(t.Layout.BitsForComponent));
+                            Console.WriteLine("\t\t\tExtendedData: " + t.ExtendedData);
+                            Console.WriteLine();
+                        }
+                        Console.WriteLine("\t\tExtendedData: " + m.ExtendedData);
+                        Console.WriteLine();
+                    }
+                    #endregion
                 }
                 #endregion
 

 

  ViewVC Help
Powered by ViewVC 1.1.22