> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
This module provides WebGL APIs that correspond to the OpenGL ES 2.0 feature set. For more information, see [WebGL™](https://www.khronos.org/registry/webgl/specs/latest/1.0/).
## Modules to Import
```
import webgl from 'ohos.webglnapi'
```
## System Capabilities
SystemCapability.Graphic.Graphic2D.WebGL
## Invoking Method
```
// Obtain the <canvas\> component instance.
const el = this.$refs.canvas
// Obtain the WebGL context from the <canvas\> component instance.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
This module provides WebGL APIs that correspond to the OpenGL ES 3.0 feature set. For more information, see [WebGL™](https://www.khronos.org/registry/webgl/specs/latest/2.0/).
## Modules to Import
```
import webgl from 'ohos.webglnapi'
```
## System Capabilities
SystemCapability.Graphic.Graphic2D.WebGL2
## Invoking Method
```
// Obtain the <canvas\> component instance.
const el = this.$refs.canvas
// Obtain the WebGL context from the <canvas\> component instance.