Skip to content

Commit

Permalink
Merge pull request #41 from Over-Run/stuff
Browse files Browse the repository at this point in the history
[Core] Rename CStdlib to MemoryUtil; [GLFW] Update to GLFW 3.3.9
  • Loading branch information
squid233 committed Dec 29, 2023
2 parents 5507894 + e71657a commit 1b6ea56
Show file tree
Hide file tree
Showing 24 changed files with 116 additions and 350 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ val projName: String by project
val projVersion: String by project
val projVcs: String by project
val projBranch: String by project
val projLicenseYear: String by project
val orgName: String by project
val orgUrl: String by project
val developers: String by project
Expand Down Expand Up @@ -269,7 +270,7 @@ allprojects {
)

bottom = "<a href=\"https://github.com/Over-Run/overrungl/issues\">Report a bug or suggest an enhancement</a><br>" +
"Copyright © 2022-2023 Overrun Organization<br>" +
"Copyright © 2022-$projLicenseYear Overrun Organization<br>" +
"<b>$projVersion</b>"
}
}
Expand Down
3 changes: 2 additions & 1 deletion doc/notes/0.x/0.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ _Not Released Yet_

This version includes the following features:

- GLFW 3.3.8
- GLFW 3.3.9
- OpenGL 1.0 ~ 4.6 functions and constants
- OpenGL extension functions
- OpenGL Loader
- STB Image, perlin noise, easy font
- C memory function
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ projName=overrungl
projVersion=0.1.0-SNAPSHOT
projVcs=Over-Run/overrungl
projBranch=main
projLicenseYear=2023

# Organization
orgName=Overrun Organization
Expand All @@ -18,3 +19,4 @@ jdkEnablePreview=true
kotlinTargetJdkVersion=21

projModules=core, glfw, nfd, joml, opengl, stb
overrunPlatformVersion=1.0.0
5 changes: 5 additions & 0 deletions modules/overrungl.core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
val overrunPlatformVersion: String by rootProject

dependencies {
implementation("io.github.over-run:platform:$overrunPlatformVersion")
}
2 changes: 1 addition & 1 deletion modules/overrungl.core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
module overrungl.core {
exports overrungl;
exports overrungl.os;
exports overrungl.util;
exports overrungl.util.value;
exports overrungl.internal
Expand All @@ -31,5 +30,6 @@
overrungl.opengl,
overrungl.stb;

requires io.github.overrun.platform;
requires static org.jetbrains.annotations;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package overrungl;

import overrungl.internal.Exceptions;
import overrungl.util.CStdlib;
import overrungl.util.MemoryUtil;

import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.ValueLayout;
Expand All @@ -38,7 +38,7 @@
* case 'F' -> JAVA_FLOAT;
* case 'D' -> JAVA_DOUBLE;
* case 'P' -> ADDRESS;
* case 'p' -> CStdlib.ADDRESS_UNBOUNDED;
* case 'p' -> MemoryUtil.ADDRESS_UNBOUNDED;
* default -> throw new IllegalArgumentException();
* }}
*
Expand Down Expand Up @@ -123,7 +123,7 @@ public static ValueLayout ofValue(char c) throws IllegalArgumentException {
case 'F' -> JAVA_FLOAT;
case 'D' -> JAVA_DOUBLE;
case 'P' -> ADDRESS;
case 'p' -> CStdlib.ADDRESS_UNBOUNDED;
case 'p' -> MemoryUtil.ADDRESS_UNBOUNDED;
default ->
throw Exceptions.IAE. "Invalid argument c: expected one of B, S, I, J, C, Z, F, D, P or p; got '\{ c }'" ;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class OverrunGL {
/**
* The version of GLFW native libraries.
*/
public static final String GLFW_VERSION = "3.3.8.0";
public static final String GLFW_VERSION = "3.3.9.0";
/**
* The version of NFD native libraries.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package overrungl.internal;

import io.github.overrun.platform.Architecture;
import io.github.overrun.platform.Platform;
import org.jetbrains.annotations.Nullable;
import overrungl.FunctionDescriptors;
import overrungl.os.Architecture;
import overrungl.os.Platform;
import overrungl.util.CStdlib;
import overrungl.util.MemoryUtil;

import java.io.File;
import java.lang.foreign.*;
Expand Down Expand Up @@ -50,7 +50,7 @@ public final class RuntimeHelper {
/**
* An unbounded address layout.
*/
public static final AddressLayout ADDRESS_UNBOUNDED = CStdlib.ADDRESS_UNBOUNDED;
public static final AddressLayout ADDRESS_UNBOUNDED = MemoryUtil.ADDRESS_UNBOUNDED;
private static final StackWalker STACK_WALKER = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE);

/**
Expand Down Expand Up @@ -194,7 +194,7 @@ public static SymbolLookup load(String module, String basename, String version)
* @param segment the segment.
*/
public static boolean isNullptr(@Nullable MemorySegment segment) {
return CStdlib.isNullptr(segment);
return MemoryUtil.isNullptr(segment);
}

/**
Expand Down

This file was deleted.

202 changes: 0 additions & 202 deletions modules/overrungl.core/src/main/java/overrungl/os/Platform.java

This file was deleted.

Loading

0 comments on commit 1b6ea56

Please sign in to comment.