Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (813)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JOML 1.9.0  (Read 6825 times)
0 Members and 1 Guest are viewing this topic.
Offline KaiHH

JGO Kernel


Medals: 442



« Posted 2016-11-01 18:16:25 »

The 1.9.0 release of JOML, codename "Halloween" Wink, has been released yesterday and is since available on GitHub Release and on Maven Central.
See the 1.9.0 release notes for further information.
People upgrading from 1.8.0 and before should also read the 1.8.1 release notes.
Offline KaiHH

JGO Kernel


Medals: 442



« Reply #1 - Posted 2016-11-12 11:24:09 »

The first Android-compatible version of JOML 1.9.1-SNAPSHOT has been deployed to oss.sonatype.org as an Android Library (.aar file) together with javadocs and sources, ready to be included as such in an Android Application Project. The coordinates are
org.joml:joml-android:1.9.1-SNAPSHOT
.
The features are exactly identical to the current 1.9.1-SNAPSHOT for Desktop.
Make sure you add the oss.sonatype.org snapshot repository to your Gradle buildfile:
1  
2  
3  
repositories {
  maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
Offline KaiHH

JGO Kernel


Medals: 442



« Reply #2 - Posted 2017-01-01 12:23:35 »

New bugfix release 1.9.1 now available on Maven Central.
Release notes
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline KaiHH

JGO Kernel


Medals: 442



« Reply #3 - Posted 2017-01-01 20:59:24 »

Starting with the currently published 1.9.2-SNAPSHOT version (on oss.sonatype.org) the next 1.9.2 release will enhance the Java compatibility back to even Java 1.2 ***. JOML already was pretty 1.2-compatible, so it was not a big task. The use-case are people with really ancient (or self-built) JREs, who simply want to use the math classes of JOML and not the NIO interoperability with a Java/OpenGL binding library (NIO classes only exist since 1.4).
So, JOML fully supports 8 major Java versions, from 1.2 to 1.9.
Nevertheless, JOML will focus on being optimized for more recent JREs. Currently, this includes 7, 8 and 9.

*** yes, JOML actually runs on an ancient Sun 1.2.2_017 JRE. Smiley
Offline SHC
« Reply #4 - Posted 2017-01-02 00:42:40 »

The use-case are people with really ancient (or self-built) JREs, who simply want to use the math classes of JOML and not the NIO interoperability with a Java/OpenGL binding library (NIO classes only exist since 1.4).

That's impressive, why not maybe publish a GWT version too? I can write the GWT module for you, it's just including an XML file along with Java class files and the sources.

Offline KaiHH

JGO Kernel


Medals: 442



« Reply #5 - Posted 2017-01-02 20:38:13 »

I've spent a little trying to port JOML to GWT, but it's not an easy task. The major problems are:
- classes being used from java.lang, java.io and java.text which are not present in GWT (albeit being present in Java 1.1). Those need to be available as skeletons (for exception types) or correctly ported using GWT's replacement classes (most notably for java.text classes, such as DecimalFormat and NumberFormat)
- Reflection. JOML has some places where the Java Core Reflection API is being used to detect capabilities of the runtime environment (the existence of certain classes and methods). This can and should now be centralized into a single "Config" class (just like GNU autotools do it for C projects), with various "HAS_..." static methods implemented differently for desktop JREs and for GWT (possibly for GWT just returning false or true).

The goal should be to have the exact same codebase for both desktop JREs and GWT, and using build parameterization (e.g. Maven profiles) to control which classes get included in a build.
Offline KaiHH

JGO Kernel


Medals: 442



« Reply #6 - Posted 2017-01-03 20:40:16 »

First support for GWT has been added in the gwt-new branch.
In order to build a GWT module JAR file from it, the repo needs to be cloned and the branch checked-out and built with
mvn package -Dgwt
This results in a joml-1.9.2-SNAPSHOT-gwt.jar being generated in target/. This can be added to the buildpath/classpath of your GWT application. In order to use the module, simply add
<inherits name="joml"/>
to your application module xml file.

Current limitation: toString() on JOML objects does not produce the same formatted output as the JRE version of JOML due to DecimalFormat not having been ported yet.
Offline KaiHH

JGO Kernel


Medals: 442



« Reply #7 - Posted 2017-01-05 22:30:39 »

First working version of JOML for GWT has been published to oss.sonatype.org as
org.joml:joml-gwt:1.9.2-SNAPSHOT
. Interoperability with WebGL through SHC's excellent WebGL4J via float[] and GWT's Float32Array emulation.
Offline SHC
« Reply #8 - Posted 2017-01-06 16:13:54 »

First working version of JOML for GWT has been published to oss.sonatype.org as
org.joml:joml-gwt:1.9.2-SNAPSHOT
. Interoperability with WebGL through SHC's excellent WebGL4J via float[] and GWT's Float32Array emulation.

That's great, and I started to port the examples to use JOML. Unfortunately I'm greeted with an error message:

1  
2  
3  
4  
5  
6  
7  
:examples:compileGwt                 
Jan 06, 2017 8:55:28 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Compiling module com.shc.webgl4j.examples.client
   [ERROR] Errors in 'org/joml/Options.java'
      [ERROR] Line 59: Only string constants may be used as property name in System.getProperty()
:examples:compileGwt FAILED

The reason is that
System.getProperty
calls are inlined by the compiler so they must have constant args. Think of it like a
GWT.create
call with a String.

Better solution will be to replace
hasOption
calls with a regex to
System.getProperty()
.

1  
2  
hasOption\((.+)\)
Boolean.parseBoolean(System.getProperty($1));

That is sufficient in my opinion. By the way, the use of pre-processor is a nice idea, does that work with IDE support? I don't think it works in IDE, but am curious.

Offline KaiHH

JGO Kernel


Medals: 442



« Reply #9 - Posted 2017-01-06 17:16:25 »

Thanks for the info! Fixed in the latest deployment.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SHC
« Reply #10 - Posted 2017-01-06 17:27:09 »

You have to define the properties that you use in the module description file, and also set the accepted values.

1  
<define-property name="joml.debug" values="true,false">

Then whenever we want to set the property in the user project, they would add the set property command to their module file like

1  
<set-property name="joml.debug" value="true">

Offline SHC
« Reply #11 - Posted 2017-01-06 17:44:21 »

Done! I have updated the examples to use JOML-GWT successfully! Thanks for the work @KaiHH.



New examples can be found here

Offline KaiHH

JGO Kernel


Medals: 442



« Reply #12 - Posted 2017-01-06 18:43:57 »

I just checked whether the GWT compiler optimizes virtual calls and inlines them, just like the HotSpot JIT does when it can be proven that the callsite will only ever see one single incarnation of the receiver type. And in fact, it does! I thought this could become an issue because of those internal "Proxy" classes that the JOML classes have. But it is not.
So, the add function in your screenshot should actually show up other.m00...other.m33. It does for me when I take your WebGL4J Gradle build and just disable obfuscation via:
1  
2  
3  
4  
gwt {
    ...
    compiler { style = 'PRETTY'}
}

When I use Matrix4f.add(Matrix4fc right), then GWT generates this:
1  
2  
3  
function $add_7(this$static, other){
  return $_m00(this$static, this$static.m00 + other.m00) , $_m01(this$static, this$static.m01 + other.m01) , $_m02(this$static, this$static.m02 + other.m02) , $_m03(this$static, this$static.m03 + other.m03) , $_m10(this$static, this$static.m10 + other.m10) , $_m11(this$static, this$static.m11 + other.m11) , $_m12(this$static, this$static.m12 + other.m12) , $_m13(this$static, this$static.m13 + other.m13) , $_m20(this$static, this$static.m20 + other.m20) , $_m21(this$static, this$static.m21 + other.m21) , $_m22(this$static, this$static.m22 + other.m22) , $_m23(this$static, this$static.m23 + other.m23) , $_m30(this$static, this$static.m30 + other.m30) , $_m31(this$static, this$static.m31 + other.m31) , $_m32(this$static, this$static.m32 + other.m32) , $_m33(this$static, this$static.m33 + other.m33) , this$static.properties = 0 , this$static;
}

which means it can see through the Matrix4fc interface to the only implementation, Matrix4f, and inline the virtual calls of the m-element accessors.
Pretty cool.

How did you call the GWT compiler so that the getter method calls remained in your shown code?
Offline SHC
« Reply #13 - Posted 2017-01-07 04:14:52 »

GWT does optimizations only when not in Super Development Mode. Once you start with gradlew superDev, it just starts with the super dev server, and still runs the WAR it created for production. If you enable the DevMode with the bookmarks (go to localhost:9876 to get the bookmarklets) then a recompile will happen disabling the optimizations so you can debug your program using source maps, right in the browser.

Offline KaiHH

JGO Kernel


Medals: 442



« Reply #14 - Posted 2017-04-27 19:37:11 »

Latest JOML release version 1.9.3 is out!
The most notable change is the full compatibility with GWT >= 2.5.0 (even in strict mode), available as org.joml:joml-gwt:1.9.3 on Maven Central (Gradle setup).
Many thanks to @SHC for his great support to make this possible!
Offline KaiHH

JGO Kernel


Medals: 442



« Reply #15 - Posted 2017-07-22 11:44:43 »

Latest JOML release version 1.9.4 is out!
As usual, Smiley thanks to @theagentd for reporting bugs and proposing valuable additions.
Pages: [1]
  ignore  |  Print  
 
 

 
cybrmynd (137 views)
2017-08-02 12:28:51

cybrmynd (157 views)
2017-08-02 12:19:43

cybrmynd (150 views)
2017-08-02 12:18:09

Sralse (167 views)
2017-07-25 17:13:48

Archive (640 views)
2017-04-27 17:45:51

buddyBro (762 views)
2017-04-05 03:38:00

CopyableCougar4 (1294 views)
2017-03-24 15:39:42

theagentd (1262 views)
2017-03-24 15:32:08

Rule (1235 views)
2017-03-19 12:43:22

Rule (1310 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!