本文整理汇总了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;
}
示例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;
}
示例3: ESImage
public ESImage(ESTexture2D tex)
{
texture = tex;
Initialize(1.0f);
}
示例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*/);
}
示例5: ESImage
public ESImage(ESTexture2D tex)
: this(tex,1.0f)
{
}
示例6: Texture2D
private Texture2D(ESTexture2D texture, string name)
{
this.texture = texture;
this.Name = name;
}
示例7: ESImage
public ESImage(UIImage image, float imageScale, int lod, All filter)
{
texture = new ESTexture2D(image,filter, lod);
Initialize(imageScale);
}
示例8: Dispose
public void Dispose()
{
if (texture != null)
texture.Dispose();
texture = null;
}