Defold 1.2.180 has been released

Yes, this works properly

1 Like

Thanks for the info!
So, first step seems to be to make the editor “remove” the MESA_GL_VERSION_OVERRIDE when launching the engine.

Hmm… the size became much bigger…

path_settings {
  path: "/**/*_bg.atlas"
  profile: "RGB"
}
path_settings {
  path: "/**/*_hq.atlas"
  profile: "Default"
}
path_settings {
  path: "/**/*.atlas"
  profile: "RGBA_lossy"
}
path_settings {
  path: "**"
  profile: "Raw"
}
profiles {
  name: "RGB"
  platforms {
    os: OS_ID_GENERIC
    formats {
      format: TEXTURE_FORMAT_RGB
      compression_level: HIGH
      compression_type: COMPRESSION_TYPE_WEBP_LOSSY
    }
    mipmaps: true
    max_texture_size: 0
    premultiply_alpha: true
  }
}
profiles {
  name: "RGBA_lossy"
  platforms {
    os: OS_ID_GENERIC
    formats {
      format: TEXTURE_FORMAT_RGBA
      compression_level: BEST
      compression_type: COMPRESSION_TYPE_WEBP_LOSSY
    }
    mipmaps: true
    max_texture_size: 0
    premultiply_alpha: true
  }
}
profiles {
  name: "Default"
  platforms {
    os: OS_ID_GENERIC
    formats {
      format: TEXTURE_FORMAT_RGBA
      compression_level: BEST
      compression_type: COMPRESSION_TYPE_WEBP
    }
    mipmaps: false
    max_texture_size: 0
    premultiply_alpha: true
  }
}
profiles {
  name: "Raw"
  platforms {
    os: OS_ID_GENERIC
    formats {
      format: TEXTURE_FORMAT_RGBA
      compression_level: FAST
      compression_type: COMPRESSION_TYPE_DEFAULT
    }
    mipmaps: false
    max_texture_size: 0
    premultiply_alpha: true
  }
}
1 Like

Tried this. The launch actually crashes. And in previous versions running Defold without the override crashed the visual editors. It was OK on Ubuntu 18.04 but it started being an issue on Ubuntu 20.04 (so 20.04 had to have the override):

2021-03-09 10:58:27.903 ERROR default    com.defold.editor.Start - failed to open editor
com.jogamp.opengl.GLException: Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps(1-3)]
	at jogamp.opengl.egl.EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(EGLGraphicsConfigurationFactory.java:317)
	at jogamp.opengl.egl.EGLDrawableFactory.evalConfig(EGLDrawableFactory.java:1060)
	at jogamp.opengl.egl.EGLDrawableFactory.createMutableSurfaceImpl(EGLDrawableFactory.java:1072)
	at jogamp.opengl.egl.EGLDrawableFactory.createMutableSurfaceImpl(EGLDrawableFactory.java:88)
	at jogamp.opengl.GLDrawableFactoryImpl.createOffscreenDrawable(GLDrawableFactoryImpl.java:432)
	at jogamp.opengl.GLDrawableFactoryImpl.createOffscreenAutoDrawable(GLDrawableFactoryImpl.java:373)
	at editor.gl$unchecked_offscreen_drawable.invokeStatic(gl.clj:51)
	at editor.gl$init_info_BANG_.invokeStatic(gl.clj:106)
	at editor.gl$info.invokeStatic(gl.clj:120)
	at editor.gl$gl_support_error.invokeStatic(gl.clj:122)
	at editor.boot$main.invokeStatic(boot.clj:111)
	at editor.boot$main.invoke(boot.clj:107)
	at clojure.lang.Var.invoke(Var.java:388)
	at editor.bootloader$main.invokeStatic(bootloader.clj:65)
	at editor.bootloader$main.invoke(bootloader.clj:59)
	at clojure.lang.Var.invoke(Var.java:384)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:109)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:102)
	at com.defold.editor.EditorApplication.run(EditorApplication.java:38)
	at com.defold.editor.Start.lambda$kickLoading$0(Start.java:62)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:834)

Ah, I guess I wasn’t clear. I’m going to try to modify the editor, so that it doesn’t pass the MESA flag to the engine when launching it.

1 Like

Yes, that is the current drawback of using the new texture compression.
We’re expecting more optimizations to be done for the file format, making it compress a lot more. (in the next few months)

The upside being that you’ll get hardware acceleration on Desktop+HTML5, and that the format is transcoded at runtime (i.e. you can support old and new graphics cards with the same bundle).

We also have other plans to mitigate the size increase. The resource plugins is one of the things I will look into next.

3 Likes

Hi @ahmedmaawy and @ghpxi!
Here I have a new editor build that removes the MESA_GL_VERSION_OVERRIDE and MESA_LOADER_DRIVER_OVERRIDE flags before launching the engine.

Please try it out and let me know!

http://d.defold.com/archive/dev/5dcfe8080efe8931af15f9d9d1a0aadd4692cacc/dev/editor2/Defold-x86_64-darwin.dmg

http://d.defold.com/archive/dev/5dcfe8080efe8931af15f9d9d1a0aadd4692cacc/dev/editor2/Defold-x86_64-win32.zip

http://d.defold.com/archive/dev/5dcfe8080efe8931af15f9d9d1a0aadd4692cacc/dev/editor2/Defold-x86_64-linux.zip

Happens when launching:

com.jogamp.opengl.GLException: Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps(1-3)]
	at jogamp.opengl.egl.EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(EGLGraphicsConfigurationFactory.java:317)
	at jogamp.opengl.egl.EGLDrawableFactory.evalConfig(EGLDrawableFactory.java:1060)
	at jogamp.opengl.egl.EGLDrawableFactory.createMutableSurfaceImpl(EGLDrawableFactory.java:1072)
	at jogamp.opengl.egl.EGLDrawableFactory.createMutableSurfaceImpl(EGLDrawableFactory.java:88)
	at jogamp.opengl.GLDrawableFactoryImpl.createOffscreenDrawable(GLDrawableFactoryImpl.java:432)
	at jogamp.opengl.GLDrawableFactoryImpl.createOffscreenAutoDrawable(GLDrawableFactoryImpl.java:373)
	at editor.gl$unchecked_offscreen_drawable.invokeStatic(gl.clj:51)
	at editor.gl$init_info_BANG_.invokeStatic(gl.clj:106)
	at editor.gl$info.invokeStatic(gl.clj:120)
	at editor.gl$gl_support_error.invokeStatic(gl.clj:122)
	at editor.boot$main.invokeStatic(boot.clj:111)
	at editor.boot$main.invoke(boot.clj:107)
	at clojure.lang.Var.invoke(Var.java:388)
	at editor.bootloader$main.invokeStatic(bootloader.clj:65)
	at editor.bootloader$main.invoke(bootloader.clj:59)
	at clojure.lang.Var.invoke(Var.java:384)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:109)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:102)
	at com.defold.editor.EditorApplication.run(EditorApplication.java:38)
	at com.defold.editor.Start.lambda$kickLoading$0(Start.java:62)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-09 12:20:37.288 ERROR default    com.defold.editor.Start - failed to open editor
com.jogamp.opengl.GLException: Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps(1-3)]
	at jogamp.opengl.egl.EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(EGLGraphicsConfigurationFactory.java:317)
	at jogamp.opengl.egl.EGLDrawableFactory.evalConfig(EGLDrawableFactory.java:1060)
	at jogamp.opengl.egl.EGLDrawableFactory.createMutableSurfaceImpl(EGLDrawableFactory.java:1072)
	at jogamp.opengl.egl.EGLDrawableFactory.createMutableSurfaceImpl(EGLDrawableFactory.java:88)
	at jogamp.opengl.GLDrawableFactoryImpl.createOffscreenDrawable(GLDrawableFactoryImpl.java:432)
	at jogamp.opengl.GLDrawableFactoryImpl.createOffscreenAutoDrawable(GLDrawableFactoryImpl.java:373)
	at editor.gl$unchecked_offscreen_drawable.invokeStatic(gl.clj:51)
	at editor.gl$init_info_BANG_.invokeStatic(gl.clj:106)
	at editor.gl$info.invokeStatic(gl.clj:120)
	at editor.gl$gl_support_error.invokeStatic(gl.clj:122)
	at editor.boot$main.invokeStatic(boot.clj:111)
	at editor.boot$main.invoke(boot.clj:107)
	at clojure.lang.Var.invoke(Var.java:388)
	at editor.bootloader$main.invokeStatic(bootloader.clj:65)
	at editor.bootloader$main.invoke(bootloader.clj:59)
	at clojure.lang.Var.invoke(Var.java:384)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:109)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:102)
	at com.defold.editor.EditorApplication.run(EditorApplication.java:38)
	at com.defold.editor.Start.lambda$kickLoading$0(Start.java:62)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:834)

