Jump to content

Help! Error message about INVALID_FRAMEBUFFER_OPERATION


BMWPilote
 Share

Recommended Posts

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? 

332026066__20180810155449.thumb.jpg.9de9b3a9769cb78d07952e2d241a2dd4.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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...