Jump to content

2 renderers on same page (pixi v4)


Exca
 Share

Recommended Posts

I have a page with 2 canvases and both of them have their own renderer. After a while (about 10 seconds) I get an error saying:

ERROR: 0:5: '' : array size must be greater than zero
WebGL: INVALID_VALUE: attachShader: no object or object deleted
pixi.js:5505 Pixi.js Error: Could not initialize shader.compileProgram @ pixi.js:5505Shader @ pixi.js:4781Shader @ pixi.js:8998generateMultiTextureShader @ pixi.js:1984296.SpriteRenderer.flush @ pixi.js:1974476.WebGLRenderer.render @ pixi.js:16149render @ editor.js:806f @ editor.js:1141
pixi.js:5506 gl.VALIDATE_STATUS falsecompileProgram @ pixi.js:5506Shader @ pixi.js:4781Shader @ pixi.js:8998generateMultiTextureShader @ pixi.js:1984296.SpriteRenderer.flush @ pixi.js:1974476.WebGLRenderer.render @ pixi.js:16149render @ editor.js:806f @ editor.js:1141
pixi.js:5507 gl.getError() 1281compileProgram @ pixi.js:5507Shader @ pixi.js:4781Shader @ pixi.js:8998generateMultiTextureShader @ pixi.js:1984296.SpriteRenderer.flush @ pixi.js:1974476.WebGLRenderer.render @ pixi.js:16149render @ editor.js:806f @ editor.js:1141
pixi.js:5512 Pixi.js Warning: gl.getProgramInfoLog() missing shaders

The error happens in compile program for fragmentSrc:

precision mediump float;
varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[0];
void main(void){
vec4 color;





gl_FragColor = color * vColor;
}

For some reason the group.textureCount in spriteRenderer is 0.

If I use just one canvas, there's no problems. Any ideas on how I could fix this?

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...