You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
344 B
JavaScript
27 lines
344 B
JavaScript
2 years ago
|
class WebGLExtensions {
|
||
|
|
||
|
constructor( backend ) {
|
||
|
|
||
|
this.backend = backend;
|
||
|
|
||
|
this.gl = this.backend.gl;
|
||
|
this.availableExtensions = this.gl.getSupportedExtensions();
|
||
|
|
||
|
}
|
||
|
|
||
|
get( name ) {
|
||
|
|
||
|
return this.gl.getExtension( name );
|
||
|
|
||
|
}
|
||
|
|
||
|
has( name ) {
|
||
|
|
||
|
return this.availableExtensions.includes( name );
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
export default WebGLExtensions;
|