Git Product home page Git Product logo

lwjgl2-m1's Introduction

LWJGL - Lightweight Java Game Library For M1

The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library), OpenCL (Open Computing Language) and OpenAL (Open Audio Library) allowing for state of the art 3D games and 3D sound. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks. All in a simple and straight forward API.

Website: http://lwjgl.org Forum: http://lwjgl.org/forum Bugs/Suggestions: https://github.com/LWJGL/lwjgl/issues

Compilation

LWJGL requires a JDK and Ant installed to compile, as well as your platforms native compiler to compile the JNI.

Building on Mac M1

Install the Java 8 for arm64 provided by Zulu.

Find where it was installed, usually in /Library/Java/JavaVirtualMachines/zulu-8.

In that folder open Contents and then copy the path of the Home folder.

Replace jhome with the path you just copied.

* JAVA_HOME=jhome ant generate-all
* JAVA_HOME=jhome ant compile
* JAVA_HOME=jhome ant compile_native

lwjgl2-m1's People

Contributors

r58playz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vhd yumeris

lwjgl2-m1's Issues

How to build for Intel/x86

Amusingly, your LWJGL version fixes a forge/optifine crash with pre-1.12 MC for ALL macos versions, not just M1. Is there any way to build this project for x86?

Odd rendering and window resizing issues present in old versions of Minecraft (1.5.2 and older)

Making this issue here since your multimc m1 branch doesn't seem to be able to have issues added to it; not sure if this is a LWJGL2-m1 issue or a JVM issue.

https://user-images.githubusercontent.com/24525012/119273701-1d134980-bbda-11eb-8210-4bfafb48b335.mp4
https://user-images.githubusercontent.com/24525012/119273774-6d8aa700-bbda-11eb-8a4e-f34bbeb44a50.mp4

As shown in the above videos, Minecraft 1.5.2 and below have odd behavior when entering fullscreen (fullscreen only takes up 1/4th of the screen. with the empty space displaying the current skybox color), and hang when the screen size is adjusted. Furthermore, outside of fullscreen, the R and G color bytes seem to be inverted. My own tinkering with Minecraft Coder Project decomps of 1.5.2 seems to suggest that this inversion of the R and G bytes is happening as a result to something wrong with the window itself; not the OpenGL calls. This is further corroborated by seemingly only the render thread hanging, with all other threads still running. Furthermore, no OpenGL errors occur, nor a Minecraft Crash Report.

LWJGL2 requires java 6 to compile, which is no longer supported by macOS and does not have an m1-ARM64 version

Before attempting to set the compiler version to java 8 (the closest easily installed jdk for ARM macs), running ant generate-all would crash with:

[ERROR] Source option 6 is no longer supported. Use 7 or later.
[ERROR] Target option 6 is no longer supported. Use 7 or later.
...
BUILD FAILED
/Users/**[username removed for privacy]**/Desktop/m1-lwjgl2-comp/lwjgl2-m1/platform_build/build-generator.xml:71: Compile failed; see the compiler error output for details.

After (likely incorrectly) trying to update the JVM source and target options to JDK 8:

generate-openal:
[processor] Compiling 3 source files to /Users/**[username removed for privacy]**//Desktop/m1-lwjgl2-comp/lwjgl2-m1/bin
[processor] warning: [options] bootstrap class path not set in conjunction with -source 8
[processor] warning: Supported source version 'RELEASE_6' from annotation processor 'org.lwjgl.util.generator.GeneratorProcessor' less than -source '8'
[processor] 2 warnings
[processor] 
[processor] 
[processor] An annotation processor threw an uncaught exception.
[processor] Consult the following stack trace for details.
[processor] java.lang.RuntimeException: 
[processor] -- Failed to process template: org.lwjgl.openal.AL10 --
[processor] 	at org.lwjgl.util.generator.GeneratorProcessor.process(GeneratorProcessor.java:93)
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1025)
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:940)
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1269)
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1383)
[processor] 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1261)
[processor] 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:935)
[processor] 	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
[processor] 	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
[processor] 	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
[processor] 	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
[processor] Caused by: java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type org.lwjgl.openal.AL10
[processor] 	at org.lwjgl.util.generator.GeneratorVisitor.visitTypeAsInterface(GeneratorVisitor.java:331)
[processor] 	at org.lwjgl.util.generator.GeneratorVisitor.visitTypeAsInterface(GeneratorVisitor.java:60)
[processor] 	at java.compiler@16/javax.lang.model.util.ElementKindVisitor6.visitType(ElementKindVisitor6.java:157)
[processor] 	at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:1560)
[processor] 	at org.lwjgl.util.generator.GeneratorProcessor.process(GeneratorProcessor.java:85)
[processor] 	... 10 more
[processor] Caused by: javax.annotation.processing.FilerException: Attempt to recreate a file for type org.lwjgl.openal.AL10
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacFiler.checkNameAndExistence(JavacFiler.java:725)
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacFiler.createSourceOrClassFile(JavacFiler.java:490)
[processor] 	at jdk.compiler/com.sun.tools.javac.processing.JavacFiler.createSourceFile(JavacFiler.java:427)
[processor] 	at org.lwjgl.util.generator.GeneratorVisitor.visitTypeAsInterface(GeneratorVisitor.java:303)
[processor] 	... 14 more

BUILD FAILED
/Users/**[username removed for privacy]**//Desktop/m1-lwjgl2-comp/lwjgl2-m1/platform_build/build-generator.xml:71: Compile failed; see the compiler error output for details.

Total time: 0 seconds

I'm probably doing something wrong; but it'd probably be worthwhile to fix this on your end to at least use java 8 for compiling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.