Skip to content

Commit 0dd0733

Browse files
committed
Updated to use MultiPipeline
1 parent 5f1ecfe commit 0dd0733

9 files changed

Lines changed: 35 additions & 34 deletions

File tree

src/cameras/2d/effects/Fade.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ var Fade = new Class({
301301
* @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL
302302
* @since 3.5.0
303303
*
304-
* @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.
304+
* @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method.
305305
* @param {function} getTintFunction - A function that will return the gl safe tint colors.
306306
*
307307
* @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.

src/cameras/2d/effects/Flash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ var Flash = new Class({
269269
* @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL
270270
* @since 3.5.0
271271
*
272-
* @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.
272+
* @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method.
273273
* @param {function} getTintFunction - A function that will return the gl safe tint colors.
274274
*
275275
* @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.

src/gameobjects/components/Pipeline.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,20 @@ var Pipeline = {
3838

3939
/**
4040
* Sets the initial WebGL Pipeline of this Game Object.
41+
*
4142
* This should only be called during the instantiation of the Game Object.
4243
*
4344
* @method Phaser.GameObjects.Components.Pipeline#initPipeline
4445
* @webglOnly
4546
* @since 3.0.0
4647
*
47-
* @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline.
48+
* @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.
4849
*
4950
* @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.
5051
*/
5152
initPipeline: function (pipelineName)
5253
{
53-
if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; }
54+
if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }
5455

5556
var renderer = this.scene.sys.game.renderer;
5657

src/physics/matter-js/MatterImage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ var MatterImage = new Class({
132132

133133
this.setPosition(x, y);
134134

135-
this.initPipeline('TextureTintPipeline');
135+
this.initPipeline('MultiPipeline');
136136
}
137137

138138
});

src/physics/matter-js/MatterSprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ var MatterSprite = new Class({
138138

139139
this.setPosition(x, y);
140140

141-
this.initPipeline('TextureTintPipeline');
141+
this.initPipeline('MultiPipeline');
142142
}
143143

144144
});

src/renderer/webgl/WebGLRenderer.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,7 @@ var WebGLRenderer = new Class({
21882188
var cw = camera._cw;
21892189
var ch = camera._ch;
21902190

2191-
var TextureTintPipeline = this.pipelines.TextureTintPipeline;
2191+
var MultiPipeline = this.pipelines.MultiPipeline;
21922192

21932193
var color = camera.backgroundColor;
21942194

@@ -2206,7 +2206,7 @@ var WebGLRenderer = new Class({
22062206

22072207
gl.clear(gl.COLOR_BUFFER_BIT);
22082208

2209-
ProjectOrtho(TextureTintPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000);
2209+
ProjectOrtho(MultiPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000);
22102210

22112211
if (camera.mask)
22122212
{
@@ -2218,7 +2218,7 @@ var WebGLRenderer = new Class({
22182218

22192219
if (color.alphaGL > 0)
22202220
{
2221-
TextureTintPipeline.drawFillRect(
2221+
MultiPipeline.drawFillRect(
22222222
cx, cy, cw + cx, ch + cy,
22232223
Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),
22242224
color.alphaGL
@@ -2241,7 +2241,7 @@ var WebGLRenderer = new Class({
22412241

22422242
if (color.alphaGL > 0)
22432243
{
2244-
TextureTintPipeline.drawFillRect(
2244+
MultiPipeline.drawFillRect(
22452245
cx, cy, cw , ch,
22462246
Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),
22472247
color.alphaGL
@@ -2286,32 +2286,32 @@ var WebGLRenderer = new Class({
22862286
*/
22872287
postRenderCamera: function (camera)
22882288
{
2289-
this.setPipeline(this.pipelines.TextureTintPipeline);
2289+
this.setPipeline(this.pipelines.MultiPipeline);
22902290

2291-
var TextureTintPipeline = this.pipelines.TextureTintPipeline;
2291+
var MultiPipeline = this.pipelines.MultiPipeline;
22922292

2293-
camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);
2294-
camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);
2293+
camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats);
2294+
camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats);
22952295

22962296
camera.dirty = false;
22972297

22982298
this.popScissor();
22992299

23002300
if (camera.renderToTexture)
23012301
{
2302-
TextureTintPipeline.flush();
2302+
MultiPipeline.flush();
23032303

23042304
this.setFramebuffer(null);
23052305

23062306
camera.emit(CameraEvents.POST_RENDER, camera);
23072307

23082308
if (camera.renderToGame)
23092309
{
2310-
ProjectOrtho(TextureTintPipeline, 0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0);
2310+
ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0);
23112311

23122312
var getTint = Utils.getTintAppendFloatAlpha;
23132313

2314-
var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline;
2314+
var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline;
23152315

23162316
pipeline.batchTexture(
23172317
camera,
@@ -2397,7 +2397,7 @@ var WebGLRenderer = new Class({
23972397

23982398
this.textureFlush = 0;
23992399

2400-
this.setPipeline(this.pipelines.TextureTintPipeline);
2400+
this.setPipeline(this.pipelines.MultiPipeline);
24012401
},
24022402

24032403
/**

src/renderer/webgl/pipelines/BitmapMaskPipeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ var BitmapMaskPipeline = new Class({
107107
* Sets the shader program, vertex buffer and other resources.
108108
* Should only be called when changing pipeline.
109109
*
110-
* @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#bind
110+
* @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind
111111
* @since 3.50.0
112112
*
113113
* @return {this} This WebGLPipeline instance.

src/tilemaps/dynamiclayer/DynamicTilemapLayer.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var TilemapComponents = require('../components');
1818
* A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a
1919
* Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the
2020
* tiles in a DynamicTilemapLayer.
21-
*
21+
*
2222
* Use this over a Static Tilemap Layer when you need those features.
2323
*
2424
* @class DynamicTilemapLayer
@@ -114,7 +114,7 @@ var DynamicTilemapLayer = new Class({
114114

115115
/**
116116
* The Tileset/s associated with this layer.
117-
*
117+
*
118118
* As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.
119119
*
120120
* @name Phaser.Tilemaps.DynamicTilemapLayer#tileset
@@ -211,17 +211,17 @@ var DynamicTilemapLayer = new Class({
211211

212212
/**
213213
* The rendering (draw) order of the tiles in this layer.
214-
*
214+
*
215215
* The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,
216216
* drawing to the right and then moving down to the next row.
217-
*
217+
*
218218
* The draw orders are:
219-
*
219+
*
220220
* 0 = right-down
221221
* 1 = left-down
222222
* 2 = right-up
223223
* 3 = left-up
224-
*
224+
*
225225
* This can be changed via the `setRenderOrder` method.
226226
*
227227
* @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder
@@ -247,7 +247,7 @@ var DynamicTilemapLayer = new Class({
247247
this.setOrigin();
248248
this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);
249249

250-
this.initPipeline('TextureTintPipeline');
250+
this.initPipeline('MultiPipeline');
251251
},
252252

253253
/**
@@ -256,7 +256,7 @@ var DynamicTilemapLayer = new Class({
256256
* @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets
257257
* @private
258258
* @since 3.14.0
259-
*
259+
*
260260
* @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.
261261
*/
262262
setTilesets: function (tilesets)
@@ -298,20 +298,20 @@ var DynamicTilemapLayer = new Class({
298298

299299
/**
300300
* Sets the rendering (draw) order of the tiles in this layer.
301-
*
301+
*
302302
* The default is 'right-down', meaning it will order the tiles starting from the top-left,
303303
* drawing to the right and then moving down to the next row.
304-
*
304+
*
305305
* The draw orders are:
306-
*
306+
*
307307
* 0 = right-down
308308
* 1 = left-down
309309
* 2 = right-up
310310
* 3 = left-up
311-
*
311+
*
312312
* Setting the render order does not change the tiles or how they are stored in the layer,
313313
* it purely impacts the order in which they are rendered.
314-
*
314+
*
315315
* You can provide either an integer (0 to 3), or the string version of the order.
316316
*
317317
* @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder
@@ -451,7 +451,7 @@ var DynamicTilemapLayer = new Class({
451451
*
452452
* @method Phaser.Tilemaps.DynamicTilemapLayer#destroy
453453
* @since 3.0.0
454-
*
454+
*
455455
* @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?
456456
*/
457457
destroy: function (removeFromTilemap)

src/tilemaps/staticlayer/StaticTilemapLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ var StaticTilemapLayer = new Class({
360360

361361
this.updateVBOData();
362362

363-
this.initPipeline('TextureTintPipeline');
363+
this.initPipeline('MultiPipeline');
364364

365365
this.mvpInit();
366366

0 commit comments

Comments
 (0)