interface ITextureContext {
    needBitmap: boolean;
    bindoutScreenTarget(): void;
    bindRenderTarget(
        renderTarget: InternalRenderTarget,
        faceIndex?: number,
    ): void;
    createRenderTargetCubeInternal(
        size: number,
        colorFormat: RenderTargetFormat,
        depthStencilFormat: RenderTargetFormat,
        generateMipmap: boolean,
        sRGB: boolean,
        multiSamples: number,
    ): InternalRenderTarget;
    createRenderTargetDepthTexture(
        renderTarget: InternalRenderTarget,
        dimension: TextureDimension,
        width: number,
        height: number,
    ): InternalTexture;
    createRenderTargetInternal(
        width: number,
        height: number,
        format: RenderTargetFormat,
        depthStencilFormat: RenderTargetFormat,
        generateMipmap: boolean,
        sRGB: boolean,
        multiSamples: number,
    ): InternalRenderTarget;
    createTexture3DInternal(
        dimension: TextureDimension,
        width: number,
        height: number,
        depth: number,
        format: TextureFormat,
        generateMipmap: boolean,
        sRGB: boolean,
        premultipliedAlpha: boolean,
    ): InternalTexture;
    createTextureInternal(
        dimension: TextureDimension,
        width: number,
        height: number,
        format: TextureFormat,
        generateMipmap: boolean,
        sRGB: boolean,
        premultipliedAlpha: boolean,
    ): InternalTexture;
    initVideoTextureData(texture: InternalTexture): void;
    readRenderTargetPixelData(
        renderTarget: InternalRenderTarget,
        xOffset: number,
        yOffset: number,
        width: number,
        height: number,
        out: ArrayBufferView,
    ): ArrayBufferView;
    readRenderTargetPixelDataAsync(
        renderTarget: InternalRenderTarget,
        xOffset: number,
        yOffset: number,
        width: number,
        height: number,
        out: ArrayBufferView,
    ): Promise<ArrayBufferView>;
    setCubeDDSData(texture: InternalTexture, ddsInfo: DDSTextureInfo): void;
    setCubeImageData(
        texture: InternalTexture,
        sources: (HTMLImageElement | HTMLCanvasElement | ImageBitmap)[],
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setCubeKTXData(texture: InternalTexture, ktxInfo: KTXTextureInfo): void;
    setCubePixelsData(
        texture: InternalTexture,
        source: ArrayBufferView[],
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setCubeSubPixelData(
        texture: InternalTexture,
        source: ArrayBufferView[],
        mipmapLevel: number,
        generateMipmap: boolean,
        xOffset: number,
        yOffset: number,
        width: number,
        height: number,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTexture3DImageData(
        texture: InternalTexture,
        source: HTMLImageElement[] | HTMLCanvasElement[] | ImageBitmap[],
        depth: number,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTexture3DPixelsData(
        texture: InternalTexture,
        source: ArrayBufferView,
        depth: number,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTexture3DSubPixelsData(
        texture: InternalTexture,
        source: ArrayBufferView,
        mipmapLevel: number,
        generateMipmap: boolean,
        xOffset: number,
        yOffset: number,
        zOffset: number,
        width: number,
        height: number,
        depth: number,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTextureCompareMode(
        texture: InternalTexture,
        compareMode: TextureCompareMode,
    ): TextureCompareMode;
    setTextureDDSData(texture: InternalTexture, ddsInfo: DDSTextureInfo): void;
    setTextureHDRData(texture: InternalTexture, hdrInfo: HDRTextureInfo): void;
    setTextureImageData(
        texture: InternalTexture,
        source: HTMLImageElement | HTMLCanvasElement | ImageBitmap,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTextureKTXData(texture: InternalTexture, ktxInfo: KTXTextureInfo): void;
    setTexturePixelsData(
        texture: InternalTexture,
        source: ArrayBufferView,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTextureSubImageData(
        texture: InternalTexture,
        source: HTMLImageElement | HTMLCanvasElement | ImageBitmap,
        x: number,
        y: number,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    setTextureSubPixelsData(
        texture: InternalTexture,
        source: ArrayBufferView,
        mipmapLevel: number,
        generateMipmap: boolean,
        xOffset: number,
        yOffset: number,
        width: number,
        height: number,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
    unbindRenderTarget(renderTarget: InternalRenderTarget): void;
    updateVideoTexture(
        texture: InternalTexture,
        video: HTMLVideoElement,
        premultiplyAlpha: boolean,
        invertY: boolean,
    ): void;
}

实现于

属性

needBitmap: boolean

方法

  • 参数

    • texture: InternalTexture
    • source: ArrayBufferView[]
    • mipmapLevel: number
    • generateMipmap: boolean
    • xOffset: number
    • yOffset: number
    • width: number
    • height: number
    • premultiplyAlpha: boolean
    • invertY: boolean

    返回 void

  • 参数

    • texture: InternalTexture
    • source: ArrayBufferView
    • mipmapLevel: number
    • generateMipmap: boolean
    • xOffset: number
    • yOffset: number
    • zOffset: number
    • width: number
    • height: number
    • depth: number
    • premultiplyAlpha: boolean
    • invertY: boolean

    返回 void

  • 参数

    • texture: InternalTexture
    • source: ArrayBufferView
    • mipmapLevel: number
    • generateMipmap: boolean
    • xOffset: number
    • yOffset: number
    • width: number
    • height: number
    • premultiplyAlpha: boolean
    • invertY: boolean

    返回 void