public static unsafe void SetData(this ITexture2D texture2D, int level, byte[] data, FormatColor formatColor, FormatType type) { fixed (byte* pData = data) { texture2D.SetData(level, (IntPtr)pData, formatColor, type); } }
public void SetData(int level, int xOffset, int width, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer) { Context.Bindings.Buffers.PixelUnpack.Set(pixelUnpackBuffer); Context.Bindings.Textures.Units[Context.Bindings.Textures.EditingIndex].Set(this); GL.TexSubImage1D((int)Target, level, xOffset, width, (int)format, (int)type, data); }
public void SetData(int level, int xOffset, int yOffset, int zOffset, int width, int height, int depth, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer) { Context.Bindings.Buffers.PixelUnpack.Set(pixelUnpackBuffer); Context.Bindings.Textures.Units[Context.Bindings.Textures.EditingIndex].Set(this); GL.TexSubImage3D((int)Target, level, xOffset, yOffset, zOffset, width, height, depth, (int)format, (int)type, data); }
public void SetData(int level, int faceIndex, int xOffset, int yOffset, int width, int height, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer) { Context.Bindings.Buffers.PixelUnpack.Set(pixelUnpackBuffer); Context.Bindings.Textures.Units[Context.Bindings.Textures.EditingIndex].Set(this); GL.TexSubImage2D((int)(All.TextureCubeMapPositiveX + (uint)faceIndex), level, xOffset, yOffset, width, height, (int)format, (int)type, data); }
public static void SetData(this ITextureCubemapArray texture, int level, int faceIndex, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer = null) { texture.SetData(level, 0, 0, faceIndex, texture.CalculateMipWidth(level), texture.CalculateMipHeight(level), 1, data, format, type, pixelUnpackBuffer); }
public static void SetData(this ITexture3D texture, int level, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer = null) { texture.SetData(level, 0, 0, 0, texture.CalculateMipWidth(level), texture.CalculateMipHeight(level), texture.CalculateMipDepth(level), data, format, type, pixelUnpackBuffer); }
public static void SetData(this ITexture1DArray texture, int level, int slice, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer = null) { texture.SetData(level, 0, slice, texture.CalculateMipWidth(level), 1, data, format, type, pixelUnpackBuffer); }
public static void SetData(this ITextureCubemap texture, int level, int faceIndex, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer = null) { texture.SetData(level, faceIndex, 0, 0, texture.CalculateMipWidth(level), texture.CalculateMipHeight(level), data, format, type, pixelUnpackBuffer); }
public static void SetData(this ITexture2DArray texture, int level, int slice, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer = null) { texture.SetData(level, 0, 0, slice, texture.CalculateMipWidth(level), texture.CalculateMipHeight(level), 1, data, format, type, pixelUnpackBuffer); }
public static void SetData(this ITexture1D texture, int level, IntPtr data, FormatColor format, FormatType type, IBuffer pixelUnpackBuffer = null) { texture.SetData(level, 0, texture.CalculateMipWidth(level), data, format, type, pixelUnpackBuffer); }