Sign in to follow this  
BMWPilote

Help! Error message about INVALID_FRAMEBUFFER_OPERATION

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

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.