跳到主要内容

egret.KTXContainer

   egret

   public class KTXContainer

!!!!!!!!inspired by Babylon.js!!!!!!!!!!!!!for description see https://www.khronos.org/opengles/sdk/tools/KTX/for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/Current families are astc, dxt, pvrtc, etc2, & etc1.

公共属性

属性
bytesOfKeyValueData : number
Gets the bytes of key value data
glBaseInternalFormat : number
Gets the base internal format
glFormat : number
Gets the openGL format
glInternalFormat : number
Gets the openGL internal format
glType : number
Gets the openGL type
glTypeSize : number
Gets the openGL type size
isInvalid :
If the container has been made invalid (eg. constructor failed to correctly load array buffer)
loadType : number
Gets the load type
numberOfArrayElements : number
Gets the number of array elements
numberOfFaces : number
Gets the number of faces
numberOfMipmapLevels : number
Gets the number of mipmap levels
pixelDepth : number
Gets image depth in pixels
pixelHeight : number
Gets image height in pixel
pixelWidth : number
Gets image width in pixel

公共方法

方法
KTXContainer(arrayBuffer:any,facesExpected:number,threeDExpected:boolean,textureArrayExpected:boolean)
Creates a new KhronosTextureContainer
uploadLevels(bitmapData:egret.BitmapData,loadMipmaps:boolean):void
Uploads KTX content to a Babylon Texture.It is assumed that the texture has already been created & is currently bound

属性详细信息

bytesOfKeyValueData

bytesOfKeyValueData : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the bytes of key value data

glBaseInternalFormat

glBaseInternalFormat : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the base internal format

glFormat

glFormat : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the openGL format

glInternalFormat

glInternalFormat : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the openGL internal format

glType

glType : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the openGL type

glTypeSize

glTypeSize : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the openGL type size

isInvalid

isInvalid : = false

  • 支持版本:all
  • 运行平台:Web,Native

If the container has been made invalid (eg. constructor failed to correctly load array buffer)

loadType

loadType : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the load type

numberOfArrayElements

numberOfArrayElements : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the number of array elements

numberOfFaces

numberOfFaces : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the number of faces

numberOfMipmapLevels

numberOfMipmapLevels : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets the number of mipmap levels

pixelDepth

pixelDepth : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets image depth in pixels

pixelHeight

pixelHeight : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets image height in pixel

pixelWidth

pixelWidth : number

  • 支持版本:all
  • 运行平台:Web,Native

Gets image width in pixel

方法详细信息

KTXContainer()

public KTXContainer(arrayBuffer:any,facesExpected:number,threeDExpected:boolean,textureArrayExpected:boolean)

Creates a new KhronosTextureContainer

  • 支持版本:all
  • 运行平台:Web,Native
  • 参数
    • arrayBuffer:any - contents of the KTX container file
    • facesExpected:number - should be either 1 or 6, based whether a cube texture or or
    • threeDExpected:boolean - provision for indicating that data should be a 3D texture, not implemented
    • textureArrayExpected:boolean - provision for indicating that data should be a texture array, not implemented

uploadLevels()

public uploadLevels(bitmapData:egret.BitmapData,loadMipmaps:boolean):void

Uploads KTX content to a Babylon Texture.It is assumed that the texture has already been created & is currently bound