/// <summary> /// Loads a part a 3D texture. (For future use. Type not yet supported.) /// </summary> /// <param name="target">A <see cref="glTexture3DTarget"/> 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="yoffset">The vertical texel offset.</param> /// <param name="zoffset">The texel offset in z-direction.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="height">The height of the texture.</param> /// <param name="depth">The depth of the texture.</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 TexSubImage3D(glTexture3DTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, glPixelFormat format, glPixelDataType type, double[] pixels) { GCHandle hPixels = GCHandle.Alloc(pixels, GCHandleType.Pinned); try { _TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, hPixels.AddrOfPinnedObject()); } finally { hPixels.Free(); } }
/// <summary> /// Loads a part a 3D texture. /// </summary> /// <param name="target">A <see cref="glTexture3DTarget"/> 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="yoffset">The vertical texel offset.</param> /// <param name="zoffset">The texel offset in z-direction.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="height">The height of the texture.</param> /// <param name="depth">The depth of the texture.</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 TexSubImage3D(glTexture3DTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, glPixelFormat format, glPixelDataType type, int offset) { _TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (IntPtr)offset); }
/// <summary> /// Loads a part a 3D texture. /// </summary> /// <param name="target">A <see cref="glTexture3DTarget"/> 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="yoffset">The vertical texel offset.</param> /// <param name="zoffset">The texel offset in z-direction.</param> /// <param name="width">The width of the texture subimage.</param> /// <param name="height">The height of the texture.</param> /// <param name="depth">The depth of the texture.</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 TexSubImage3D(glTexture3DTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, glPixelFormat format, glPixelDataType type, long offset) { if (IntPtr.Size == 4 && ((long)offset >> 32) != 0) { throw new ArgumentOutOfRangeException("offset", PlatformErrorString); } _TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (IntPtr)offset); }
/// <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(); } }
/// <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); }
public static extern void TexSubImage2D(glTexture2DTarget target, int level, int xoffset, int yoffset, int width, int height, glPixelFormat format, glPixelDataType type, double[] pixels);
public static extern void TexSubImage1D(glTexture1DTarget target, int level, int xoffset, int width, glPixelFormat format, glPixelDataType type, float[] 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); }