Esempio n. 1
0
 /// <summary>
 /// Loads a 3D texture.
 /// </summary>
 /// <param name="target">A <see cref="glTexture3DProxyTarget"/> 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="height">The height of the texture.</param>
 /// <param name="depth">The depth of the texture.</param>
 /// <param name="border">Must be zero for core profile.</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 TexImage3D(glTexture3DProxyTarget target, int level, glInternalFormat internalformat, int width, int height, int depth, int border, glPixelFormat format, glPixelDataType type, long offset)
 {
     if (IntPtr.Size == 4 && ((long)offset >> 32) != 0)
     {
         throw new ArgumentOutOfRangeException("offset", PlatformErrorString);
     }
     _TexImage3D(target, level, internalformat, width, height, depth, border, format, type, (IntPtr)offset);
 }
Esempio n. 2
0
        /// <summary>
        /// Loads a 3D texture. (For future use. Type not yet supported.)
        /// </summary>
        /// <param name="target">A <see cref="glTexture3DProxyTarget"/> 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="height">The height of the texture.</param>
        /// <param name="depth">The depth of the texture.</param>
        /// <param name="border">Must be zero for core profile.</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="pixels">Pointer to the pixels.</param>
        public static void TexImage3D(glTexture3DProxyTarget target, int level, glInternalFormat internalformat, int width, int height, int depth, int border, glPixelFormat format, glPixelDataType type, double[] pixels)
        {
            GCHandle hPixels = GCHandle.Alloc(pixels, GCHandleType.Pinned);

            try
            {
                _TexImage3D(target, level, internalformat, width, height, depth, border, format, type, hPixels.AddrOfPinnedObject());
            }
            finally
            {
                hPixels.Free();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Loads a compressed 3D texture.
        /// </summary>
        /// <param name="target">A <see cref="glTexture3DProxyTarget"/> 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="height">The height of the texture.</param>
        /// <param name="depth">The depth 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 CompressedTexImage3D(glTexture3DProxyTarget target, int level, glInternalFormat internalformat, int width, int height, int depth, int border, int imageSize, byte[] pixels)
        {
            GCHandle hPixels = GCHandle.Alloc(pixels, GCHandleType.Pinned);

            try
            {
                _CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, hPixels.AddrOfPinnedObject());
            }
            finally
            {
                hPixels.Free();
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Loads a 3D texture.
 /// </summary>
 /// <param name="target">A <see cref="glTexture3DProxyTarget"/> 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="height">The height of the texture.</param>
 /// <param name="depth">The depth of the texture.</param>
 /// <param name="border">Must be zero for core profile.</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 TexImage3D(glTexture3DProxyTarget target, int level, glInternalFormat internalformat, int width, int height, int depth, int border, glPixelFormat format, glPixelDataType type, int offset)
 {
     _TexImage3D(target, level, internalformat, width, height, depth, border, format, type, (IntPtr)offset);
 }
Esempio n. 5
0
 /// <summary>
 /// Loads a compressed 3D texture.
 /// </summary>
 /// <param name="target">A <see cref="glTexture3DProxyTarget"/> 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="height">The height of the texture.</param>
 /// <param name="depth">The depth 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 CompressedTexImage3D(glTexture3DProxyTarget target, int level, glInternalFormat internalformat, int width, int height, int depth, int border, int imageSize, int offset)
 {
     _CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, (IntPtr)offset);
 }