Giter Site home page Giter Site logo

Comments (5)

Tom-Ski avatar Tom-Ski commented on May 17, 2024 2

Looked closer into this, and Ok this is nuts! 👁️

I think this was introduced by 0f24d72 as we have changed creation callback from waiting for the first frame, but I'm still super surprised that it hasn't been reported before you.

I guess most of us are not creating framebuffers on create, (usually after some splash screen which doesn't require FBO would be my guess)

Its not apparent in the test bench, since they construct their framebuffers after a first render due to structure of test suite. This has to happen in the create of the Adapater. We need to wait for the very first frame before finding the 'default' render buffer handle it seems as it returns 0 until we get that first frame.

I'd rather not query something on every single interaction with framebuffers, every little helps with not putting gl commands into the buffers. Perhaps we can bring back the first frame logic, even if its for setting the default handle.
Should take a look at #6971 again and see if we can find a better solution for all.

from libgdx.

b3nk4n avatar b3nk4n commented on May 17, 2024

Personally, I'm unblocked by my workaround. However, would be happy to provide a PR for this reported problem. Before doing so, I would however like to get some questions clarified before I would create a PR, to have less back and forth as part of the final PR:

Questions:

  1. Is there any strict need to only set the defaultFramebufferHandle only once via defaultFramebufferHandleInitialized, instead of whenever an FBO is created? Are e.g. these OpenGL functions to get the FRAMEBUFFER_BINDING expensive?
  2. Would you prefer fixing this in a way that yields iOS specific special handling, as in the current implementation here? Even when the fix (or iOS special handling) also would work fine with other platforms? Or instead better have a single implementation that works for all the same way. Even when there might be a slightly more optimal implementation for specific platforms (e.g. simply assume defaultFramebufferHandle = 0 if platform is not iOS)

Thank you in advance!

from libgdx.

Tom-Ski avatar Tom-Ski commented on May 17, 2024

Tested this on device, and it does not reproduce. Are you testing on sim here?

from libgdx.

b3nk4n avatar b3nk4n commented on May 17, 2024

Tested this on device, and it does not reproduce. Are you testing on sim here?

I tested this on both a simulator with iOS 17.0 on an iPhone 15 with the following simulator version:

Version 15.0.1 (1015.2)
SimulatorKit 935.1
CoreSimulator 932.2

And using iOS 17.1.1 on my physical iPhone 13 device.

Thx @Tom-Ski for all the details above 👍
If I understand correctly, if I would skip creating the FBO in just the very first frame, then things would work correctly (Edit: and I can confirm that this is working that way when I create the FBO lazily in the second frame).

Sounds more complicated that I thought. And would therefore better leave that to you, as you seem to have a lot of context around this already. But let me know in case there is anything I can help with.
Thx!

from libgdx.

LobbyDivinus avatar LobbyDivinus commented on May 17, 2024

So this will be fixed? Nice. I also stumbled across this issue when using shadow light which internally uses a framebuffer. Postponing the creation until the first update call works but doesn't feel right.

from libgdx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.