Doc:2.6/Manual/Game Engine/Android/Building Blender with GLES
< Doc:2.6 | Manual | Game Engine | Android
WIP
目次
Developing OpenGL ES 2.0 on Linux
Reasons
For (much) easier development we should use linux because:
- It provides nice IDE tools
- No time is wasted on deployment to actual device
- Android's GDB is a hack by Google
- Because apps are written Java
- You have to put sleep(3); in your code so GDB would attach
- GDB has poor stack trace on ARM/Android
- GDB don't show code
- Only Command Line tool
Configuring the System
You need to install Mesa OpenGL ES 2.0 and EGL drivers first
- For Ubuntu:
sudo apt-get install libgles2-mesa-dev
- Or it can be build from (didn't try)
Check Out Swiss Branch
mkdir blender-sc
cd blender-sc
svn co https://svn.blender.org/svnroot/bf-blender/branches/soc-2012-swiss_cheese soc-2012-swiss_cheese
svn co https://svn.blender.org/svnroot/bf-blender/trunk/lib/android lib/android
You need android libs for fakegl
Fake GL
Fake GL is a smart stub. You can switch between real gl and fake gl calls for testing. Also, this system enables building Blender/Blenderplayer as we cannot eliminate all GL calls.
To build fakegl
- go to lib/android/armv7-a_9/fakegl
- Follow instructions in README file to generate libGLfake.so and libGLUfake.so
- Copy these to files into /usr/lib/
Configuring Cmake
- Open Cmake and enable WITH_BUILTIN_GLEW
- Click on Advanced
- Enable WITH_GLES
- Click Configure
- Set OPENGL_INCLUDE_DIR = ****/lib/android/armv7-a_9/fakegl
- Set OPENGL_gl_LIBRARY = ****/lib/android/armv7-a_9/fakegl/libGLfake.so
- Set OPENGL_glu_LIBRARY = ****/lib/android/armv7-a_9/fakegl/libGLUfake.so
- click generate and build from directory