This lab is primarily to have fun with the cross-platform library game developers will often use called SDL2 & OpenGL.
The following is a demo for the lab.
- Cube - A color gradient cube rotating.
Similar to Lab 4 lets build and run the apps before we do the exercise. Here are the following commands to build and run:
Linux
bash jextract_linux.sh
bash run_SDLCube.java_linux.shMacOS
Note: Make sure you have SDL installed and the header files directory setup properly. Check out the installs for instructions. e.g. On MacOS(Intel) use the following:
brew install sdl2Warning: A known issue is when sdl2 version 2.0.22 is installed the headers directory don't work when using jextract. You'll need to download https://www.libsdl.org/release/SDL2-2.0.18.dmg and install headers from version 2.0.18. Please see installs for more details before running the following scripts.
bash jextract_macos.sh
bash run_SDLCube.java_macos.shWindows
bash jextract_windows.cmd
bash run_SDLCube.java_windows.cmdTo exit the application by clicking the close button or press the 'Q' key on the keyboard to quit.
