跳到主要内容

GLCanvasContext

Ploy3D / GLCanvasContext

Class: GLCanvasContext

GL画布关联的交换链。

Table of contents

Constructors

Methods

Constructors

constructor

new GLCanvasContext(gl)

构造函数。

Parameters

NameType
glWebGL2RenderingContext

Methods

configure

configure(config): void

配置交换链。

Parameters

NameType
configObject
config.alphaMode"opaque" | "premultiplied"
config.colorSpace"srgb"
config.deviceGLDevice
config.formatGLTextureFormat
config.heightnumber
config.usagenumber
config.widthnumber

Returns

void


getCurrentTexture

getCurrentTexture(): GLTexture

获取交换链渲染贴图。

Returns

GLTexture


unconfigure

unconfigure(): void

取消交换链配置。

Returns

void