Doc:2.6/Manual/Game Engine/Android/Building Blender with GLES

提供: wiki
< Doc:2.6‎ | Manual‎ | Game Engine‎ | Android
2018年6月29日 (金) 05:50時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索


Developing OpenGL ES 2.0 on Linux


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

Check Out Swiss Branch

mkdir blender-sc
cd blender-sc
svn co soc-2012-swiss_cheese
svn co 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 and
  • 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/
  • Set OPENGL_glu_LIBRARY = ****/lib/android/armv7-a_9/fakegl/
  • click generate and build from directory