-
-
Notifications
You must be signed in to change notification settings - Fork 266
JOGL
JOGL is the 3D library NetLogo uses for its 3D view. This is used by NetLogo 3D, the 3D view in regular 2D NetLogo, and in the View2.5D extension.
Getting it bundled for inclusion in NetLogo takes a little extra work. The JOGL libraries themselves are included as normal in the build.sbt file. But JOGL depends on architecture-specific native libraries per architecture to run properly. These native libraries have to be packaged together during the build process, and copied into the NetLogo installation files (see NativeLibs.scala).
These native libraries are posted on the ccl-artifacts Amazon S3 bucket so they can be pulled down by anyone doing development with NetLogo.
- From the JOGL repo in the
jarfolder of the version you want to use (like https://jogamp.org/deployment/archive/rc/v2.4.0/jar/), download all of thejogl-all-natives-*.jarfiles forlinux-amd64,linux-i586,maxos-universal,windows-amd64, andwindows-i586(the 5 architectures desktop NetLogo runs on). Then do the same for thegluegen-rt-natives-*.jarfiles.- As of version 2.4.0 of JOGL, it seems like they are not packaging 32 bit native libraries anymore. For now, since we'd been using the 2.4.0 release candidate ones in our production builds, those RC libraries are bundled to our 2.4.0 final package. In the future we may have to address this differently.
- Unzip all 10 of those jar files.
- In the extracted folders for each, there should be a
nativesfolder and inside that a folder with the "short" architecture name. For example,jogl-all-natives-linux-amd64.jarhas a foldernatives/linux-amd64/once extracted. Copy that folder out into a new folder for building the final zip file. Then merge in thegluegen-rt-natives-*.jarversion. You should haveso,dylibordllfiles in each of the 5 subfolders. See the existing native libs bundle for comparison (like https://s3.amazonaws.com/ccl-artifacts/natives/jogl-2.4.0-natives-rc-20200307.zip). - Zip those folders together into the
jogl-#.#.#-natives-#EXTRA-VERSION.zipfile. - Upload that file to the
ccl-artifactsbucket on Amazon S3, mark it read-only for the public. - Do a quick test download.
- Once the paths are updated in
build.sbtandNativeLibs.scalain your local NetLogo repository, do a test update, build, and run of NetLogo 3D. It might be a good idea tocleanfirst, to make sure no existing JOGL libraries are left behind. Here is a sample commit updating JOGL in NetLogo.
There is probably an easier way to do this. JOGL provides an "all" package, but we haven't looked into if it'd be easier to modify our "natives installer" to use it instead of going through these rote steps with each release. Also, JOGL provides "native libs in jars" which should let us include these dependencies as normal jars but we haven't put much time into getting that to work, either.
- Extensions
- NetLogo Libraries
- Controlling API
- Extensions API
- 6.0 Extension and Controlling API Transition-Guide
- Optimizing NetLogo Runs
- Setting English as the Default Language when Running NetLogo
- Unofficial Features
- Advanced Installation
- Optimization List
- Java System Properties and how to use them
- NetLogo on ARM Devices
- Multiple Views via HubNet
- Branches
- Building
- Tests
- Windows Setup
- Continuous Integration
- Draft: How to Help
- NetLogo Project Ideas
- Syntax Highlighting
- Building with IntelliJ
- Code Formatting
- Localization
- XML File Format
- Pre‐7.0.0 File Format (.nlogo) and Widget Format
- Benchmarking
- Releasing/Publishing
- Preparing the Models Library for Release
- Documentation
- NetLogo Bundled Java Versions
- JOGL
- Plugins API
- Architecture
- LazyAgentset
- Model Runs and Review Tab
- Model Runs: To Do and Code Overview
- Notes on in Radius
- Archived Branches
- Touch API Proposal
- Why isn't NetLogo "Parallel"?
- Potential Speedups
- Tortoise
- SimServer, WebStart, and NetLogo in Classrooms