kotlin-graphics / imgui

Bloat-free Immediate Mode Graphical User interface for JVM with minimal dependencies (rewrite of dear imgui)
MIT License
600 stars 36 forks source link

Docking branch available for testing #140

Open elect86 opened 4 years ago

elect86 commented 4 years ago

The docking branch has been ported, it's based on the last 1.77

https://user-images.githubusercontent.com/8225057/46300244-80708900-c5a3-11e8-8365-f89cfd06080e.gif

Known bug: problems by loading properly the windows position from the ini file

Original issue

I'll be glad to gather feedbacks

zeroeightysix commented 4 years ago

On linux, using the GNOME DE, running on wayland:

Here's a list of JVM crashes I ran into while testing. They appear to all be more or less the same, but most have a slightly different call stack.

elect86 commented 4 years ago

Thanks for the list

ini bug fixed

I had a couple of commit still locals, could you give a try to the rest?

Most of the stuff looks fine on Win, I'm gonna update Ubuntu in the meanwhile :p

elect86 commented 4 years ago

I don't experience your crashes.

I can replicate n4, the dragging issue

Ubuntu 19.04

zeroeightysix commented 4 years ago

Are you running a wayland or xorg session? On the login screen, as I recall, there should be a button on the bottom right that allows you to choose which session to log into. The crashes I experience are on wayland (with XWayland enabled, but that should be on by default).

For the latest commits, I actually can't run the docking branch anymore:

Exception in thread "main" java.lang.NoSuchFieldError: DockingEnable
    at examples.ImGuiOpenGL3.<init>(opengl3.kt:92)
    at examples.Opengl3Kt.main(opengl3.kt:30)
    at examples.Opengl3Kt.main(opengl3.kt)

Not sure why this happens. IDEA is able to navigate to DockingEnable just fine. A (black) window will spawn and shortly after close with the above error message.

elect86 commented 4 years ago

The default, xorg

Try deleting the cache and rebuild

zeroeightysix commented 4 years ago

The default, xorg

Can you try on wayland instead?

Try deleting the cache and rebuild

This worked - but all previous bugs (aside from ini thing) are still there.

elect86 commented 4 years ago

Sure, I tried right now

no crashes bringing windows inside/outside my main window (the drag issue still there though).

I'm on Ubuntu 19.10 and Intel UHD Graphics 620 (nuc)

Which distro and gpu are you using?

zeroeightysix commented 4 years ago

I'm using Arch linux with vanilla GNOME. I have an i5-8250U with integrated graphics. (no dedicated GPU)

elect86 commented 4 years ago

@zeroeightysix

Spasi

Currently, the choice between X11 and Wayland cannot be made at runtime, GLFW must be built to support one or the other. That's why lwjgl-glfw-natives-linux.jar includes two binaries. LWJGL defaults to X11. You can use -Dorg.lwjgl.glfw.libname=glfw_wayland (or call Configuration.GLFW_LIBRARY_NAME.set("glfw_wayland") before initializing GLFW) to enable the shared library that supports Wayland.

zeroeightysix commented 4 years ago

Running with the wayland flag causes the following error: /usr/lib/jvm/java-11-openjdk/bin/java: symbol lookup error: /tmp/lwjglridan/3.2.3-build-13/libglfw_wayland.so: undefined symbol: __wrap_memcpy

Presumably related to https://github.com/LWJGL/lwjgl3/issues/543 or https://github.com/LWJGL/lwjgl3/issues/557?

However, I tried launching again (without the wayland flag, making it fall back to XWayland) and the JVM crashes are gone! I have no clue why, but I'm not going to question it either. Problem 3 and 4 (native animation, dragging) persist.

zeroeightysix commented 4 years ago