IT. Expert System.

Android Reference

ETC1Util


android.opengl

Class ETC1Util



  • public class ETC1Util
    extends Object
    Utility methods for using ETC1 compressed textures.
    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class ETC1Util.ETC1Texture
      A utility class encapsulating a compressed ETC1 texture.
    • Constructor Summary

      Constructors
      Constructor and Description
      ETC1Util()
    • Constructor Detail

      • ETC1Util

        public ETC1Util()
    • Method Detail

      • loadTexture

        public static void loadTexture(int target,
                       int level,
                       int border,
                       int fallbackFormat,
                       int fallbackType,
                       InputStream input)
                                throws IOException
        Convenience method to load an ETC1 texture whether or not the active OpenGL context supports the ETC1 texture compression format.
        Parameters:
        target - the texture target.
        level - the texture level
        border - the border size. Typically 0.
        fallbackFormat - the format to use if ETC1 texture compression is not supported. Must be GL_RGB.
        fallbackType - the type to use if ETC1 texture compression is not supported. Can be either GL_UNSIGNED_SHORT_5_6_5, which implies 16-bits-per-pixel, or GL_UNSIGNED_BYTE, which implies 24-bits-per-pixel.
        input - the input stream containing an ETC1 texture in PKM format.
        Throws:
        IOException
      • loadTexture

        public static void loadTexture(int target,
                       int level,
                       int border,
                       int fallbackFormat,
                       int fallbackType,
                       ETC1Util.ETC1Texture texture)
        Convenience method to load an ETC1 texture whether or not the active OpenGL context supports the ETC1 texture compression format.
        Parameters:
        target - the texture target.
        level - the texture level
        border - the border size. Typically 0.
        fallbackFormat - the format to use if ETC1 texture compression is not supported. Must be GL_RGB.
        fallbackType - the type to use if ETC1 texture compression is not supported. Can be either GL_UNSIGNED_SHORT_5_6_5, which implies 16-bits-per-pixel, or GL_UNSIGNED_BYTE, which implies 24-bits-per-pixel.
        texture - the ETC1 to load.
      • isETC1Supported

        public static boolean isETC1Supported()
        Check if ETC1 texture compression is supported by the active OpenGL ES context.
        Returns:
        true if the active OpenGL ES context supports ETC1 texture compression.
      • createTexture

        public static ETC1Util.ETC1Texture createTexture(InputStream input)
                                                  throws IOException
        Create a new ETC1Texture from an input stream containing a PKM formatted compressed texture.
        Parameters:
        input - an input stream containing a PKM formatted compressed texture.
        Returns:
        an ETC1Texture read from the input stream.
        Throws:
        IOException
      • compressTexture

        public static ETC1Util.ETC1Texture compressTexture(Buffer input,
                                           int width,
                                           int height,
                                           int pixelSize,
                                           int stride)
        Helper function that compresses an image into an ETC1Texture.
        Parameters:
        input - a native order direct buffer containing the image data
        width - the width of the image in pixels
        height - the height of the image in pixels
        pixelSize - the size of a pixel in bytes (2 or 3)
        stride - the width of a line of the image in bytes
        Returns:
        the ETC1 texture.
      • writeTexture

        public static void writeTexture(ETC1Util.ETC1Texture texture,
                        OutputStream output)
                                 throws IOException
        Helper function that writes an ETC1Texture to an output stream formatted as a PKM file.
        Parameters:
        texture - the input texture.
        output - the stream to write the formatted texture data to.
        Throws:
        IOException


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 160 / 96389525. Delta: 0.03982 с