Jump to content

Please help with WebGL errors


Fovi
 Share

Recommended Posts

Hi, i successfully made simple code that creates sprite and adds it to root stage. But i keep getting errors in console:

Quote

Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.
Error: WebGL: texImage2D: Conversion requires pixel reformatting.
Error: WebGL: drawElements: This operation requires zeroing texture data. This is slow.

What do they mean, and how to fix them ?

Link to comment
Share on other sites

Quote

Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.

Means you created a more than 16 WebGL contexts and the browser is killing old ones for your new one.

Quote

Error: WebGL: texImage2D: Conversion requires pixel reformatting.

Means you loaded an image not natively supported by your browser so it has to do pixel conversion on the CPU.

Quote

Error: WebGL: drawElements: This operation requires zeroing texture data. This is slow.

Usually means you copy from outside the viewport into a render texture, so to fill the buffer the browser will create a zero-filled buffer.

As to what you should do to fix it, impossible to know without your code.

Link to comment
Share on other sites

  • 1 month later...

It also happens at http://pixijs.github.io/examples/#/basics/basic.js and any pixi application.

"Exceeded 16 live WebGL" happens if you refresh or reload the example a bunch of times.

Quote

"Pixi.js 5.0.0-alpha - WebGL 1 - http://www.pixijs.com/" pixi.js:30613:9
Error: WebGL warning: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.  pixi.js:30635:18
Error: WebGL warning: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.  pixi.js:18230:18
Error: WebGL warning: texImage2D: Conversion requires pixel reformatting.  pixi.js:21341:13
Error: WebGL warning: drawElements: This operation requires zeroing texture data. This is slow.  pixi.js:24800:13

This is a feature!

Link to comment
Share on other sites

  • 1 month later...

From my early learning with Phaser (which uses Pixi.js), I'd say you might be refreshing the page and, for some reason, the canvas you created on the previous page isn't erased, and it goes on until it hits 16 canvases. I know this error pops up after I refresh my working projects too many times.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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