MichalGo Posted March 10, 2020 Share Posted March 10, 2020 Hello I have problem with Firefox. When is comes to Safari or Chrome everthing works okay, but Firefox while loading image 8317x1024 throws a warning in the console: Error: WebGL warning: texImage2D: Requested size at this level is unsupported and the image is not rendered. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 10, 2020 Share Posted March 10, 2020 OK, rephrasing: texture size is too big for webgl to handle. Most of mobile devices have a limit of 4096 on each dimension. PC's have 8k or 16k. In your case its 8192 Quote Link to comment Share on other sites More sharing options...
MichalGo Posted March 10, 2020 Author Share Posted March 10, 2020 Hello Ivan thanks for reply, So if this is PC limitation why Chrome and Safari works okay but only Firefox not? Is there a way to detect if an image can be fit into webgl and if not then use canvas renderer? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 10, 2020 Share Posted March 10, 2020 Use this when you obtain temp webgl context. Unfortunately pixi webgl test context is hidden in js scope, so you have to create your own. gl.getParameter(gl.MAX_TEXTURE_SIZE) jonforum and MichalGo 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.