diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 313a716..e78a961 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -729,12 +729,13 @@ { if(!Graphics._SPRITE_TEXTURE) { - Graphics._SPRITE_TEXTURE = RenderTexture.create(10, 10); - - var currentRenderTarget = renderer._activeRenderTarget; - renderer.bindRenderTexture(Graphics._SPRITE_TEXTURE); - renderer.clear([1,1,1,1]); - renderer.bindRenderTarget(currentRenderTarget); + var canvas = document.createElement('canvas'); + canvas.width = 10; + canvas.height = 10; + var context = canvas.getContext('2d'); + context.fillStyle = 'white'; + context.fillRect(0, 0, 10, 10); + Graphics._SPRITE_TEXTURE = Texture.fromCanvas(canvas); } this._spriteRect = new Sprite(Graphics._SPRITE_TEXTURE);