Inheritance: IDisposable
Esempio n. 1
0
        public void Dispose()
        {
            if (texture != null)
            {
                texture.Dispose();
            }

            texture = null;
        }
Esempio n. 2
0
 public ESImage(int width, int height)
 {
     texture        = new ESTexture2D(IntPtr.Zero, SurfaceFormat.Color, width, height, new CGSize(width, height), All.Linear);
     imageWidth     = textureWidth = width;
     imageHeight    = textureHeight = height;
     texWidthRatio  = 1.0f / width;
     texHeightRatio = 1.0f / height;
     textureOffsetX = 0;
     textureOffsetY = 0;
 }
Esempio n. 3
0
		public ESImage(int width, int height)
		{
			texture = new ESTexture2D(IntPtr.Zero,SurfaceFormat.Color,width,height,new Size(width,height),All.Linear);
			imageWidth = textureWidth = width;
			imageHeight = textureHeight = height;
			texWidthRatio = 1.0f / width;
			texHeightRatio = 1.0f / height;
			textureOffsetX = 0;
			textureOffsetY = 0;
		}
Esempio n. 4
0
        static public ESTexture2D InitiFromDxt3File(BinaryReader rdr, int length, int width, int height)
        {
            byte [] b = GetBits(width, length, height, rdr);

            // Copy bits
            IntPtr pointer = Marshal.AllocHGlobal(length);

            Marshal.Copy(b, 0, pointer, length);
            ESTexture2D result = new ESTexture2D(pointer, SurfaceFormat.Dxt3, width, height, new Size(width, height), All.Linear);

            Marshal.FreeHGlobal(pointer);
            return(result);
        }
Esempio n. 5
0
        public ESImage(IntPtr data, int width, int height)
        {
            if (GraphicsDevice.openGLESVersion == GLContextVersion.Gles2_0)
            {
                texture = new ESTexture2D(data, SurfaceFormat.Color, width, height, new Size(width, height), GL20.All.Nearest);
            }
            else
            {
                texture = new ESTexture2D(data, SurfaceFormat.Color, width, height, new Size(width, height), GL11.All.Nearest);
            }

            Initialize(1.0f);
        }
Esempio n. 6
0
 public ESImage(Bitmap image)
 {
     // By default set the scale to 1.0f and the filtering to GL_NEAREST
     if (GraphicsDevice.openGLESVersion == GLContextVersion.Gles2_0)
     {
         texture = new ESTexture2D(image, GL20.All.Nearest);
     }
     else
     {
         texture = new ESTexture2D(image, GL11.All.Nearest);
     }
     Initialize(1.0f);
 }
Esempio n. 7
0
        public ESImage(int width, int height)
        {
            if (GraphicsDevice.openGLESVersion == GLContextVersion.Gles2_0)
            {
                texture = new ESTexture2D(IntPtr.Zero, SurfaceFormat.Color, width, height, new Size(width, height), GL20.All.Linear);
            }
            else
            {
                texture = new ESTexture2D(IntPtr.Zero, SurfaceFormat.Color, width, height, new Size(width, height), GL11.All.Linear);
            }

            imageWidth     = textureWidth = width;
            imageHeight    = textureHeight = height;
            texWidthRatio  = 1.0f / width;
            texHeightRatio = 1.0f / height;
            textureOffsetX = 0;
            textureOffsetY = 0;
        }
Esempio n. 8
0
 public ESImage(UIImage image, float imageScale, int lod, All filter)
 {
     texture = new ESTexture2D(image,filter, lod);
     Initialize(imageScale);
 }
Esempio n. 9
0
 public ESImage(ESTexture2D tex)
 {
     texture = tex;
     Initialize(1.0f);
 }
Esempio n. 10
0
 public ESImage(Bitmap image, All filter)
 {
     // By default set the scale to 1.0f
     texture = new ESTexture2D(image, filter);
     Initialize(1.0f);
 }
Esempio n. 11
0
 public ESImage(ESTexture2D tex)
 {
     texture = tex;
     Initialize(1.0f);
 }
Esempio n. 12
0
 public ESImage(Bitmap image, float imageScale, All filter)
 {
     texture = new ESTexture2D(image, filter);
     Initialize(imageScale);
 }
