mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 14:10:42 +00:00
When calling Shader.setRenderToTexture()
it will now draw the shader just once, immediately to the texture, to avoid the texture being blank for a single frame (thanks Kyle)
This commit is contained in:
parent
9f8e9d2afc
commit
bc5c7cf7ab
2 changed files with 18 additions and 0 deletions
|
@ -6,6 +6,10 @@
|
|||
|
||||
* `GameConfig.antialiasGL` is a new boolean that allows you to set the `antialias` property of the WebGL context during creation, without impacting any subsequent textures or the canvas CSS.
|
||||
|
||||
### Updates
|
||||
|
||||
* When calling `Shader.setRenderToTexture()` it will now draw the shader just once, immediately to the texture, to avoid the texture being blank for a single frame (thanks Kyle)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `SpineCanvasPlugin.shutdown` would try to dispose of the `sceneRenderer`, but the property isn't set for Canvas.
|
||||
|
|
|
@ -454,6 +454,20 @@ var Shader = new Class({
|
|||
}
|
||||
}
|
||||
|
||||
// And now render at least once, so our texture isn't blank on the first update
|
||||
|
||||
if (this.shader)
|
||||
{
|
||||
var pipeline = renderer.currentPipeline;
|
||||
|
||||
renderer.clearPipeline();
|
||||
|
||||
this.load();
|
||||
this.flush();
|
||||
|
||||
renderer.rebindPipeline(pipeline);
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue