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

Annotation of /trunk/gr2lib/core/coretypes/implementation/Pixel.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (hide annotations) (download)
Thu Jul 15 14:22:00 2010 UTC (11 years, 10 months ago) by william
File size: 818 byte(s)
add: reading of textures

1 william 72 using System;
2     using System.Collections.Generic;
3     using System.Text;
4     using gr2lib.core.helpers;
5    
6     namespace gr2lib.core.coretypes.implementation
7     {
8     public class Pixel
9     {
10     public byte UInt8;
11    
12     public IntPtr NativePointer;
13    
14     internal static Pixel ReadFromMemory(IntPtr pointer)
15     {
16     if (pointer == IntPtr.Zero) return null;
17     native.Pixel native = Helpers.ReadFromMemory<native.Pixel>(pointer);
18     Pixel managed = ReadFromNative(native);
19     managed.NativePointer = pointer;
20     return managed;
21     }
22    
23     internal static Pixel ReadFromNative(native.Pixel native)
24     {
25     Pixel managed = new Pixel();
26     managed.UInt8 = native.UInt8;
27     return managed;
28     }
29     }
30     }

  ViewVC Help
Powered by ViewVC 1.1.22