正在准备搜索索引...
搜索索引不可用
LayaAir3引擎API
LayaAir3引擎API
laya/RenderDriver/WebGPUDriver/RenderDevice/WebGPUTextureContext
WebGPUTextureContext
类 WebGPUTextureContext
实现
ITextureContext
索引
构造函数
constructor
属性
need
Bitmap
方法
bindout
Screen
Target
bind
Render
Target
create
Render
Target
Cube
Internal
create
Render
Target
Depth
Texture
create
Render
Target
Internal
create
Render
Texture
Internal
create
Texture3DInternal
create
Texture
Internal
get
Render
Texture
Data
Async
init
Video
Texture
Data
read
Render
Target
Pixel
Data
read
Render
Target
Pixel
Data
Async
set
CubeDDSData
set
Cube
Image
Data
set
CubeKTXData
set
Cube
Pixels
Data
set
Cube
Sub
Pixel
Data
set
Texture3DImage
Data
set
Texture3DPixels
Data
set
Texture3DSub
Pixels
Data
set
Texture
Compare
Mode
set
TextureDDSData
set
TextureHDRData
set
Texture
Image
Data
set
TextureKTXData
set
Texture
Pixels
Data
set
Texture
Sub
Image
Data
set
Texture
Sub
Pixels
Data
unbind
Render
Target
update
Video
Texture
构造函数
constructor
new
WebGPUTextureContext
(
engine
:
WebGPURenderEngine
)
:
WebGPUTextureContext
参数
engine
:
WebGPURenderEngine
返回
WebGPUTextureContext
属性
need
Bitmap
needBitmap
:
boolean
方法
bindout
Screen
Target
bindoutScreenTarget
()
:
void
返回
void
bind
Render
Target
bindRenderTarget
(
renderTarget
:
InternalRenderTarget
,
faceIndex
?:
number
)
:
void
参数
renderTarget
:
InternalRenderTarget
可选
faceIndex
:
number
返回
void
create
Render
Target
Cube
Internal
createRenderTargetCubeInternal
(
size
:
number
,
colorFormat
:
RenderTargetFormat
,
depthStencilFormat
:
RenderTargetFormat
,
generateMipmap
:
boolean
,
sRGB
:
boolean
,
multiSamples
:
number
,
)
:
InternalRenderTarget
参数
size
:
number
colorFormat
:
RenderTargetFormat
depthStencilFormat
:
RenderTargetFormat
generateMipmap
:
boolean
sRGB
:
boolean
multiSamples
:
number
返回
InternalRenderTarget
create
Render
Target
Depth
Texture
createRenderTargetDepthTexture
(
renderTarget
:
WebGPUInternalRT
,
dimension
:
TextureDimension
,
width
:
number
,
height
:
number
,
)
:
WebGPUInternalTex
参数
renderTarget
:
WebGPUInternalRT
dimension
:
TextureDimension
width
:
number
height
:
number
返回
WebGPUInternalTex
create
Render
Target
Internal
createRenderTargetInternal
(
width
:
number
,
height
:
number
,
colorFormat
:
RenderTargetFormat
,
depthStencilFormat
:
RenderTargetFormat
,
generateMipmap
:
boolean
,
sRGB
:
boolean
,
multiSamples
:
number
,
)
:
InternalRenderTarget
参数
width
:
number
height
:
number
colorFormat
:
RenderTargetFormat
depthStencilFormat
:
RenderTargetFormat
generateMipmap
:
boolean
sRGB
:
boolean
multiSamples
:
number
返回
InternalRenderTarget
create
Render
Texture
Internal
createRenderTextureInternal
(
dimension
:
TextureDimension
,
width
:
number
,
height
:
number
,
format
:
RenderTargetFormat
,
generateMipmap
:
boolean
,
sRGB
:
boolean
,
)
:
InternalTexture
参数
dimension
:
TextureDimension
width
:
number
height
:
number
format
:
RenderTargetFormat
generateMipmap
:
boolean
sRGB
:
boolean
返回
InternalTexture
create
Texture3DInternal
createTexture3DInternal
(
dimension
:
TextureDimension
,
width
:
number
,
height
:
number
,
depth
:
number
,
format
:
TextureFormat
,
generateMipmap
:
boolean
,
sRGB
:
boolean
,
premultipliedAlpha
:
boolean
,
)
:
InternalTexture
参数
dimension
:
TextureDimension
width
:
number
height
:
number
depth
:
number
format
:
TextureFormat
generateMipmap
:
boolean
sRGB
:
boolean
premultipliedAlpha
:
boolean
返回
InternalTexture
create
Texture
Internal
createTextureInternal
(
dimension
:
TextureDimension
,
width
:
number
,
height
:
number
,
format
:
TextureFormat
,
generateMipmap
:
boolean
,
sRGB
:
boolean
,
premultipliedAlpha
:
boolean
,
)
:
InternalTexture
为 Texture 创建 InternalTexture
参数
dimension
:
TextureDimension
width
:
number
height
:
number
format
:
TextureFormat
generateMipmap
:
boolean
sRGB
:
boolean
premultipliedAlpha
:
boolean
返回
InternalTexture
get
Render
Texture
Data
Async
getRenderTextureDataAsync
(
internalTex
:
InternalRenderTarget
,
x
:
number
,
y
:
number
,
width
:
number
,
height
:
number
,
)
:
Promise
<
ArrayBufferView
>
参数
internalTex
:
InternalRenderTarget
x
:
number
y
:
number
width
:
number
height
:
number
返回
Promise
<
ArrayBufferView
>
init
Video
Texture
Data
initVideoTextureData
(
texture
:
WebGPUInternalTex
)
:
void
参数
texture
:
WebGPUInternalTex
返回
void
read
Render
Target
Pixel
Data
readRenderTargetPixelData
(
renderTarget
:
InternalRenderTarget
,
xOffset
:
number
,
yOffset
:
number
,
width
:
number
,
height
:
number
,
out
:
ArrayBufferView
,
)
:
ArrayBufferView
参数
renderTarget
:
InternalRenderTarget
xOffset
:
number
yOffset
:
number
width
:
number
height
:
number
out
:
ArrayBufferView
返回
ArrayBufferView
已被弃用
请使用readRenderTargetPixelDataAsync函数代替
read
Render
Target
Pixel
Data
Async
readRenderTargetPixelDataAsync
(
renderTarget
:
InternalRenderTarget
,
xOffset
:
number
,
yOffset
:
number
,
width
:
number
,
height
:
number
,
out
:
ArrayBufferView
,
)
:
Promise
<
ArrayBufferView
>
参数
renderTarget
:
InternalRenderTarget
xOffset
:
number
yOffset
:
number
width
:
number
height
:
number
out
:
ArrayBufferView
返回
Promise
<
ArrayBufferView
>
set
CubeDDSData
setCubeDDSData
(
texture
:
WebGPUInternalTex
,
ddsInfo
:
DDSTextureInfo
)
:
void
参数
texture
:
WebGPUInternalTex
ddsInfo
:
DDSTextureInfo
返回
void
set
Cube
Image
Data
setCubeImageData
(
texture
:
InternalTexture
,
source
:
(
HTMLImageElement
|
HTMLCanvasElement
|
ImageBitmap
)
[]
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
InternalTexture
source
: (
HTMLImageElement
|
HTMLCanvasElement
|
ImageBitmap
)
[]
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
CubeKTXData
setCubeKTXData
(
texture
:
WebGPUInternalTex
,
ktxInfo
:
KTXTextureInfo
)
:
void
参数
texture
:
WebGPUInternalTex
ktxInfo
:
KTXTextureInfo
返回
void
set
Cube
Pixels
Data
setCubePixelsData
(
texture
:
WebGPUInternalTex
,
source
:
ArrayBufferView
[]
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
WebGPUInternalTex
source
:
ArrayBufferView
[]
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
Cube
Sub
Pixel
Data
setCubeSubPixelData
(
texture
:
WebGPUInternalTex
,
source
:
ArrayBufferView
[]
,
mipmapLevel
:
number
,
generateMipmap
:
boolean
,
xOffset
:
number
,
yOffset
:
number
,
width
:
number
,
height
:
number
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
WebGPUInternalTex
source
:
ArrayBufferView
[]
mipmapLevel
:
number
generateMipmap
:
boolean
xOffset
:
number
yOffset
:
number
width
:
number
height
:
number
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
Texture3DImage
Data
setTexture3DImageData
(
texture
:
InternalTexture
,
source
:
HTMLImageElement
[]
|
HTMLCanvasElement
[]
|
ImageBitmap
[]
,
depth
:
number
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
Promise
<
void
>
参数
texture
:
InternalTexture
source
:
HTMLImageElement
[]
|
HTMLCanvasElement
[]
|
ImageBitmap
[]
depth
:
number
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
Promise
<
void
>
set
Texture3DPixels
Data
setTexture3DPixelsData
(
texture
:
WebGPUInternalTex
,
source
:
ArrayBufferView
,
depth
:
number
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
WebGPUInternalTex
source
:
ArrayBufferView
depth
:
number
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
Texture3DSub
Pixels
Data
setTexture3DSubPixelsData
(
texture
:
WebGPUInternalTex
,
source
:
ArrayBufferView
,
mipmapLevel
:
number
,
generateMipmap
:
boolean
,
xOffset
:
number
,
yOffset
:
number
,
zOffset
:
number
,
width
:
number
,
height
:
number
,
depth
:
number
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
WebGPUInternalTex
source
:
ArrayBufferView
mipmapLevel
:
number
generateMipmap
:
boolean
xOffset
:
number
yOffset
:
number
zOffset
:
number
width
:
number
height
:
number
depth
:
number
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
Texture
Compare
Mode
setTextureCompareMode
(
texture
:
InternalTexture
,
compareMode
:
TextureCompareMode
,
)
:
TextureCompareMode
参数
texture
:
InternalTexture
compareMode
:
TextureCompareMode
返回
TextureCompareMode
set
TextureDDSData
setTextureDDSData
(
texture
:
WebGPUInternalTex
,
ddsInfo
:
DDSTextureInfo
)
:
void
参数
texture
:
WebGPUInternalTex
ddsInfo
:
DDSTextureInfo
返回
void
set
TextureHDRData
setTextureHDRData
(
texture
:
WebGPUInternalTex
,
hdrInfo
:
HDRTextureInfo
)
:
void
参数
texture
:
WebGPUInternalTex
hdrInfo
:
HDRTextureInfo
返回
void
set
Texture
Image
Data
setTextureImageData
(
texture
:
InternalTexture
,
source
:
HTMLImageElement
|
HTMLCanvasElement
|
ImageBitmap
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
Promise
<
void
>
参数
texture
:
InternalTexture
source
:
HTMLImageElement
|
HTMLCanvasElement
|
ImageBitmap
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
Promise
<
void
>
set
TextureKTXData
setTextureKTXData
(
texture
:
WebGPUInternalTex
,
ktxInfo
:
KTXTextureInfo
)
:
void
参数
texture
:
WebGPUInternalTex
ktxInfo
:
KTXTextureInfo
返回
void
set
Texture
Pixels
Data
setTexturePixelsData
(
texture
:
WebGPUInternalTex
,
source
:
ArrayBufferView
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
WebGPUInternalTex
source
:
ArrayBufferView
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
Texture
Sub
Image
Data
setTextureSubImageData
(
texture
:
InternalTexture
,
source
:
HTMLImageElement
|
HTMLCanvasElement
|
ImageBitmap
,
x
:
number
,
y
:
number
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
InternalTexture
source
:
HTMLImageElement
|
HTMLCanvasElement
|
ImageBitmap
x
:
number
y
:
number
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
set
Texture
Sub
Pixels
Data
setTextureSubPixelsData
(
texture
:
WebGPUInternalTex
,
source
:
ArrayBufferView
,
mipmapLevel
:
number
,
generateMipmap
:
boolean
,
xOffset
:
number
,
yOffset
:
number
,
width
:
number
,
height
:
number
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
void
参数
texture
:
WebGPUInternalTex
source
:
ArrayBufferView
mipmapLevel
:
number
generateMipmap
:
boolean
xOffset
:
number
yOffset
:
number
width
:
number
height
:
number
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
void
unbind
Render
Target
unbindRenderTarget
(
renderTarget
:
InternalRenderTarget
)
:
void
参数
renderTarget
:
InternalRenderTarget
返回
void
update
Video
Texture
updateVideoTexture
(
texture
:
InternalTexture
,
video
:
HTMLVideoElement
,
premultiplyAlpha
:
boolean
,
invertY
:
boolean
,
)
:
Promise
<
void
>
参数
texture
:
InternalTexture
video
:
HTMLVideoElement
premultiplyAlpha
:
boolean
invertY
:
boolean
返回
Promise
<
void
>
切换版本:
显示设置
成员可见性
继承
外部
配色
自动
浅色
深色
目录
构造函数
constructor
属性
need
Bitmap
方法
bindout
Screen
Target
bind
Render
Target
create
Render
Target
Cube
Internal
create
Render
Target
Depth
Texture
create
Render
Target
Internal
create
Render
Texture
Internal
create
Texture3DInternal
create
Texture
Internal
get
Render
Texture
Data
Async
init
Video
Texture
Data
read
Render
Target
Pixel
Data
read
Render
Target
Pixel
Data
Async
set
CubeDDSData
set
Cube
Image
Data
set
CubeKTXData
set
Cube
Pixels
Data
set
Cube
Sub
Pixel
Data
set
Texture3DImage
Data
set
Texture3DPixels
Data
set
Texture3DSub
Pixels
Data
set
Texture
Compare
Mode
set
TextureDDSData
set
TextureHDRData
set
Texture
Image
Data
set
TextureKTXData
set
Texture
Pixels
Data
set
Texture
Sub
Image
Data
set
Texture
Sub
Pixels
Data
unbind
Render
Target
update
Video
Texture
LayaAir3引擎API
加载中……
为 Texture 创建 InternalTexture