Open tzargoth opened 5 years ago
By previous version you mean editor 1 or previous version of editor 2? Will it help to set MESA_GL_VERSION_OVERRIDE
env variable to 3.1
before starting the editor, as it's suggested in linux FAQ?
$ export MESA_GL_VERSION_OVERRIDE=3.1
$ ./Defold
Previous version of editor 2 ... downloaded latest version a few weeks ago. Already use the export option ... that was needed to resolve the com.jogamp.opengl.GLException error. Without it, the view/frame is grey.
Does it happen for every game object, or only to some of them? It's possible there is some exception you can find in logs. It also might be a driver issue, can you update your video driver?
In the first two tutorial projects, all game objects show black screen. There are no errors in the console output, or the log files under ~/.Defold ... only INFO and DEBUG lines. I am using the default Ubuntu Nouveau drivers ... in Software and Updates --> Additional Drivers, there are none listed (No additional drivers available.), so I assume they are current (checks updates daily, always applied). I have no other display issues that I am aware of. If editor 2 is working for other users of Ubuntu 16.04, I can investigate possible driver issues.
Updated to latest version 1.2.152, and I still have the same problem.
Attempted to use the version 1 editor from the 126 and 150 builds ... couldn't open a project (no dialog pop-up), and trying to open game object files (file dialog pop-up works) resulted in an error. I am assuming the 2 different editors are not compatible. Opening a script worked, but that isn't needed.
We received reports previously where nouveau was problematic (#634), can you try other video drivers? If you have nothing in "Additional Drivers", perhaps it's because you don't have "Proprietary drivers" check box checked in "Ubuntu Software" tab in Software and Updates?
Proprietary drivers option is selected. However, I was mistaken in thinking that Nouveau was in use (confused with past system I used and currently no additional driver options) ... according to what I've read recently, and from system info, I have 'radeon' driver in use:
sudo lshw -c display | grep 'driver\|product'
product: Whistler [Radeon HD 6730M/6770M/7690M XT]
configuration: driver=radeon latency=0
So, I shouldn't use Nouveau, since that is for Nvidia (Just learned/realized Nouveau does not apply to AMD graphics cards!!), nor use proprietary drivers. There is no "update" to the radeon driver that I am aware of.
Good news ... sort of. I was able to get JOGL demos to give the same problem of a black rendered view, so it would appear the issue I am having is not related to Defold its self, but rather something in the Java OpenGL layers. Other OpenGL things work fine on my system. I was really hoping to be able to use Defold. Not sure what to investigate now. I guess this issue can be closed unless anyone has some ideas for me to try to work around this problem.
Actually, I sought help on the jogamp forum and there is a bug fix that resolves this problem with the jogl demos: http://forum.jogamp.org/JOGL-demo-and-other-apps-show-only-black-canvas-window-td4039768.html#a4039774
I am guessing that the jogamp related jars packaged in Defold would need to be updated ... though, there is no stable official release for jogamp since 2015. I am willing to try replacing them in place, but if the API changed, it could break stuff. Is there a convenient way to override the internal classes Defold uses with these updated jars? Looking at the prepackaged jar, it looks like a bit of work to update manually.
Also, the latest version of jogamp makes MESA_GL_VERSION_OVERRIDE=3.1 unnecessary.
I deleted the related old jogamp classes from the package jar, copied latest jogamp jars into the packages folder, and bypassed the launcher with a script to include a broader selection of jar files ... SUCCESS!!
#!/bin/sh
unset MESA_GL_VERSION_OVERRIDE
export CLASSPATH=/home/some_user/apps/Defold/packages/*
./packages/jdk11.0.1/bin/java -Djdk.gtk.version=2 -Djna.nosys=true -Ddefold.launcherpath=./Defold \
-Ddefold.resourcespath -Ddefold.version=1.2.152 -Ddefold.editor.sha1=8676910aca057407577e82c3934e820c5acd2a96 \
-Ddefold.engine.sha1=11b1e7662dd68172fca551c52cba248eea16a364 -Ddefold.buildtime=2019-04-29T16:19:36.136217 \
-Ddefold.channel=editor-alpha -Djava.net.preferIPv4Stack=true -Dsun.net.client.defaultConnectTimeout=30000 \
-Dsun.net.client.defaultReadTimeout=30000 -Djogl.texture.notexrect=true -Dglass.accessible.force=false \
--illegal-access=warn --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED \
--add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED \
--add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED \
-Xmx4658104320 com.defold.editor.Main
No errors in the console log. I completed the astronaut tutorial without any issues.
Wow, this is amazing, thanks for the report!
Used a previous version to complete first tutorial, simple side scrolling game. When I got to the part of adding bonus_star, the editor shows black view for game object. I used properties to set the collision sphere, since there is no way to do it with the view controls:
Updated to latest version and still no view for game objects ... and can't resize window. All game objects in the project do not appear with proper view ... all black. There are no errors in the log.
version: 1.2.151 (editor-alpha) editor: 61f46cee8040eb233ecc7e328f8b6d97693f1f40 engine: e05232d70b8a6d8c69fcfe968f01b876090ffa06