mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
WebGLRenderer.whiteTexture
is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering.
This commit is contained in:
parent
81b63cdf20
commit
81800e0ce2
1 changed files with 14 additions and 4 deletions
|
@ -445,6 +445,17 @@ var WebGLRenderer = new Class({
|
|||
*/
|
||||
this.blankTexture = null;
|
||||
|
||||
/**
|
||||
* A pure white 4x4 texture, as used by the Graphics system where needed.
|
||||
* This is set in the `boot` method.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.WebGLRenderer#whiteTexture
|
||||
* @type {WebGLTexture}
|
||||
* @readonly
|
||||
* @since 3.50.0
|
||||
*/
|
||||
this.whiteTexture = null;
|
||||
|
||||
/**
|
||||
* A default Camera used in calls when no other camera has been provided.
|
||||
*
|
||||
|
@ -826,11 +837,10 @@ var WebGLRenderer = new Class({
|
|||
|
||||
var multi = this.pipelines.get(PIPELINE_CONST.MULTI_PIPELINE);
|
||||
|
||||
var blank = game.textures.getFrame('__DEFAULT');
|
||||
this.blankTexture = game.textures.getFrame('__DEFAULT');
|
||||
this.whiteTexture = game.textures.getFrame('__WHITE');
|
||||
|
||||
multi.currentFrame = blank;
|
||||
|
||||
this.blankTexture = blank;
|
||||
multi.currentFrame = this.whiteTexture;
|
||||
|
||||
var gl = this.gl;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue