Question about OpenGL ES

For people working on the C++ code.
celinnia
Member
 
Posts: 13
Joined: Fri Apr 07, 2017 21:21

Question about OpenGL ES

by celinnia » Fri Apr 07, 2017 21:49

I've been attempting to get Minetest working on an ARM Linux device with a Mali GPU. Using glshim gives pretty good results, but I'd much rather utilize OpenGL ES 1 or 2. However, I'm running into an error.

I based my approach off of exsiting examples like this:

https://raw.githubusercontent.com/freeminer/freeminer/master/build/debian_ogles.sh

So first, I cloned and built the ogl-es branch of Irrlicth:

Code: Select all
git clone --recursive --depth 1 -b ogl-es  https://github.com/zaki/irrlicht.git irrlicht
make -j $(nproc || sysctl -n hw.ncpu || echo 2) -C irrlicht/source/Irrlicht


This compiles with no problem, so I then clone and build Minetest:

Code: Select all
git clone --depth 1 https://github.com/minetest/minetest.git
cd minetest
cmake . -DRUN_IN_PLACE=TRUE -DENABLE_GLES=1 -DEGL_INCLUDE_DIR=/usr/include/GLES/egl.h -DEGL_LIBRARY=/usr/lib/arm-linux-gnueabihf/libEGL.so -DOPENGLES2_INCLUDE_DIR=/usr/include/GLES2/gl2.h -DOPENGLES2_LIBRARY=/usr/lib/arm-linux-gnueabihf/libGLESv2.so -DBUILD_SERVER=NO -DIRRLICHT_SOURCE_DIR=/myFolder/irrlicht/source/Irrlicht/ -DIRRLICHT_LIBRARY=/myFolder/irrlicht/lib/Linux/libIrrlicht.a -DIRRLICHT_INCLUDE_DIR=/myFolder/irrlicht/include/
make -j $(nproc || sysctl -n hw.ncpu || echo 2)


I then edit minetest.conf to set the video driver and disable shaders:

Code: Select all
enable_shaders = false
video_driver = ogles1


(I've also tried ogles2, although I don't think Irrlicht supports that version at this time.)

Then I try running the game. If I have the glshim installed, it basically ignores the request to use OpenGL ES and falls back to OpenGL 1.5, which uses the shim and runs the game without too many issues (some UI textures are screwed up, but otherwise it seems okay)

If the shim is not installed, I get this error when running Minetest:

WARNING[Main]: Irrlicth: OpenGL ES driver version is 1.0.
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
Loaded texture: /myFolder/minetest/games/minimal/menu/background.png
Loaded texture: /myFolder/minetest/games/minimal/menu/icon.png
*** Error in './minetest': free(): invalid next size (normal): 0x017d2788 ***


Any help would be appreciated. Thanks in advance!
 

celinnia
Member
 
Posts: 13
Joined: Fri Apr 07, 2017 21:21

Re: Question about OpenGL ES

by celinnia » Tue Apr 18, 2017 03:58

For anyone else who is having this issue, I was able to solve it by adding the proper linking in the cmake command:

Code: Select all
DCMAKE_EXE_LINKER_FLAGS=-lEGL
 


Return to Partly official engine development



Who is online

Users browsing this forum: No registered users and 1 guest