gani Posted March 7, 2015 Share Posted March 7, 2015 Hi I'm newbie with Pixi.js but already love it . Maybe it will sounds strange but some modern browsers on old machines tries to render a WebGL content with CPU instead of using the GPU acceleration and obviously the perfomance is poor (happen on old Chrome 36 and IE11) I'm asking for a method to check if the above is true and to switch the renderer into Canvas. And one more question - Is there a way to run somekind of a simple "stress" test to detect poor WebGL performance? Any help would be greatly appreciated. p.s. sorry for my bad English Quote Link to comment Share on other sites More sharing options...
xerver Posted March 7, 2015 Share Posted March 7, 2015 Notice the "failIfMajorPerformanceCaveat" parameter when creating a webgl context: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1 Use this flag with caution (explanation: http://blog.tojicode.com/2013/12/failifmajorperformancecaveat-with-great.html). gani 1 Quote Link to comment Share on other sites More sharing options...
gani Posted March 7, 2015 Author Share Posted March 7, 2015 Thanks for the reply . Am I defining it right?var renderer = new PIXI.autoDetectRenderer(windowWidth, windowHeight, { transparent: true, failIfMajorPerformanceCaveat: true }); What is the worst scenario that could cause failIfMajorPerformanceCaveat ? Also is IE and Safari supporting this parameter (in the above article is mentioned only Chrome)? Quote Link to comment Share on other sites More sharing options...
xerver Posted March 8, 2015 Share Posted March 8, 2015 First `autoDetectRenderer` is not a constructor, it is just a function. Don't use the `new` keyword. > What is the worst scenario that could cause failIfMajorPerformanceCaveat ? I don't know what that means. The spec explains exacty what the parameter does, and example conditions that make it fail creation. I don't know if the param is supported in IE/Safari, you will need to do some research. Keep in mind also that autoDetectRenderer doesn't try to create a webgl context with your params and then fallback to canvas on failure. Instead it just detects webgl support and then creates the proper renderer. Also, you can see that in v2 the context options are hard-coded for the webgl renderer: https://github.com/GoodBoyDigital/pixi.js/blob/master/src/pixi/renderers/webgl/WebGLRenderer.js#L147-L153 You can't pass arbitrary properties into the context creation. You will have to create a custom renderer, or open an issue on the github tracker to add support for this param. This param is pretty new, so we haven't thought about how to add proper support for it yet. gani 1 Quote Link to comment Share on other sites More sharing options...
gani Posted March 8, 2015 Author Share Posted March 8, 2015 Thanks for the reply. I modified PIXI a bit for the purposes of my project and Chrome successfull fallback to canvas but it's not working under IE11...it still uses the CPU for WebGL Quote Link to comment Share on other sites More sharing options...
Olloverr Posted September 16 Share Posted September 16 There are times in a student’s life when timely, specialized support becomes an absolute necessity, especially when working on complex assignments. I found myself in such a situation when deadlines for submitting a report were closing in, and I had almost no time left. Finding a valid reason for late submission of report was a real challenge, but with the help of professionals, I managed to justify the delay and maintain my standing. Their expert advice not only helped me navigate the situation but also allowed me to complete the task at a high standard. Timely support can truly save you in critical moments. 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.