![]() | TextureUploadCompressedT Method |
Namespace: Ooogles
public void UploadCompressed<T>( int format, int width, int height, T[] data, int level = 0, int cubeTarget = 0 ) where T : struct, new()
Exception | Condition |
---|---|
GLException | InvalidEnum if format is not a supported format returned in CompressedTextureFormats. |
GLException | InvalidValue if level is less than 0 or greater than the maximum level. |
GLException | InvalidValue if width or height is less than 0 or greater than the maximum texture size. |
GLException | InvalidValue if the length of data is not consistent with the format, dimensions, and contents of the specified compressed image data. |
GLException | InvalidOperation if parameter combinations are not supported by the specific compressed internal format as specified in the specific texture compression extension. |
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is active. Texturing is active when the current fragment shader or vertex shader makes use of built-in texture lookup functions.
This method defines a two-dimensional texture image or cube-map texture image using compressed image data from client memory. The texture image is decoded according to the extension specification defining the specified format. OpenGL ES defines no specific compressed texture formats, but does provide a mechanism to obtain symbolic constants for such formats provided by extensions. The list of specific compressed texture formats supported can be obtained by CompressedTextureFormats.
Note: a GL implementation may choose to store the texture array at any internal resolution it chooses.
Note: this method specifies a two-dimensional or cube-map texture for the current texture unit, specified with BindToTextureUnit(Int32).
Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this texture is not bound.
Note: Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
OpenGL API: glCompressedTexImage2D