/// <summary> /// Loads a compressed texture as part a 1D texture. /// </summary> /// <param name="target">A <see cref="glTexture1DTarget"/> specifying the texture target.</param> /// <param name="level">The level-of-detail to be filled.</param> /// <param name="xoffset">The horizontal texel offset.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="format">A <see cref="glInternalFormat"/> specifying the format of the compressed data.</param> /// <param name="imageSize">Size of the compressed texture in bytes.</param> /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.PIXEL_UNPACK_BUFFER"/>.</param> public static void CompressedTexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glInternalFormat format, int imageSize, long offset) { if (IntPtr.Size == 4 && ((long)offset >> 32) != 0) { throw new ArgumentOutOfRangeException("offset", PlatformErrorString); } _CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, (IntPtr)offset); }
/// <summary> /// Loads a part a 1D texture. /// </summary> /// <param name="target">A <see cref="glTexture1DTarget"/> specifying the texture target.</param> /// <param name="level">The level-of-detail to be filled.</param> /// <param name="xoffset">The horizontal texel offset.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="format">A <see cref="glPixelFormat"/> specifying the format the pixels a given in.</param> /// <param name="type">A <see cref="glPixelDataType"/> specifying the data type the pixels a given in.</param> /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.PIXEL_UNPACK_BUFFER"/>.</param> public static void TexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glPixelFormat format, glPixelDataType type, long offset) { if (IntPtr.Size == 4 && ((long)offset >> 32) != 0) { throw new ArgumentOutOfRangeException("offset", PlatformErrorString); } TexSubImage1D(target, level, xoffset, width, format, type, offset); }
/// <summary> /// Loads a compressed texture as part a 1D texture. /// </summary> /// <param name="target">A <see cref="glTexture1DTarget"/> specifying the texture target.</param> /// <param name="level">The level-of-detail to be filled.</param> /// <param name="xoffset">The horizontal texel offset.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="format">A <see cref="glInternalFormat"/> specifying the format of the compressed data.</param> /// <param name="imageSize">Size of the compressed texture in bytes.</param> /// <param name="pixels">Pointer to the pixels.</param> public static void CompressedTexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glInternalFormat format, int imageSize, byte[] pixels) { GCHandle hPixels = GCHandle.Alloc(pixels, GCHandleType.Pinned); try { _CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, hPixels.AddrOfPinnedObject()); } finally { hPixels.Free(); } }
public static extern void TexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glPixelFormat format, glPixelDataType type, double[] pixels);
/// <summary> /// Loads a part a 1D texture. /// </summary> /// <param name="target">A <see cref="glTexture1DTarget"/> specifying the texture target.</param> /// <param name="level">The level-of-detail to be filled.</param> /// <param name="xoffset">The horizontal texel offset.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="format">A <see cref="glPixelFormat"/> specifying the format the pixels a given in.</param> /// <param name="type">A <see cref="glPixelDataType"/> specifying the data type the pixels a given in.</param> /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.PIXEL_UNPACK_BUFFER"/>.</param> public static void TexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glPixelFormat format, glPixelDataType type, int offset) { TexSubImage1D(target, level, xoffset, width, format, type, offset); }
public static extern void CopyTexSubImage1D(glTexture1DTarget target, int level, int xoffset, int x, int y, int width);
public static extern void CopyTexImage1D(glTexture1DTarget target, int level, glInternalFormat internalformat, int x, int y, int width, int border);
/// <summary> /// Loads a compressed texture as part a 1D texture. /// </summary> /// <param name="target">A <see cref="glTexture1DTarget"/> specifying the texture target.</param> /// <param name="level">The level-of-detail to be filled.</param> /// <param name="xoffset">The horizontal texel offset.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="format">A <see cref="glInternalFormat"/> specifying the format of the compressed data.</param> /// <param name="imageSize">Size of the compressed texture in bytes.</param> /// <param name="offset">The offset into the array bound to <see cref="glBufferTarget.PIXEL_UNPACK_BUFFER"/>.</param> public static void CompressedTexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glInternalFormat format, int imageSize, int offset) { _CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, (IntPtr)offset); }