title: PIXI.RenderTexture no render
body: <p>I built a simple PIXI.js app to implement PIXI.RenderTexture, and it doesn't work.</p>
  <p>It should render two square sprites, black and white. The black one is added with regular <code>stage.addChild</code>:</p>
  <pre class="lang-js prettyprint-override"><code>const sprite1 = new PIXI.Sprite(PIXI.Texture.from('bc-sq-200.png'));
  sprite1.x = 500;
  app.stage.addChild(sprite1);
  </code></pre>
  <p>The white one is supposed to be rendered with <code>renderTexture</code>:</p>
  <pre class="lang-js prettyprint-override"><code>const sprite2 = new PIXI.Sprite(PIXI.Texture.from('wt-sq-200.png'));
  // app.stage.addChild(sprite2);
  
  const renderer = PIXI.autoDetectRenderer();
  const renderTexture = PIXI.RenderTexture.create({ width: 700, height: 700 });
  renderer.render(sprite2, { renderTexture });
  
  const mainSprite = PIXI.Sprite.from(renderTexture);
  app.stage.addChild(mainSprite);
  </code></pre>
  <p>However, only the black square can be seen.</p>
  <p>What could be the problem? What is going wrong?</p>
  <p>Minimal example Github repo: <a href="https://github.com/poludnev/test-pixi-render-texture" rel="nofollow noreferrer">https://github.com/poludnev/test-pixi-render-texture</a></p>