Comments (14)
Hello justinmeister,
thanks for the report. Unfortunally i don't have a mac to test this, but i think i know what causes this issue. In BasePicker.java i create a FrameBufferObject, that is used for offscreen rendering.
Generally you initialize it with the dimensions of the device screen, but on some devices the graphics card can't handle that. That is what your second stacktrace says.
The NPE occurs, because everything that should be initialized after the first FBO exception, is null (dispose gets called when the programs exits).
I just pushed a patch, that uses BackBuffer dimensions instead of logical pixels. I hope this solves your issue.
from mundus.
Hmm, I tried to build after updating the project and I still get the second error message that says
[Fatal] java.lang.IllegalStateException: frame buffer couldn't be constructed: incomplete attachment
The error is exactly the same as before (the second one, not the nullpointerException).
from mundus.
ok, can you replace the BasePicker.java constructor with this and try again?
int width = (int)(Gdx.graphics.getBackBufferWidth() * 0.8);
int height = (int)(Gdx.graphics.getBackBufferHeight() * 0.8);
fbo = new FrameBuffer(Pixmap.Format.RGBA8888, width, height, true);
You may have to tweak the scale value a bit, but this should actually work..
See this discussion on StackOverflow
Also, do you have multiple monitors?
from mundus.
So it didn't work, but I got some more clues.
Both Gdx.graphics.getBackBufferWidth() and Gdx.graphics.getBackBufferHeight() are returning 0 instead of the screen dimensions. I'm not really sure why. Just out of curiosity, I hard coded the pixel dimensions of my monitor as arguments for the frameBuffer. This is the result I got:
:editor:processResources
:editor:classes
:editor:run
[12:54][Info] Started: 16-06-28
[12:54][Debug] Disposing project current null
> Building 87% > :editor:run
It ended up getting stuck on "Building 87%" and I had to stop the process.
I do not have multiple monitors.
from mundus.
Ok, so hardcoding the dimensions fixed the issue.
Can you please provide these values along with the output you get when running this:
System.out.println("width: " + Gdx.graphics.getWidth());
System.out.println("height: " + Gdx.graphics.getHeight());
System.out.println("bb width: " + Gdx.graphics.getBackBufferWidth());
System.out.println("bb height: " + Gdx.graphics.getBackBufferHeight());
It's not stuck, it's running Mundus. editor:run builds and executes the project, that's because it's "stuck". Does the Mundus window not open?
from mundus.
Here is the output:
:editor:processResources
:editor:classes
:editor:run
[13:24][Info] Started: 16-06-28
width: 0
height: 0
bb width: 0
bb height: 0
width: 0
height: 0
bb width: 0
bb height: 0
[13:24][Debug] Disposing project current null
> Building 87% > :editor:run
The Mundus window doesn't open. An java executable is running but no window is shown. It makes my fan run pretty hard though.
from mundus.
Thanks!
Well, that's interesting...everything 0. This also explains the original issue regarding the Fbo.
Just to make sure: you are querying the dimensions after Gdx is inizialized, not inside Main, right?
from mundus.
I put the System.out.println() statements in the BasePicker constructor. I'm assuming at that point Gdx is supposed to be initialized.
from mundus.
Yes, that's alright. This might be a libGDX + LWJGL3 backend + mac issue.
Just one last thing: inside Main.java after the DisplayMode is fetched, do this:
System.out.println("width: " + dm.width);
System.out.println("height: " + dm.height);
A hotfix might also be to set the initial dimensions manually:
config.setWindowedMode(1200, 600);
from mundus.
So I got:
width: 1440
height: 900
in the console for the dm.width and dm.height.
Interestingly enough, hardcoding the config.setWindowedMode(1200, 600) got the Mundus window to open fine. getBackBufferWidth and getBackBufferHeight seems to be working fine now. Their outputs are now 1200, and 600.
from mundus.
Good, thanks for figuring that out!
I think this happens if width and height are both set to their maximums.
I just commit a fix. Can you verify that this works?
from mundus.
The latest commit does not work, I got the error:
[14:46][Error] FBO dimensions 100%: frame buffer couldn't be constructed: incomplete attachment
[14:46][Error] FBO dimensions 90%: frame buffer couldn't be constructed: incomplete attachment
[14:46][Error] FBO dimensions 100%: frame buffer couldn't be constructed: incomplete attachment
[14:46][Error] FBO dimensions 90%: frame buffer couldn't be constructed: incomplete attachment
[14:47][Debug] Disposing project current null
However, I tweaked the setWindowedMethod() and found that 0.88 for height and width was the highest without an error:
config.setWindowedMode((int) (dm.width*0.88f), (int) (dm.height*0.88f));
After that change, it worked fine.
from mundus.
This behaviour is really annoying. Anyway, this should be fixed now.
Thanks for the great help ;)
from mundus.
Yep, works fine now.
from mundus.
Related Issues (20)
- New feature: Minimap with navigation means. HOT 5
- Physics component HOT 1
- Script component HOT 1
- Plugin system
- Light component
- libGDX runtime
- Model components with individual materials
- Mundus Logo/Icon HOT 4
- Thumbnails for assets
- 3d Model thumbnail creation
- Asset browser improvements
- Unable to load assets in editor HOT 3
- could this be used to create a 3d cabinet ? HOT 1
- Documentation HOT 2
- ERROR! HOT 1
- High DPI support, interface scaling HOT 1
- Collada dae loader HOT 1
- УЁБОК, ГРАДЛ ЗАСУНЬ СЕБЕ БЛЯТЬ В ЖОПУ HOT 6
- ХУЙЛО ПЕНДОСОВСКОЕ
- Extending this to a full game engine?
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 mundus.