mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
WebGLRenderer.vaoExtension
is a new property that holds a reference to the Vertex Array Object WebGL Extension, if supported by the browser.
This commit is contained in:
parent
0a695e6061
commit
2d43561e1a
1 changed files with 15 additions and 0 deletions
|
@ -403,6 +403,17 @@ var WebGLRenderer = new Class({
|
|||
*/
|
||||
this.instancedArraysExtension = null;
|
||||
|
||||
/**
|
||||
* If the browser supports the `OES_vertex_array_object` extension, this property will hold
|
||||
* a reference to the glExtension for it.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.WebGLRenderer#vaoExtension
|
||||
* @type {OES_vertex_array_object}
|
||||
* @default null
|
||||
* @since 3.50.0
|
||||
*/
|
||||
this.vaoExtension = null;
|
||||
|
||||
/**
|
||||
* The WebGL Extensions loaded into the current context.
|
||||
*
|
||||
|
@ -785,6 +796,10 @@ var WebGLRenderer = new Class({
|
|||
|
||||
this.instancedArraysExtension = (exts.indexOf(angleString) > -1) ? gl.getExtension(angleString) : null;
|
||||
|
||||
var vaoString = 'OES_vertex_array_object';
|
||||
|
||||
this.vaoExtension = (exts.indexOf(vaoString) > -1) ? gl.getExtension(vaoString) : null;
|
||||
|
||||
// Setup initial WebGL state
|
||||
gl.disable(gl.DEPTH_TEST);
|
||||
gl.disable(gl.CULL_FACE);
|
||||
|
|
Loading…
Reference in a new issue