phaser
phaser copied to clipboard
[3.53.1] RenderTexture generates [.WebGL-0x7fd824064400]RENDER WARNING: there is no texture bound to the unit 0
Version
- Phaser Version: v3.53.1
- Operating system: macOS 11.2.2
- Browser: Chrome Version 89.0.4389.90 (Official Build) (x86_64)
Description
On macOS with Chrome (does not reproduce with Safari), calling just RenderTexture.startDraw() followed by RenderTexture.endDraw() generates [.WebGL-0x7fd824064400]RENDER WARNING: there is no texture bound to the unit 0
My teammates report that the issue does not reproduce on Linux or Windows.
Example Test Code
https://codepen.io/jacola/pen/GRNezEg
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
scene: {
preload: preload,
create: create,
update: update,
},
};
var rf = null;
var game = new Phaser.Game(config);
function preload() {
this.load.image(
"ms",
"https://examples.phaser.io/assets/sprites/phaser-dude.png"
);
}
function create() {
this.add.image(100, 100, "ms");
rf = this.make.renderTexture({
x: 0,
y: 0,
width: 100,
height: 100,
add: true,
});
}
function update() {
rf.beginDraw();
rf.endDraw();
}
Additional Information
If you do not have something rendered to the screen, the error will not reproduce. I can gather any additional information required.
This issue also shows up in the official examples: https://phaser.io/examples/v3/view/game-objects/render-texture/erase-part-of-render-texture
Just to say this doesn't happen in 3.60 (although I cannot get it to duplicate in 3.53.1 either anymore, so maybe a Chrome thing at the time?) - however, it definitely doesn't happen any longer. Tested on Chrome and Safari on mac OS Ventura.