GLCanvasContext
Ploy3D / GLCanvasContext
Class: GLCanvasContext
GL画布关联的交换链。
Table of contents
Constructors
Methods
Constructors
constructor
• new GLCanvasContext(gl
)
构造函数。
Parameters
Name | Type |
---|---|
gl | WebGL2RenderingContext |
Methods
configure
▸ configure(config
): void
配置交换链。
Parameters
Name | Type |
---|---|
config | Object |
config.alphaMode | "opaque" | "premultiplied" |
config.colorSpace | "srgb" |
config.device | GLDevice |
config.format | GLTextureFormat |
config.height | number |
config.usage | number |
config.width | number |
Returns
void
getCurrentTexture
▸ getCurrentTexture(): GLTexture
获取交换链渲染贴图。
Returns
unconfigure
▸ unconfigure(): void
取消交换链配置。
Returns
void