public void Dispose() { if (texture != null) { texture.Dispose(); } texture = null; }
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; }
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; }
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); }
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); }
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); }
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; }
public ESImage(UIImage image, float imageScale, int lod, All filter) { texture = new ESTexture2D(image,filter, lod); Initialize(imageScale); }
public ESImage(ESTexture2D tex) { texture = tex; Initialize(1.0f); }
public ESImage(Bitmap image, All filter) { // By default set the scale to 1.0f texture = new ESTexture2D(image, filter); Initialize(1.0f); }
public ESImage(Bitmap image, float imageScale, All filter) { texture = new ESTexture2D(image, filter); Initialize(imageScale); }
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); }
public ESImage(ESTexture2D tex) : this(tex,1.0f) { }
public ESImage(UIImage image, float imageScale, All filter) { texture = new ESTexture2D(image, filter); Initialize(image.CurrentScale); }
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); }
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*/); }
private Texture2D(ESTexture2D texture, string name) { this.texture = texture; this.Name = name; }
public ESImage(ESTexture2D tex, float imageScale) { texture = tex; Initialize(1.0f); }
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*/); }
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*/); }
public ESImage(ESTexture2D tex) : this(tex, 1.0f) { }
public ESImage(UIImage image, float imageScale, int lod, All filter) { texture = new ESTexture2D(image, filter, lod); Initialize(imageScale); }
public void Dispose() { if (texture != null) texture.Dispose(); texture = null; }
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*/); }
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; }