[osg-users] Android osgPlugins
Christian Kehl
Christian.Kehl at uni.no
Thu Apr 23 15:09:38 PDT 2015
Christian Kehl <Christian.Kehl at ...> writes:
>
> Rafa Gaitan <rafa.gaitan <at> ...> writes:
>
Hi Hi,
so, I downloaded osgAndroid, imported the projects into my Eclipse. I
like this more elegant way of jni-wrapping - comes close to what I've
seen in OpenCV when compiling it for mobile.
Then, I needed to rebuild the OpenSceneGraph 3.3.7, because
osgAndroid's README.md says "only working with GLES 1.1 builds".
okay, said - executed. I get the following errors already common
to me when building OSG GLES 1.1:
Linking CXX static library ../../../lib/libOpenThreads.a
[ 0%] Built target OpenThreads
[ 0%] Building CXX object src/osg/CMakeFiles/osg.dir/AlphaFunc.cpp.o
In file included from
/media/christian/DATA/OpenSceneGraph337/include/osg/GLDefines:25:0,
from
/media/christian/DATA/OpenSceneGraph337/include/osg/GLExtensions:18,
from
/media/christian/DATA/OpenSceneGraph337/include/osg/Shader:25,
from
/media/christian/DATA/OpenSceneGraph337/include/osg/StateAttribute:20,
from
/media/christian/DATA/OpenSceneGraph337/include/osg/AlphaFunc:17,
from
/media/christian/DATA/OpenSceneGraph337/src/osg/AlphaFunc.cpp:14:
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL: In function
'void glLoadMatrix(const float*)':
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:130:96: error:
'glLoadMatrixf' was not declared in this scope
inline void glLoadMatrix(const float* mat) {
glLoadMatrixf(static_cast<const GLfloat*>(mat)); }
^
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL: In function
'void glMultMatrix(const float*)':
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:131:96: error:
'glMultMatrixf' was not declared in this scope
inline void glMultMatrix(const float* mat) {
glMultMatrixf(static_cast<const GLfloat*>(mat)); }
^
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL: In function
'void glLoadMatrix(const double*)':
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:149:87: error:
ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
inline void glLoadMatrix(const double* mat) {
glLoadMatrixd(static_cast<const GLdouble*>(mat)); }
^
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:149:87: error:
expected '>' before 'GLdouble'
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:149:87: error:
expected '(' before 'GLdouble'
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:149:87: error:
'GLdouble' was not declared in this scope
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:149:96: error:
expected primary-expression before '>' token
inline void glLoadMatrix(const double* mat) {
glLoadMatrixd(static_cast<const GLdouble*>(mat)); }
^
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL: In function
'void glMultMatrix(const double*)':
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:150:87: error:
ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
inline void glMultMatrix(const double* mat) {
glMultMatrixd(static_cast<const GLdouble*>(mat)); }
^
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:150:87: error:
expected '>' before 'GLdouble'
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:150:87: error:
expected '(' before 'GLdouble'
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:150:87: error:
'GLdouble' was not declared in this scope
/media/christian/DATA/OpenSceneGraph337/build/include/osg/GL:150:96: error:
expected primary-expression before '>' token
inline void glMultMatrix(const double* mat) {
glMultMatrixd(static_cast<const GLdouble*>(mat)); }
^
/media/christian/DATA/OpenSceneGraph337/src/osg/AlphaFunc.cpp: In member
function 'virtual void osg::AlphaFunc::apply(osg::State&) const':
/media/christian/DATA/OpenSceneGraph337/src/osg/AlphaFunc.cpp:33:56: error:
'glAlphaFunc' was not declared in this scope
glAlphaFunc((GLenum)_comparisonFunc,_referenceValue);
^
src/osg/CMakeFiles/osg.dir/build.make:57: recipe for target
'src/osg/CMakeFiles/osg.dir/AlphaFunc.cpp.o' failed
make[2]: *** [src/osg/CMakeFiles/osg.dir/AlphaFunc.cpp.o] Error 1
CMakeFiles/Makefile2:249: recipe for target 'src/osg/CMakeFiles/osg.dir/all'
failed
make[1]: *** [src/osg/CMakeFiles/osg.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
just switching the -DOPENGL_PROFILE flag to GLES2 did have no effect
on the error. So, I added the old flags to enforce GLES2 built.
successfully.
Then, I setup the paths of osgjni and android, as said in the
readme, started osgsimple (don't know - do I have to compile osgjni
and android ?!), and it broke ... any further suggestions ? Any idea
where the GLES1 error still may originate from ?
More information about the osg-users
mailing list