示例#1
0
 /// <summary>
 /// Loads a compressed 1D texture.
 /// </summary>
 /// <param name="target">A <see cref="glTexture1DProxyTarget"/> specifying the texture target.</param>
 /// <param name="level">The level-of-detail to be filled.</param>
 /// <param name="internalformat">A <see cref="glInternalFormat"/> specifying the internal format to be used.</param>
 /// <param name="width">The width of the texture.</param>
 /// <param name="border">Must be zero for core profile.</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 CompressedTexImage1D(glTexture1DProxyTarget target, int level, glInternalFormat internalformat, int width, int border, int imageSize, long offset)
 {
     if (IntPtr.Size == 4 && ((long)offset >> 32) != 0)
     {
         throw new ArgumentOutOfRangeException("offset", PlatformErrorString);
     }
     _CompressedTexImage1D(target, level, internalformat, width, border, imageSize, (IntPtr)offset);
 }
示例#2
0
        /// <summary>
        /// Loads a compressed 1D texture.
        /// </summary>
        /// <param name="target">A <see cref="glTexture1DProxyTarget"/> specifying the texture target.</param>
        /// <param name="level">The level-of-detail to be filled.</param>
        /// <param name="internalformat">A <see cref="glInternalFormat"/> specifying the internal format to be used.</param>
        /// <param name="width">The width of the texture.</param>
        /// <param name="border">Must be zero for core profile.</param>
        /// <param name="imageSize">Size of the compressed texture in bytes.</param>
        /// <param name="pixels">Pointer to the pixels.</param>
        public static void CompressedTexImage1D(glTexture1DProxyTarget target, int level, glInternalFormat internalformat, int width, int border, int imageSize, byte[] pixels)
        {
            GCHandle hPixels = GCHandle.Alloc(pixels, GCHandleType.Pinned);

            try
            {
                _CompressedTexImage1D(target, level, internalformat, width, border, imageSize, hPixels.AddrOfPinnedObject());
            }
            finally
            {
                hPixels.Free();
            }
        }
示例#3
0
 /// <summary>
 /// Loads a compressed 1D texture.
 /// </summary>
 /// <param name="target">A <see cref="glTexture1DProxyTarget"/> specifying the texture target.</param>
 /// <param name="level">The level-of-detail to be filled.</param>
 /// <param name="internalformat">A <see cref="glInternalFormat"/> specifying the internal format to be used.</param>
 /// <param name="width">The width of the texture.</param>
 /// <param name="border">Must be zero for core profile.</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 CompressedTexImage1D(glTexture1DProxyTarget target, int level, glInternalFormat internalformat, int width, int border, int imageSize, int offset)
 {
     _CompressedTexImage1D(target, level, internalformat, width, border, imageSize, (IntPtr)offset);
 }