Esempio n. 13
0
 public ESImage(Bitmap image)
 {
     // By default set the scale to 1.0f and the filtering to GL_NEAREST
     texture = new ESTexture2D(image, All.Nearest);
     Initialize(1.0f);
 }
Esempio n. 14
0
 public ESImage(ESTexture2D tex)
     : this(tex,1.0f)
 {
 }
Esempio n. 15
0
 public ESImage(UIImage image, float imageScale, All filter)
 {
     texture = new ESTexture2D(image, filter);
     Initialize(image.CurrentScale);
 }
Esempio n. 16
0
 public ESImage(IntPtr data, int width, int height)
 {
     texture = new ESTexture2D(data, SurfaceFormat.Color, width, height, new Size(width, height), All.Nearest);
     Initialize(1.0f);
 }
Esempio n. 17
0
		public ESImage(NSImage image, All filter)
		{			
			// By default set the scale to 1.0f
			texture = new ESTexture2D(image,filter);
			Initialize(1.0f/*TODO image.CurrentScale*/);
		}
Esempio n. 18
0
 private Texture2D(ESTexture2D texture, string name)
 {
     this.texture = texture;
     this.Name    = name;
 }
Esempio n. 19
0
 public ESImage(ESTexture2D tex, float imageScale)
 {
     texture = tex;
     Initialize(1.0f);
 }
Esempio n. 20
0
 public ESImage(NSImage image)
 {
     // By default set the scale to 1.0f and the filtering to GL_NEAREST
     texture = new ESTexture2D(image, All.Nearest);
     Initialize(1.0f /*TODO image.CurrentScale*/);
 }
Esempio n. 21
0
 public ESImage(Bitmap image, All filter)
 {
     // By default set the scale to 1.0f
     texture = new ESTexture2D(image, filter);
     Initialize(1.0f);
 }
Esempio n. 22
0
 public ESImage(NSImage image, All filter)
 {
     // By default set the scale to 1.0f
     texture = new ESTexture2D(image, filter);
     Initialize(1.0f /*TODO image.CurrentScale*/);
 }
Esempio n. 23
0
 public ESImage(IntPtr data, int width, int height)
 {
     texture = new ESTexture2D(data, SurfaceFormat.Color, width, height, new Size(width, height), All.Nearest);
     Initialize(1.0f);
 }
Esempio n. 24
0
 public ESImage(ESTexture2D tex)
     : this(tex, 1.0f)
 {
 }
Esempio n. 25
0
 public ESImage(Bitmap image)
 {
     // By default set the scale to 1.0f and the filtering to GL_NEAREST
     texture = new ESTexture2D(image, All.Nearest);
     Initialize(1.0f);
 }
Esempio n. 26
0
 public ESImage(UIImage image, float imageScale, int lod, All filter)
 {
     texture = new ESTexture2D(image, filter, lod);
     Initialize(imageScale);
 }
Esempio n. 27
0
 public ESImage(Bitmap image, float imageScale, All filter)
 {
     texture = new ESTexture2D(image, filter);
     Initialize(imageScale);
 }
Esempio n. 28
0
        public void Dispose()
        {
            if (texture != null)
                texture.Dispose();

            texture = null;
        }
Esempio n. 29
0
 public ESImage(ESTexture2D tex, float imageScale)
 {
     texture = tex;
     Initialize(1.0f);
 }
Esempio n. 30
0
		public ESImage(NSImage image)
		{
			// By default set the scale to 1.0f and the filtering to GL_NEAREST
			texture = new ESTexture2D(image,All.Nearest);
			Initialize(1.0f/*TODO image.CurrentScale*/);			
		}
Esempio n. 31
0
        public static ESTexture2D InitiFromDxt3File(BinaryReader rdr, int length, int width, int height)
        {
            byte [] b = GetBits (width, length, height, rdr);

            // Copy bits
            IntPtr pointer = Marshal.AllocHGlobal (length);
            Marshal.Copy (b, 0, pointer, length);
            ESTexture2D result = new ESTexture2D (pointer,SurfaceFormat.Dxt3,width,height,new Size (width,height),All.Linear);
            Marshal.FreeHGlobal (pointer);
            return result;
        }
Esempio n. 32
0
 private Texture2D(ESTexture2D texture, string name)
 {
     this.texture = texture;
     this.Name = name;
 }