Example #1
0
 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);
     }
 }
Example #2
0
 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);
 }
Example #3
0
 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);
 }
Example #4
0
 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);
 }
Example #5
0
 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);
 }
Example #6
0
 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);
 }
Example #7
0
 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);
 }
Example #8
0
 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);
 }
Example #9
0
 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);
 }
Example #10
0
 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);
 }
Example #11
0
 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);
 }