當前位置: 首頁>>代碼示例>>C#>>正文


C# Graphics.ESTexture2D類代碼示例

本文整理匯總了C#中Microsoft.Xna.Framework.Graphics.ESTexture2D的典型用法代碼示例。如果您正苦於以下問題:C# ESTexture2D類的具體用法?C# ESTexture2D怎麽用?C# ESTexture2D使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ESTexture2D類屬於Microsoft.Xna.Framework.Graphics命名空間,在下文中一共展示了ESTexture2D類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ESImage

		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;
		}
開發者ID:adison,項目名稱:Tank-Wars,代碼行數:10,代碼來源:ESImage.cs

示例2: InitiFromDxt3File

        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;
        }
開發者ID:JoelCarter,項目名稱:MonoGame,代碼行數:11,代碼來源:ESTexture2D.cs

示例3: ESImage

 public ESImage(ESTexture2D tex)
 {
     texture = tex;
     Initialize(1.0f);
 }
開發者ID:ustor,項目名稱:MonoGame,代碼行數:5,代碼來源:ESImage.cs

示例4: ESImage

		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*/);
		}
開發者ID:adison,項目名稱:Tank-Wars,代碼行數:6,代碼來源:ESImage.cs

示例5: ESImage

 public ESImage(ESTexture2D tex)
     : this(tex,1.0f)
 {
 }
開發者ID:Jorgemagic,項目名稱:MonoGame,代碼行數:4,代碼來源:ESImage.cs

示例6: Texture2D

 private Texture2D(ESTexture2D texture, string name)
 {
     this.texture = texture;
     this.Name = name;
 }
開發者ID:meds,項目名稱:ChicksnVixens,代碼行數:5,代碼來源:Texture2D.cs

示例7: ESImage

 public ESImage(UIImage image, float imageScale, int lod, All filter)
 {
     texture = new ESTexture2D(image,filter, lod);
     Initialize(imageScale);
 }
開發者ID:ncoder,項目名稱:MonoGame,代碼行數:5,代碼來源:ESImage.cs

示例8: Dispose

        public void Dispose()
        {
            if (texture != null)
                texture.Dispose();

            texture = null;
        }
開發者ID:jbekkedal,項目名稱:MonoGame,代碼行數:7,代碼來源:ESImage.cs


注:本文中的Microsoft.Xna.Framework.Graphics.ESTexture2D類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。