phaser icon indicating copy to clipboard operation
phaser copied to clipboard

[3.53.1] RenderTexture generates [.WebGL-0x7fd824064400]RENDER WARNING: there is no texture bound to the unit 0

Open jacola opened this issue 3 years ago • 1 comments

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 Screen Shot 2021-03-15 at 21 23 14

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.

jacola avatar Mar 15 '21 12:03 jacola

This issue also shows up in the official examples: https://phaser.io/examples/v3/view/game-objects/render-texture/erase-part-of-render-texture

jedateach avatar Aug 20 '21 10:08 jedateach

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.

photonstorm avatar Oct 31 '22 22:10 photonstorm