BMWPilote Posted August 10, 2018 Share Posted August 10, 2018 Hello folks, When I launch my app, I always get a lot of such errors. Although later the app can work correctly, I would like to solve the problem. I guess the reason might be starting the render loop before the default frame buffer is ready. My question is how can I know that the frame buffer is ready so that I can start the render loop at the right timing? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 10, 2018 Share Posted August 10, 2018 Hello, It looks like you are using render target texture who are not in a complete state (missing depth or color buffer you are trying to use) A repro in the playground would be the best way to troubleshout. The default FrameBuffer is always ok and ready on webgl and not managed by babylon. Quote Link to comment Share on other sites More sharing options...
BMWPilote Posted August 15, 2018 Author Share Posted August 15, 2018 On 8/10/2018 at 8:05 PM, Sebavan said: Hello, It looks like you are using render target texture who are not in a complete state (missing depth or color buffer you are trying to use) A repro in the playground would be the best way to troubleshout. The default FrameBuffer is always ok and ready on webgl and not managed by babylon. Hi Sebavan, thank you for the answer. I would like to make a playground but the messages occur only when my viewer is integrated into a React application. Could it be the fact that the render loop is started too early? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 15, 2018 Share Posted August 15, 2018 I am not sure, as usually we have check for isReady preventing this to happen in the engine. Are you relying on special custom effects you would render to early ? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 16, 2018 Share Posted August 16, 2018 19 hours ago, BMWPilote said: Could it be the fact that the render loop is started too early? There is a doc about integrating with React: https://doc.babylonjs.com/resources/babylonjs_and_reactjs Have you attached the the canvas from a ref (<canvas ref={this.onCanvas3d}>) using the lifecycle method componentDidMount? At the point for sure it is not too early in terms of the canvas being ready for WebGL to attach. I have not had any issues creating the engine and starting the engine.runRenderLoop(...) immediately at that point. I'm assuming you're not React Native - I haven't tried that! I realise you can't create a PG, but please post some code especially how you are using lifecycle hooks. Quote Link to comment Share on other sites More sharing options...
BMWPilote Posted August 16, 2018 Author Share Posted August 16, 2018 18 hours ago, Sebavan said: I am not sure, as usually we have check for isReady preventing this to happen in the engine. Are you relying on special custom effects you would render to early ? No. I just have PBR materials + shadow mapping + A post pipeline. Very simple stuff. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 16, 2018 Share Posted August 16, 2018 So either the shadow, either the pipeline is the culprit. You can try to disable them one at a time to isolate the issue ? 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.