Thanks! Another piece of the puzzle…

1 Like

What about Basis etc1s format? What platform can support it?
So far I always see “could not encode” error (trying to compile html and osx)

1 Like

What that compressor does is generate gpu hardware formats directly (as opposed to transcoding them at runtime like uastc does).
It seems I forgot to hide that option. We currently don’t support that code path.

1 Like

Hi, this build is ok. I can build and run the Basic 3D Project, but unfortunately, the same issue when I open the collection

java.lang.ClassCastException: class jogamp.opengl.es1.GLES1Impl cannot be cast to class com.jogamp.opengl.GL2ES2 (jogamp.opengl.es1.GLES1Impl and com.jogamp.opengl.GL2ES2 are in unnamed module of loader 'app')
        at editor.gl$gl_clear.invokeStatic(gl.clj:191)
        at editor.scene$render_BANG_.invokeStatic(scene.clj:273)
        at editor.scene$update_image_view_BANG_$fn__41790.invoke(scene.clj:1158)
        at editor.scene$update_image_view_BANG_.invokeStatic(scene.clj:1155)
        at editor.scene$update_image_view_BANG_.invoke(scene.clj:1127)
        at editor.scene$refresh_scene_view_BANG_.invokeStatic(scene.clj:842)
        at editor.app_view$refresh_scene_views_BANG_$fn__46970.invoke(app_view.clj:1370)
        at editor.app_view$refresh_scene_views_BANG_.invokeStatic(app_view.clj:1370)
        at editor.app_view$open_resource$fn__47043.invoke(app_view.clj:1600)
        at clojure.lang.AFn.run(AFn.java:22)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
        at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-09 13:13:08.568 ERROR default    editor.error-reporting - {:line 110}
1 Like

Here’s a version where the removal of those environment variables only occurs for the dmengine executable. (@ahmedmaawy, @ghpxi)

http://d.defold.com/archive/dev/7f6ea10a88c77445c4727a941ed70fac0fd15207/dev/editor2/Defold-x86_64-darwin.dmg

http://d.defold.com/archive/dev/7f6ea10a88c77445c4727a941ed70fac0fd15207/dev/editor2/Defold-x86_64-win32.zip

http://d.defold.com/archive/dev/7f6ea10a88c77445c4727a941ed70fac0fd15207/dev/editor2/Defold-x86_64-linux.zip

I am still getting the same error message

1 Like

:frowning:
I really wish I could reproduce it myself.
I guess I’ll have to figure out a way to do that.

A swell idea is maybe to try Ubuntu 20.04 on a Virtual Machine :smiley:

I’m running Ubuntu 18.04 (our supported platform) in a VM.
I haven’t had any success with any of the MESA_GL_VERSION_OVERRIDE related flags (I still get the jogamp issues). But hopefully, if I can get that to work, it should also behave the same way it does for you.

Side note: We’re very eager to switch to LWJGL instead of JOGL. Especially considering that they have a Vulkan/MoltenVK backend which will help on macOS.

5 Likes

Actually I had no issues with Defold at all when I was using Ubuntu 18.04. I didn’t have to mess with MESA overrides. My problems started with Ubuntu 20.04.

2 Likes

Fun Fact: The publisher of FSH / FSD is Puppygames/Cprince, the founder of LWJGL. :smiley:

5 Likes

Aha, nice!

3 Likes