Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile all demos to native executable #37

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

chirontt
Copy link
Contributor

This PR is recommended to be merged to its own branch, rather than to the main branch, as the code is designed to compile against the official LWJGL 3.2.3 release, not against the current LWJGL snapshot which the main branch tracks.

  • compile against LWJGL 3.2.3 version
  • add Gradle wrapper & build script
  • use GraalVM native-image utility to produce native executable
    containing all the demos
  • add some documentation on the native-image configuration files to README.md
  • configuration files need be updated on the Mac platform, for the Vulkan and SWT demos.

Native executable can be produced in Windows and Linux (Ubuntu).
Mac status is unknown, as no Mac hardware is available for testing.
Ditto for CUDA demos, which require NVIDIA graphics card to run.

- compile against LWJGL 3.2.3 version
- restrict to the four BGFX demos (code & resources)
- add Gradle wrapper & build script
- use GraalVM native-image utility to produce native executable
  containing the four BGFX demos
the README.md changes are specific to this branch only.
- org.lwjgl.Version's getVersion() method is patched in native image
to retrieve the build number correctly from manifest entry
- system properties from the command line can be passed on to the
running demo in Gradle/Maven build scripts and in native image
to make it work in Linux.

Also, remove the ThreadLocalUtil's substitution by GraalVM,
as the resulting native image seems to work fine without it.
- compile against LWJGL 3.2.3 version
- restrict to the Vulkan demos (code & resources)
- add Gradle wrapper & build script
- use GraalVM native-image utility to produce native executable
  containing the Vulkan demos.
- compile against LWJGL 3.2.3 version
- restrict to the OpenGL demos (code & resources)
- exclude the SWT demos for now
- use GraalVM native-image utility to produce native executable
  containing the OpenGL demos.
- src/org/lwjgl/demo/opengl/swt classes are now included in the build
- SWT has different APIs for different platforms, especially in the
  native-to-Java callbacks, which makes it challenging to create
  portable build script to generate platform-specific native images
  from platform-specific configuration files
- Gluon provides the client-gradle-plugin/client-maven-plugin for
  Gradle/Maven, which have excellent supports for platform-specific
  configuration files to generate platform-specific native images
- platform-specific configuration files for SWT are in the
  res/META-INF/substrate/config directory which are used by the Gluon
  plugins during the native-image building.
to the reflect-config.json file, to make the Vulkan demos working
in the generated native image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant