mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Merge pull request #5163 from samme/fix/headless-renderTexture
Fix error adding a Render Texture with Headless renderer
This commit is contained in:
commit
0ecaed42ec
1 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,7 @@ var Components = require('../components');
|
|||
var CONST = require('../../const');
|
||||
var Frame = require('../../textures/Frame');
|
||||
var GameObject = require('../GameObject');
|
||||
var NOOP = require('../../utils/NOOP');
|
||||
var Render = require('./RenderTextureRender');
|
||||
var Utils = require('../../renderer/webgl/Utils');
|
||||
var UUID = require('../../utils/string/UUID');
|
||||
|
@ -274,7 +275,11 @@ var RenderTexture = new Class({
|
|||
|
||||
var renderer = this.renderer;
|
||||
|
||||
if (renderer.type === CONST.WEBGL)
|
||||
if (!renderer)
|
||||
{
|
||||
this.drawGameObject = NOOP;
|
||||
}
|
||||
else if (renderer.type === CONST.WEBGL)
|
||||
{
|
||||
var gl = renderer.gl;
|
||||
|
||||
|
|
Loading…
Reference in a new issue