Sign in to follow this  
Marian

Too many active WebGL contexts...

Recommended Posts

Hello,
I'm creating a web-component with pixijs, just now I ' want  use this multiply on my webpage but I can only 16 times this create and I take a warning :
"ContextSystem.js:118 WARNING: Too many active WebGL contexts. Oldest context will be lost."

How many WebGl context or PIXI.Application can I create on one time ? 

 

Thanks 

Marian

Share this post


Link to post
Share on other sites

I experienced this error as well in the past, was not with Pixi though but with my own very basic framework. In my case the browser refused to call WebGL methods after refreshing the page too many times on a short time. Probably because I put the entire thing too much on pressure. What worked for me was refreshing the cache with Ctrl+F5 or restarting my browser.

Share this post


Link to post
Share on other sites

Hi,

thanks ..

I'm make simply test and create 20 times

var app = new PIXI.Application({ antialias: true });
document.body.appendChild(app.view);
var graphics = new PIXI.Graphics();
// Rectangle
graphics.beginFill(0xDE3249);
graphics.drawRect(50, 50, 100, 100);
graphics.endFill();
app.stage.addChild(graphics);
...


and I'm take the same warning: "Too many active WebGL contexts. Oldest context will be lost."

same behavir with only create renderer  (20 times):

rend = new PIXI.Renderer({ width: 100, height: 60, backgroundColor: 0x1099bb });
document.body.appendChild(rend.view);

.
.
.
.

 

seems like limit from WebGL ?

someone a idea ?

can I have multiple canvas (20)  with only one renderer ?

Thanks !

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Browsers have limits on webgl context amounts (the actual amount depends on many factors). You can use 2d canvas if rendering deosnt require webgl. Single context can be used only in a single canvas.

Share this post


Link to post
Share on other sites

As Exca mentioned this is an actual browser limitation. There is a limit to the number of WebGL contexts you are allowed to create in a single page. The actual number depends on your environment and browser.

Quote

can I have multiple canvas (20)  with only one renderer ?

No, one canvas has 1 renderer.

Share this post


Link to post
Share on other sites

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.