drbanetti Posted January 28, 2017 Share Posted January 28, 2017 Hello, First thing, excuse my english, not my native language, second thing, I have a small problem with events and I cannot point if that's my coding or something else, in Edge browser is most prominently visible, but I also feel an "almost" unnoticeable delay in Chrome or Firefox - DOM events and canvas/babylonjs events/action managers are fired with delay from the moment I upgraded babylonjs from 2.4 to 2.5. It's my first foray into webgl, javascript, web apps, so be indulgent. I tested this page on a laptop with both integrated Intel graphics and a nvidia 940m dedicated card (which is not used at all on webgl I saw). In the attached file you'll see the page that I put together all in one place and the behaviour of the events when you'll change the version of the babylonjs in the file. Please don't take into consideration the design of the page or the graphics in general, I put some colors quickly in place of images and textures over some primitive meshes. Anyway, when I use babylon 2.4, DOM mouse over menus events, click events in the textbox worked ok in the DOM, responding quickly, the same was the animation of the sphere and the action managers pointerover for the 3 planes in the middle of the canvas. When I changed to 2.5 version, I had delays both in dom events: mouse over menu elements, click in the text box, or babylonjs events - the speed of the sphere animation and the pointer over actions for the 3 planes in the middle are delayed noticeably. I used cdns for both jQuery (ver. 3.1.1) and babylonjs, so just change/comment the lines for babylon to see this behaviour on different versions. Thank you and please, if you saw were the problem resides (js code, styles, etc.), let me now. test.html Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 30, 2017 Share Posted January 30, 2017 Hello and welcome! do you mind trying to reproduce the issue on our Playground? http://www.babylonjs-playground.com/ This will help us a lot to help you find the culprit Quote Link to comment Share on other sites More sharing options...
drbanetti Posted January 30, 2017 Author Share Posted January 30, 2017 Hello, I've created http://www.babylonjs-playground.com/#BEP46#1 hope I put them ok, I tried to mimic the page as it was constructed. In Edge browser, it has the same behaviour as in my test page, the 3 blue planes are slow to react at pointerover. In my test page, also the dom elements has slow events raised, like mouse over, but i cannot put them in playground. Thanks Quote Link to comment Share on other sites More sharing options...
drbanetti Posted January 30, 2017 Author Share Posted January 30, 2017 Another thing, maybe the problem is from here, I tested this on a laptop with integrated Intel card and Nvidia 940M dedicated card. It seems that only Intel card is used when using WebGl, Nvidia isn't active. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 31, 2017 Share Posted January 31, 2017 Hey thank you for this repro I'not able to reproduce it (on my SurfaceBook) either on Edge or Chrome. Can you confirm that Edge is running on HW mode (if this is not the case you should be able to see a message in the console) Quote Link to comment Share on other sites More sharing options...
drbanetti Posted January 31, 2017 Author Share Posted January 31, 2017 Hi again, It seems to be in hardware mode, the only message in console is BJS - [19:45:07]: Babylon.js engine (v2.6-alpha) launched I made a short video of how it's going on the laptop. There is a delay from the moment the pointer is over a blue plane until the moment the action is taken place. i've upgraded the graphics drivers to last versions before recording it. On babylon 2.4 worked ok, the moment pointer was above the plane, the action fired instantly, no delays. It can be a fact that the card used is the integrated Intel, the nvidia is not used at all. I'll have to check if I enable the GPU to be only NVIDIA in Windows, what happens then. Shamefully, I didn't try it yet playground 1.mp4 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted February 1, 2017 Share Posted February 1, 2017 I cant reproduce the error either, your website response fine. Nvidia GTX 570 & CPU: Quad Core & Browser: Chrome 57 Quote Link to comment Share on other sites More sharing options...
drbanetti Posted February 1, 2017 Author Share Posted February 1, 2017 Hi, The problem was mainly in the Edge browser, in Chrome or Firefox from what I tested it works ok also for me. Even in IE11 it works well. I set the nvidia control panel to have preferred graphics NVIDIA, i set Chrome and Firefox to also have the NVIDIA as preferred, but eveytime the intel onboard graphics was used, no matter what I've set. After looking on the internet, I found that a solution could be disabling the onboard graphics from bios and that finally worked for me. The nvidia GPU was at last used in Edge browser for WebGL and the delays were history. So it looks as a driver problem on part of intel perhaps. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted February 1, 2017 Share Posted February 1, 2017 Hello Edge is always a bit tricky, i know that some guys don't even put 'experimental-webgl' in their code, since webgl and webgl2 is standardized. Working with Edge is kind of a special case gl.debuginfo if==edge alert('download firefox&chrome') will fix most issues. Also note that everything you do on a Windows machine will be transpired to DirectX (ANGLE) so make sure your GraphicDriver is up-to-date and has proper ANGLE support. workaround for enable OpenGL on Windows/ Browsers -disable ANGLE exists, but since OpenGL runs few ms slower on a Windows Machine then native DirectX code, i would not recomend it. One year ago as ANGLE was build upon DirectX 10, some people do this, becourse back then OpenGL has a greater Max Texture Size, they fixed it in DirectX 11.https://browserleaks.com/webgl dbawel 1 Quote Link to comment Share on other sites More sharing options...
dbawel Posted February 1, 2017 Share Posted February 1, 2017 @drbanetti - I'm not certain why you would want to use Edge at all - since it performs far below all other browsers in Windows 10 and even worse in Windows 7. Only IE benchmarks lower in some areas. I also have not been able to repro any latency in any of my browsers and/or OS, and don't wish to install Edge on any system. So obviously the issue is in using Edge, and if this is the spec you must follow in your current development, then I hope you're running Windows 10; as WebGL is hardly usable these days in Edge using Windows 7. Otherwise, your PG scene performs consistantly in all areas of hardwre resources using either 2.4 or 2.5 on all of my systems excluding using Edge. I wish there was a way to improve this, but Edge has legacy issues which I don't foresee improving in the near future since there is little incentive to improve - not to mention that this would require considerable effort in changing much of the architecture acording to my sources. Cheers, DB Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted February 1, 2017 Share Posted February 1, 2017 I start to reading about this topic and it seems that INTEL is fighting with WebGL too, NVidia and AMD make the rules otherwise things will break. students collecting bugs for sience https://github.com/mc-imperial/shader-compiler-bugs 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.