These are chat archives for pixijs/pixi.js

26th
Sep 2016
Urban
@UrKr
Sep 26 2016 18:38
I'm trying to render a texture from a graphics object. In v3 I used to do it with (new PIXI.Graphics()).generateTexture() but it seems to switch to canvas instead of webgl if I do that in v4
I see that I'm supposed to use the renderer
export const emptyTexture = () => {
const g = new PIXI.Graphics()
g.beginFill(0xffffff)
g.drawRect(0, 0, 1, 1)
g.endFill()
return renderer.generateTexture(g)
}
if I do this, the texture doesn't seem to show up
when I apply it to a sprite
Urban
@UrKr
Sep 26 2016 19:06
"it seems to switch to canvas instead of webgl if I do that in v4" <- scratch that. This doesn't happen
Ivan Popelyshev
@ivanpopelyshev
Sep 26 2016 20:07
its strange
you sure its the same renderer?
and you arent trying to get texture working in other renderer?