Last active
August 14, 2019 16:42
-
-
Save doyousketch2/eaffc01aebcd63adedf24baa71a4b970 to your computer and use it in GitHub Desktop.
Minetest GLES notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt remove libirrlicht-dev | |
sudo apt install libglfw3-dev libgles2-mesa-dev mesa-common-dev mlocate notify-osd | |
## not needed, but tried: | |
## sudo apt install libglu1-mesa-dev freeglut3-dev libcogl-dev | |
git clone --recursive --depth 1 -b ogl-es https://github.com/zaki/irrlicht.git irrlicht-gles | |
cd irrlicht-gles/source/Irrlicht | |
## GLES1 doesn't appear to have all the functions needed to compile Irrlict easily. | |
## so remove COGLESDriver.o COGLESExtensionHandler.o | |
## from line 45 of Makefile, because it wants to use GLES1 instead of GLES2. | |
sed -i '45 s/COGLESDriver.o COGLESExtensionHandler.o //' Makefile | |
## softlink to where GLES2 headers are: | |
sudo ln -s /usr/include/EGL /usr/include/GLES | |
## make sure you aren't using an old irrlicht version: | |
sudo updatedb && locate libIrrlicht. | |
sudo rm /usr/lib/x86_64-linux-gnu/libIrrlicht.s* | |
## compile Irrlicht, then copy to install dir | |
make NDEBUG=1 -j $(nproc) | |
cd ../../lib/Linux/ | |
sudo cp libIrrlicht.a /usr/lib/x86_64-linux-gnu/libIrrlicht.a | |
## change to minetest dir, then compile: | |
cd ~/games/minetest-git/ | |
cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_REDIS=0 -DENABLE_POSTGRESQL=0 \ | |
-DBUILD_SERVER=1 -DBUILD_CLIENT=1 -DIRRLICHT_LIBRARY=/usr/lib/x86_64-linux-gnu/libIrrlicht.a \ | |
&& make -j$(nproc) && notify-send Minetest updated | |
## Found system OpenGL ES 2 library: /usr/lib/x86_64-linux-gnu/libGLESv2.so;/usr/lib/x86_64-linux-gnu/libSM.so; | |
## /usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so; | |
## /usr/lib/x86_64-linux-gnu/libGLESv2.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment