diff --git a/imgui-binding/build.gradle b/imgui-binding/build.gradle index 4d41c3e..feb9451 100644 --- a/imgui-binding/build.gradle +++ b/imgui-binding/build.gradle @@ -46,7 +46,9 @@ bintray { userOrg = user desc = 'A handcrafted 1-1 Java binding for the Dear-ImGui' licenses = ['Apache-2.0'] - vcsUrl = 'https://github.com/SpaiR/imgui-java' + websiteUrl = 'https://github.com/SpaiR/imgui-java' + issueTrackerUrl = 'https://github.com/SpaiR/imgui-java/issues' + vcsUrl = 'https://github.com/SpaiR/imgui-java.git' labels = ['dear-imgui', 'java', 'jni'] githubRepo = 'SpaiR/imgui-java' publicDownloadNumbers = true diff --git a/imgui-lwjgl3/build.gradle b/imgui-lwjgl3/build.gradle index 40393b4..9383842 100644 --- a/imgui-lwjgl3/build.gradle +++ b/imgui-lwjgl3/build.gradle @@ -32,11 +32,6 @@ task sourcesJar(type: Jar, dependsOn: classes) { from sourceSets.main.allSource } -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set('javadoc') - from javadoc.destinationDir -} - publishing { publications { MyPublication(MavenPublication) { @@ -44,7 +39,6 @@ publishing { groupId 'io.imgui.java' artifactId 'lwjgl3' artifact sourcesJar - artifact javadocJar version property('version') } } @@ -61,7 +55,9 @@ bintray { userOrg = user desc = 'Backend implementation for imgui-java based on LWJGL3' licenses = ['Apache-2.0'] - vcsUrl = 'https://github.com/SpaiR/imgui-java' + websiteUrl = 'https://github.com/SpaiR/imgui-java' + issueTrackerUrl = 'https://github.com/SpaiR/imgui-java/issues' + vcsUrl = 'https://github.com/SpaiR/imgui-java.git' labels = ['dear-imgui', 'java', 'lwjgl3'] githubRepo = 'SpaiR/imgui-java' publicDownloadNumbers = true diff --git a/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java b/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java index 82889b0..3236504 100644 --- a/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java +++ b/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java @@ -26,7 +26,7 @@ import static org.lwjgl.system.MemoryUtil.NULL; @SuppressWarnings("MagicNumber") public final class ImGuiGlfwExample { - private static final int DEFAULT_WIDTH = 1024; + private static final int DEFAULT_WIDTH = 1280; private static final int DEFAULT_HEIGHT = 768; private long window; // current GLFW window pointer @@ -80,7 +80,6 @@ public final class ImGuiGlfwExample { glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable glfwWindowHint(GLFW_MAXIMIZED, GLFW_TRUE); // the window will be maximized - glfwWindowHint(GLFW_DECORATED, GLFW_TRUE); // the window will be decorated // Create the window window = glfwCreateWindow(DEFAULT_WIDTH, DEFAULT_HEIGHT, "ImGui+GLFW+LWJGL Example", NULL, NULL); @@ -249,22 +248,18 @@ public final class ImGuiGlfwExample { glfwSetCursor(window, mouseCursors[imguiCursor]); glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); - // Render itself starts here - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer + // Clear the framebuffer + glClear(GL_COLOR_BUFFER_BIT); // IMPORTANT!! // Any ImGui code SHOULD go between NewFrame()/Render() methods ImGui.newFrame(); - showUi(); - ImGui.end(); - - if (showDemoWindow.get()) { - ImGui.showDemoWindow(showDemoWindow); - } - + showUi(); // ImGui calls goes here ImGui.render(); - imGuiGl3.render(ImGui.getDrawData()); // render DrawData from ImGui into our OpenGL context + // After ImGui#render call we provide draw data into LWJGL3 render. + // At that moment ImGui will be rendered to the current OpenGL context. + imGuiGl3.render(ImGui.getDrawData()); glfwSwapBuffers(window); // swap the color buffers @@ -277,7 +272,7 @@ public final class ImGuiGlfwExample { ImGui.setNextWindowSize(600, 300, ImGuiCond.Once); ImGui.setNextWindowPos(10, 10, ImGuiCond.Once); - ImGui.begin("Custom window"); + ImGui.begin("Custom window"); // Start Custom window ImGui.text("Hello from Java!"); ImGui.button("Drag me"); @@ -324,6 +319,12 @@ public final class ImGuiGlfwExample { if (ImGui.button("Copy")) { ImGui.setClipboardText(imguiDemoLink); } + + ImGui.end(); // End Custom window + + if (showDemoWindow.get()) { + ImGui.showDemoWindow(showDemoWindow); + } } // If you want to clean a room after yourself - do it by yourself