Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: native-binaries-ultralight
path: native-binaries/ultralight/Debug
path: native-binaries/ultralight
- name: Upload gpu artifacts
uses: actions/upload-artifact@v1
with:
name: native-binaries-ultralight-gpu
path: native-binaries/ultralight-gpu/Debug
path: native-binaries/ultralight-gpu

build-jars:
needs: [ build-binaries-unix, build-binaries-windows ]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.8
0.4.9
1 change: 1 addition & 0 deletions ultralight-java-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ processResources {
}
from(rootProject.file(project.getProperties().getOrDefault("ultralight-java.base.native-binaries-folder", project(":ultralight-java-native").buildDir.toPath().toString() + "/nativeBinaries").toString())) {
into "native-binaries"
include("*.dll", "*.so", "*.dylib")
}
}

Expand Down
33 changes: 33 additions & 0 deletions ultralight-java-glfw-opengl-util/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
plugins {
id("java-library")
id("maven-publish")
}

group = "com.labymedia"

jar {
manifest {
attributes(
'Automatic-Module-Name': 'com.labymedia.ultralight.util'
)
}
}

repositories {
mavenCentral()
}

dependencies {
implementation(project(":ultralight-java-base"))
implementation(project(":ultralight-java-gpu"))

implementation(group: "org.lwjgl", name: "lwjgl-glfw", version: "3.2.2")
implementation(group: "org.lwjgl", name: "lwjgl-opengl", version: "3.2.2")
}

commonPublish(project) {
pom {
name = "UltralightJavaGlfwOpenGLUtil"
description = "Ultralight Java Glfw OpenGL Util"
}
}
24 changes: 0 additions & 24 deletions ultralight-java-glfw-opengl-util/build.gradle.kts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.util.concurrent.*;
import java.util.function.Consumer;

import static org.lwjgl.glfw.GLFW.glfwInit;
import static org.lwjgl.opengl.GL.createCapabilities;

/**
Expand Down Expand Up @@ -63,16 +62,17 @@ private UltralightGlfwOpenGLContext(int mainWindowWidth, int mainWindowHeight, S
this.driver = driver;
this.thread = new UltralightThread();
this.subWindows = new HashSet<>();
this.postAndWait(() -> initialize(mainWindowWidth, mainWindowHeight, mainWindowTitle, parentWindow));
initialize(mainWindowWidth, mainWindowHeight, mainWindowTitle, parentWindow);
}

private void initialize(int mainWindowWidth, int mainWindowHeight, String mainWindowTitle, long parentWindow) {
glfwInit();
this.mainWindow = UltralightGlfwOpenGLWindow.create(this, mainWindowWidth, mainWindowHeight, mainWindowTitle, parentWindow);
this.mainWindow.makeContext();
createCapabilities();
this.platform = UltralightPlatform.instance();
this.driver.initialise(this);
this.postAndWait(() -> {
this.mainWindow.makeContext();
createCapabilities();
this.platform = UltralightPlatform.instance();
this.driver.initialize(this);
});
}

/**
Expand Down Expand Up @@ -203,7 +203,7 @@ public UltralightGlfwOpenGLContext updateJavaScript() {
* @param window the window to render
* @return this
* @see UltralightOpenGLGPUDriver#renderTexture(UltralightGlfwOpenGLWindow)
* @see UltralightOpenGLGPUDriver#initialise(UltralightGlfwOpenGLContext)
* @see UltralightOpenGLGPUDriver#initialize(UltralightGlfwOpenGLContext)
* @see UltralightPlatform#setGPUDriver(UltralightGPUDriverNative)
* @see UltralightPlatform#setGPUDriver(UltralightGPUDriver)
* @see UltralightPlatform#setGPUDriverPointer(long)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private UltralightGlfwOpenGLGPUDriver(boolean msaa) {
* Set the {@link UltralightOpenGLGPUDriverNative} instance to the {@link com.labymedia.ultralight.UltralightPlatform}.
*/
@Override
public void initialise(UltralightGlfwOpenGLContext context) {
public void initialize(UltralightGlfwOpenGLContext context) {
this.driverNative = new UltralightOpenGLGPUDriverNative(context.getMainWindow().getWindowHandle(), this.msaa, GLFW.Functions.GetProcAddress);
this.context = context;
this.context.getPlatform().setGPUDriver(this.driverNative);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.labymedia.ultralight.UltralightPlatform;
import com.labymedia.ultralight.UltralightView;
import com.labymedia.ultralight.config.UltralightViewConfig;
import com.labymedia.ultralight.gpu.UltralightGPUDriverNativeUtil;
import com.labymedia.ultralight.plugin.render.UltralightGPUDriver;
import com.labymedia.ultralight.plugin.render.UltralightGPUDriverNative;
import org.lwjgl.glfw.GLFW;
Expand Down Expand Up @@ -55,7 +54,7 @@ public class UltralightGlfwOpenGLWindow {
*/
private UltralightGlfwOpenGLWindow(UltralightGlfwOpenGLContext context, int width, int height, String title, long sharedWindow) {
this.context = context;
this.context.postAndWait(() -> initialize(width, height, title, sharedWindow));
initialize(width, height, title, sharedWindow);
}

private void initialize(int width, int height, String title, long sharedWindow) {
Expand Down Expand Up @@ -95,7 +94,7 @@ public long getWindowHandle() {
*
* @return this
* @see UltralightOpenGLGPUDriver#renderTexture(UltralightGlfwOpenGLWindow)
* @see UltralightOpenGLGPUDriver#initialise(UltralightGlfwOpenGLContext)
* @see UltralightOpenGLGPUDriver#initialize(UltralightGlfwOpenGLContext)
* @see UltralightPlatform#setGPUDriver(UltralightGPUDriverNative)
* @see UltralightPlatform#setGPUDriver(UltralightGPUDriver)
* @see UltralightPlatform#setGPUDriverPointer(long)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface UltralightOpenGLGPUDriver {
*
* @param context the context to initialize
*/
void initialise(UltralightGlfwOpenGLContext context);
void initialize(UltralightGlfwOpenGLContext context);

/**
* Update web content and render it to an OpenGL texture.
Expand Down
7 changes: 7 additions & 0 deletions ultralight-java-gpu-native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ include(CheckSymbolExists)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/../3rdparty/cmake")

foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)

################################
# Set up 3rdparty dependencies #
################################
Expand Down
1 change: 1 addition & 0 deletions ultralight-java-gpu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ processResources {
}
from(rootProject.file(project.getProperties().getOrDefault("ultralight-java.gpu.native-binaries-folder", project(":ultralight-java-gpu-native").buildDir.toPath().toString() + "/nativeBinaries").toString())) {
into "native-binaries"
include("*.dll", "*.so", "*.dylib")
}
}

Expand Down
7 changes: 7 additions & 0 deletions ultralight-java-native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ include(CheckSymbolExists)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/../3rdparty/cmake")

foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)

################################
# Set up 3rdparty dependencies #
################################
Expand Down