Hi everyone,

I am new to the OSG community. I often read in the forum, that it is
practically impossible to run OSG code inside the android emulator. Indeed,
both examples shipped with the OSG source are crashing.

However, the culprit is the wrong selection of the EGL configuration. This
is because we want to have a configuration with an 8 bit stencil buffer and
a 16 bit depth buffer (chosen from the constructor in
src/osg/AndroidExample/EGLview.java) which is not available in the
emulator. If we let EGL completely decide by its own, which configuration
works (by setting both values to zero), the code will run fine in the
emulator.

When setting the debug variable to true, EGLView prints out some infos
about the available configurations of the emulator. Interestingly, the
android emulator (and also the genymotion emulator) supports a
configuration with 24 bit depth buffer and 8bit stencil buffer. Thus at
least on my system using

init(true, 24, 8);

works also. I assume, that depends on the underlying OpenGL implementation
of the systems graphics driver.

Since, I am developing an android application based on OSG, I could
contribute a sample app with a more modern UI than the both GLES examples.
So if you guys are interested, I can share the code with you or make a new
example with the ICS-style UI (including actionbar and application drawer).

Cheers,
Martin
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to