Comments (5)
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.
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:
- 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?
- 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.
Tested this on device, and it does not reproduce. Are you testing on sim here?
from libgdx.
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.
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)
- [BUG] - Displaying a texture using the coordinates of an object layer
- Latest Gdx-setup enables proguard minify which breaks skin files HOT 6
- Can't use Lambda in newly created libgdx project (Jdk ver. set to 1_8/17) in Android Studio HOT 2
- Can not get superdevmode in RELEASE mode for HTML5? HOT 2
- Error with build desktop version HOT 1
- Support for ISO Keyboards HOT 6
- Support for drawable in SelectBox HOT 4
- Use official metal sources HOT 1
- AndroidFragmentApplication dies onPause
- Performance issues on Android when enabling config.useGL30 HOT 7
- GWT requests unnecessary microphone permission HOT 5
- Stage.drawDebug does not work in combination with GL3 due to ShapeRenderer shader not being compliant HOT 2
- AndroidPreferences.flush() has no way to enforce synchronous saving HOT 2
- If an animation starts on frame 1 or more, rather than frame 0, AnimationController doesn't animate it properly
- glReadPixels does not support offset parameter crucial to read pixels asynchronously HOT 2
- gdx and gdx.jnigen.loader causes split module issue over package com.badlogic.gdx.utils HOT 6
- GWT preloader doesn't use percent-encoding HOT 2
- performance: unnecessary window.makeCurrent() in LWJGL3 backend HOT 4
- Add arm64 capabilities to Info.plist.xml HOT 1
- Suggestion to modify code in Sprite.rotate() method in com.badlogic.gdx.graphics.g2d.Sprite package HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgdx.