Re: [osg-users] osgAndroid - Deploying and Debugging

2016-09-16 Thread Christian Kehl
Hi Akhtar,


> However, now when i try to load a model (cessna.osg) it shows error: dlopen 
> failed: library osgPlugins-3.4.0/osgdb_osg.so" not found. 
> DynamicLibrary::failed loading "osgPlugins-3.4.0/osgdb_osg.so"


The compile instructions state to compile it all in static mode - also the 
plugins. Can you please have a look if the files in your osgPlugins-3.4.0" 
folder are static libraries (extension ".a") ? That might be the problem when 
trying to load ".osg" files.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68626#68626





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-08-23 Thread Christian Kehl
Thanks for the explanation - never digged so much into the linker behaviour 
because usually libraries generate shared or static libraries consitently. This 
way into the Java sandbox and how to link dependency code for it was new to me. 
Still, in this case it was the only way I could make it work.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64871#64871





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-08-20 Thread Christian Kehl
Hi,

In the meanwhile, I was working further on the topic - and cracked it this 
time, I think. First and foremost, I use OpenSceneGraph 3.3.8 (still) and 
compile it for Android, while having the necessary 3rdParty-folder inside the 
OpenSceneGraph root folder (little suggestion: at some point this may be 
changed in the makefiles to search that folder by environment variable path, 
such as the data folder ...). I just define the GLES profile and the android 
platform and build it. Next:

A) For generating the PREBUILT_STATIC_LIBRARY, I took a sip from the OpenCV 
recipe that defines a local mk-file function that builds each 3rd Party 
dependency for the android package.

B) These local prebuilds are then referred to via 
LOCAL_WHOLE_STATIC_LIBRARIES, which is necessary so that the ndk-build linker 
finds all referred functions. That's the actual behaviour I kind'a expected in 
any case for a STATIC library (containing all content), bust as Jan pointed 
out: Android NDK - you'll never know what you get :D

This way, it works for me now, as I can load osg.Image() within Android using a 
jpeg image, in order to texture a geometry.

Manual and code submission are still on my agenda. The appended make file is 
afree-for-all to try out - just take the .txt extension away.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64855#64855



LOCAL_PATH := $(call my-dir)
 
OSG_SRC_FILES := \
JNIosgViewer.cpp \
JNIosg.cpp \
JNIosgDB.cpp \
JNIosgUtil.cpp \
JNIosgGA.cpp \
JNIUtils.cpp \
MultiViewNode.cpp \
GLES2ShaderGenVisitor.cpp

OSG_LDLIBS := \
-losgdb_osg \
-losgdb_ive \
-losgdb_rgb \
-losgdb_bmp \
-losgdb_tga \
-losgdb_stl \
-losgdb_obj \
-losgdb_dxf \
-losgdb_curl \
-losgdb_gif \
-losgdb_jpeg \
-losgdb_openflight \
-losgdb_serializers_osgvolume \
-losgdb_serializers_osgtext \
-losgdb_serializers_osgterrain \
-losgdb_serializers_osgsim \
-losgdb_serializers_osgshadow \
-losgdb_serializers_osgparticle \
-losgdb_serializers_osgmanipulator \
-losgdb_serializers_osgfx \
-losgdb_serializers_osganimation \
-losgdb_serializers_osgui \
-losgdb_serializers_osgviewer \
-losgdb_serializers_osgga \
-losgdb_serializers_osgutil \
-losgdb_serializers_osg \
-losgdb_deprecated_osgwidget \
-losgdb_deprecated_osgviewer \
-losgdb_deprecated_osgvolume \
-losgdb_deprecated_osgtext \
-losgdb_deprecated_osgterrain \
-losgdb_deprecated_osgsim \
-losgdb_deprecated_osgshadow \
-losgdb_deprecated_osgparticle \
-losgdb_deprecated_osgfx \
-losgdb_deprecated_osganimation \
-losgdb_deprecated_osg \
-losgPresentation \
-losgWidget \
-losgUI \
-losgViewer \
-losgVolume \
-losgTerrain \
-losgText \
-losgShadow \
-losgSim \
-losgParticle \
-losgManipulator \
-losgGA \
-losgFX \
-losgDB \
-losgAnimation \
-losgUtil \
-losg \
-lOpenThreads \
-ltiff \
-ljpeg \
-lgif \
-lpng \
-lcurl 

#-losgdb_serializers_osgpresentation \

### Static preparation
OSG_SDK:=/media/christian/DATA/android-osg-sdk/gles1/${APP_ABI}
OSG_3RDPARTY_LIBS_DIR:=${OSG_SDK}/obj/local/${APP_ABI}
#THRD_PARTY_SRC:=/media/christian/DATA/3rdparty
#THIRD_PARTY_HEADER_PATH:=
OSG_3RDPARTY_COMPONENTS:=jpeg gif png tiff zlib curl

define add_osg_3rdparty_component
include $(CLEAR_VARS)
LOCAL_MODULE:=$1
LOCAL_SRC_FILES:=$(OSG_3RDPARTY_LIBS_DIR)/lib$1.a
include $(PREBUILT_STATIC_LIBRARY)
endef

$(foreach module,$(OSG_3RDPARTY_COMPONENTS),$(eval $(call 
add_osg_3rdparty_component,$(module



### GLES1 build
include $(CLEAR_VARS)
OSG_SDK:=/media/christian/DATA/android-osg-sdk/gles1/${APP_ABI}
OSG_SDK_LIB_PATH:=$(OSG_SDK)/lib
OSG_SDK_PLUGIN_PATH:=$(OSG_SDK_LIB_PATH)/osgPlugins-3.3.8

ifneq (,$(wildcard $(OSG_SDK)/include/osg/Config))

APP_MODULES   := jniosg-gles1
LOCAL_CFLAGS  := -Werror -fno-short-enums -fPIC
LOCAL_CPPFLAGS:= -DOSG_LIBRARY_STATIC 
LOCAL_SRC_FILES   := $(OSG_SRC_FILES)
LOCAL_MODULE  := libjniosg-gles1
LOCAL_LDLIBS  := -llog -lGLESv1_CM -ldl -lm# -lz
LOCAL_WHOLE_STATIC_LIBRARIES+=$(OSG_3RDPARTY_COMPONENTS)
LOCAL_C_INCLUDES+=$(OSG_SDK)/include
TARGET_LDLIBS := $(OSG_LDLIBS)
LOCAL_LDFLAGS := -L$(OSG_SDK_LIB_PATH) -L$(OSG_SDK_PLUGIN_PATH) 
-L$(OSG_3RDPARTY_LIBS_DIR)
include $(BUILD_SHARED_LIBRARY)
else
$(warning Unable to find osg/Config file in the headers, not building 
libjniosg-gles1 module)
endif

### GLES2 build
include $(CLEAR_VARS)
OSG_SDK2:=/media/christian/DATA/android-osg-sdk/gles2/${APP_ABI}
OSG_SDK2_LIB_PATH:=$(OSG_SDK2)/lib
OSG_SDK2_PLUGIN_PATH:=$(OSG_SDK2_LIB_PATH)/osgPlugins-3.3.8
ifneq ( ,$(wildcard $(OSG_SDK2)/include/osg/Config))

APP_MODULES   := jniosg-gles2
LOCAL_CFLAGS  := -Werror -fno-short-enums -fPIC
LOCAL_CPPFLAGS:= -DOSG_LIBRARY_STATIC 
LOCAL_SRC_FILES   := $(OSG_SRC_FILES)
LOCAL_MODULE  := libjniosg-gles2
LOCAL_LDLIBS  := -llog -lGLESv2 -ldl -lm
LOCAL_WHOLE_STATIC_LIBRARIES+=$(OSG_3RDPARTY_COMPONENTS)
LOCAL_C_INCLUDES  := 

Re: [osg-users] Android osgPlugins

2015-08-11 Thread Christian Kehl
Today, I changed the strategy a bit: because the linker fails to reference the 
functions, the NDK says there is the option to include the whole static 
library, which I did by now (see Android.mk.txt file).

The new error does not find the base functions of the pre-compiled 3rd party 
libraries:

christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$
 ${ANDROID_NDK}/ndk-build
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgViewer.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosg.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgDB.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgUtil.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgGA.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIUtils.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = MultiViewNode.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = GLES2ShaderGenVisitor.cpp
[armeabi] SharedLibrary  : libjniosg-gles1.so
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/png.c:634: 
error: undefined reference to 'inflateReset'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/png.c:140: 
error: undefined reference to 'crc32'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/png.c:114: 
error: undefined reference to 'crc32'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwrite.c:991: 
error: undefined reference to 'deflateEnd'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwrite.c:866: 
error: undefined reference to 'deflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngrutil.c:223: 
error: undefined reference to 'inflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngrutil.c:247: 
error: undefined reference to 'inflateReset'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngrutil.c:3133: 
error: undefined reference to 'inflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngrutil.c:3162: 
error: undefined reference to 'inflateReset'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngread.c:1146: 
error: undefined reference to 'inflateEnd'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngread.c:615: 
error: undefined reference to 'inflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngread.c:167: 
error: undefined reference to 'inflateInit_'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwutil.c:258: 
error: undefined reference to 'deflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwutil.c:314: 
error: undefined reference to 'deflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwutil.c:314: 
error: undefined reference to 'deflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwutil.c:407: 
error: undefined reference to 'deflateReset'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwutil.c:1920: 
error: undefined reference to 'deflateReset'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngwutil.c:569: 
error: undefined reference to 'deflateInit2_'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngpread.c:870: 
error: undefined reference to 'inflate'
/home/jorizci/librerias/OSG_cmake_ndk/osg_rafa/3rdparty/libpng/pngpread.c:1459: 
error: undefined reference to 'inflateReset'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libjniosg-gles1.so] Error 1

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64723#64723





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-08-10 Thread Christian Kehl
As in my second post, I already tried that solution and still end up with the 
same problem, so in the case of our plugins, this either doesn't seem to work 
or I still have a mistake in the mk-file when building the local modules. 
(probably the second :-) )

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64710#64710





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-08-07 Thread Christian Kehl
Hi,

I re-open the earlier question because the momentary questions fits into it: as 
Rafa already mentions, until now the osgPlugins for jpeg, png, tiff, curl etc. 
are not included in the package. For just rendering a .osg file that includes 
such texture references, it is sufficient to put the 3rdparty .a-files in the 
lib folder of the osgandroid project.

ON THE OTHER HAND, if we want to actually access the stored image file as 
osg.Image within the source code, we need to include osgdb_jpeg as a plugin in 
the wrapper - which means generating osgdb_jpeg - which means including the 
3rdparty libraries.

I already started to commit myself to try exactly that, but I hit a wall: I put 
the 3rdparty android package folder in the 3.3.8 source folder osg 
OpenSceneGraph and run the cmake compilation with the following command:

cmake .. 
-DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake  \
 -DOPENGL_PROFILE=GLES1 -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF \
 -DANDROID_NATIVE_API_LEVEL=15 \
 -DANDROID_ABI=armeabi \
 
-DCMAKE_INSTALL_PREFIX=/media/christian/DATA/android-osg-sdk/gles1/armeabi \
 -DOSG_GL1_AVAILABLE=OFF \
 -DOSG_GL2_AVAILABLE=OFF \
 -DOSG_GL3_AVAILABLE=OFF \
 -DOSG_GLES1_AVAILABLE=ON \
 -DOSG_GLES2_AVAILABLE=OFF \
 -DOSG_GL_LIBRARY_STATIC=OFF \
 -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
 -DOSG_GL_MATRICES_AVAILABLE=ON \
 -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON \
 -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON \
 -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON \
 -DCURL_DIR=../3rdparty/curl \
 -DCURL_IS_STATIC=ON \
 -DGDAL_DIR=../3rdparty/gdal/include \
 -DGIFLIB_INCLUDE_DIR=../3rdparty/giflib \
 -DJPEG_INCLUDE_DIR=../3rdparty/libjpeg \
 -DPNG_INCLUDE_DIR=../3rdparty/libpng \
 -DTIFF_INCLUDE_DIR=../3rdparty/libtiff

[this is just the GLES1 profile example]

The cmake procedure find the folders and file, compiles all well, I get an 
osgdb_jpeg and osgdb_gif etc.

Now, the tricky bit: I include this in the Android.mk file osg osgAndroid

OSG_LDLIBS := \
-losgdb_osg \
-losgdb_ive \
-losgdb_rgb \
-losgdb_bmp \
-losgdb_tga \
-losgdb_stl \
-losgdb_obj \
-losgdb_dxf \
-losgdb_curl \
-losgdb_gif \
-losgdb_jpeg \
-losgdb_openflight \
-losgdb_serializers_osgvolume \
[...]

and set the LOCAL_STATIC_LIBRARIES

LOCAL_STATIC_LIBRARIES := -ljpeg -lgif -lpng -lcurl -ltiff

when I run ndk-build now, it does compile, but crashes at the following point:

[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgViewer.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosg.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgDB.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgUtil.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgGA.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIUtils.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = MultiViewNode.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = GLES2ShaderGenVisitor.cpp
[armeabi] Prebuilt   : libgnustl_shared.so = 
NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/thumb/
[armeabi] SharedLibrary  : libjniosg-gles1.so
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifOpen'
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifGetRecordType'
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifGetImageDesc'
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifGetLine'
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifGetLine'
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifGetExtension'
/media/christian/DATA/android-osg-sdk/gles1/armeabi/lib/osgPlugins-3.3.8/libosgdb_gif.a(ReaderWriterGIF.cpp.o):ReaderWriterGIF.cpp:function
 simage_gif_load(std::istream, int*, int*, int*, GifImageStream**): error: 
undefined reference to 'DGifGetExtensionNext'

Re: [osg-users] Android osgPlugins

2015-08-07 Thread Christian Kehl
to b) from myself:

I read through the android doc, and it suggests to include the libraries as 
prebuild, so I added lines like this (see Android.mk.txt for the full file):

OSG_SDK:=/media/christian/DATA/android-osg-sdk/gles1/${APP_ABI}
OSG_SDK_3RDPARTY_LIB_PATH:=${OSG_SDK}/obj/local/${APP_ABI}
THRD_PARTY_SRC:=/media/christian/DATA/3rdparty

include $(CLEAR_VARS)
LOCAL_MODULE:= jpeg
LOCAL_EXPORT_C_INCLUDES := $(THRD_PARTY_SRC)/libjpeg
LOCAL_EXPORT_CPP_INCLUDES := $(THRD_PARTY_SRC)/libjpeg
LOCAL_SRC_FILES := $(OSG_SDK_3RDPARTY_LIB_PATH)/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)

[... same for the other libs ...]

### GLES1 build
include $(CLEAR_VARS)
OSG_SDK:=/media/christian/DATA/android-osg-sdk/gles1/${APP_ABI}
OSG_SDK_LIB_PATH:=$(OSG_SDK)/lib
OSG_SDK_PLUGIN_PATH:=$(OSG_SDK_LIB_PATH)/osgPlugins-3.3.8

ifneq (,$(wildcard $(OSG_SDK)/include/osg/Config))

APP_MODULES   := jniosg-gles1
LOCAL_CFLAGS  := -Werror -fno-short-enums -fPIC
LOCAL_CPPFLAGS:= -DOSG_LIBRARY_STATIC 
LOCAL_SRC_FILES   := $(OSG_SRC_FILES)
LOCAL_MODULE  := libjniosg-gles1
LOCAL_LDLIBS  := -llog -lGLESv1_CM -ldl
LOCAL_STATIC_LIBRARIES := jpeg gif png curl tiff
LOCAL_C_INCLUDES  := $(OSG_SDK)/include
LOCAL_CPP_INCLUDES := $(OSG_SDK)/include
TARGET_LDLIBS := $(OSG_LDLIBS)
LOCAL_LDFLAGS := -L$(OSG_SDK_LIB_PATH) -L$(OSG_SDK_PLUGIN_PATH)
include $(BUILD_SHARED_LIBRARY)
else
$(warning Unable to find osg/Config file in the headers, not building 
libjniosg-gles1 module)
endif

[...]

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64665#64665



cmake .. 
-DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake  \
 -DOPENGL_PROFILE=GLES2 -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF \
 -DANDROID_NATIVE_API_LEVEL=15 \
 -DANDROID_ABI=armeabi \
 
-DCMAKE_INSTALL_PREFIX=/media/christian/DATA/android-osg-sdk/gles2/armeabi \
 -DOSG_GL1_AVAILABLE=OFF \
 -DOSG_GL2_AVAILABLE=OFF \
 -DOSG_GL3_AVAILABLE=OFF \
 -DOSG_GLES1_AVAILABLE=OFF \
 -DOSG_GLES2_AVAILABLE=ON \
 -DOSG_GL_LIBRARY_STATIC=OFF \
 -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
 -DOSG_GL_MATRICES_AVAILABLE=OFF \
 -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF \
 -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF \
 -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF \
 -DCURL_DIR=../3rdparty/curl \
 -DCURL_IS_STATIC=ON \
 -DGDAL_DIR=../3rdparty/gdal/include \
 -DGIFLIB_INCLUDE_DIR=../3rdparty/giflib \
 -DJPEG_INCLUDE_DIR=../3rdparty/libjpeg \
 -DPNG_INCLUDE_DIR=../3rdparty/libpng \
 -DTIFF_INCLUDE_DIR=../3rdparty/libtiff

cmake .. 
-DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake  \
 -DOPENGL_PROFILE=GLES2 -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF \
 -DANDROID_NATIVE_API_LEVEL=15 \
 -DANDROID_ABI=armeabi-v7a \
 
-DCMAKE_INSTALL_PREFIX=/media/christian/DATA/android-osg-sdk/gles2/armeabi-v7a \
 -DOSG_GL1_AVAILABLE=OFF \
 -DOSG_GL2_AVAILABLE=OFF \
 -DOSG_GL3_AVAILABLE=OFF \
 -DOSG_GLES1_AVAILABLE=OFF \
 -DOSG_GLES2_AVAILABLE=ON \
 -DOSG_GL_LIBRARY_STATIC=OFF \
 -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
 -DOSG_GL_MATRICES_AVAILABLE=OFF \
 -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF \
 -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF \
 -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF \
 -DCURL_DIR=../3rdparty/curl \
 -DCURL_IS_STATIC=ON \
 -DGDAL_DIR=../3rdparty/gdal/include \
 -DGIFLIB_INCLUDE_DIR=../3rdparty/giflib \
 -DJPEG_INCLUDE_DIR=../3rdparty/libjpeg \
 -DPNG_INCLUDE_DIR=../3rdparty/libpng \
 -DTIFF_INCLUDE_DIR=../3rdparty/libtiff
cmake .. 
-DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake  \
 -DOPENGL_PROFILE=GLES1 -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF \
 -DANDROID_NATIVE_API_LEVEL=15 \
 -DANDROID_ABI=armeabi \
 
-DCMAKE_INSTALL_PREFIX=/media/christian/DATA/android-osg-sdk/gles1/armeabi \
 -DOSG_GL1_AVAILABLE=OFF \
 -DOSG_GL2_AVAILABLE=OFF \
 -DOSG_GL3_AVAILABLE=OFF \
 -DOSG_GLES1_AVAILABLE=ON \
 -DOSG_GLES2_AVAILABLE=OFF \
 -DOSG_GL_LIBRARY_STATIC=OFF \
 -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
 -DOSG_GL_MATRICES_AVAILABLE=ON \
 -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON \
 -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON \
 -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON \
 -DCURL_DIR=../3rdparty/curl \
 -DCURL_IS_STATIC=ON \
 -DGDAL_DIR=../3rdparty/gdal/include \
 -DGIFLIB_INCLUDE_DIR=../3rdparty/giflib \
 -DJPEG_INCLUDE_DIR=../3rdparty/libjpeg \
 -DPNG_INCLUDE_DIR=../3rdparty/libpng \
 

Re: [osg-users] How to avoid Javas Garbage Collection to free large data array elements ?

2015-07-31 Thread Christian Kehl
A final remark on the question: I now implemented the memory-intensive method 
as a static native-JNI method in C++, having a static function call in Java 
left. First experiments with formerly crashing data indicate to really use C++ 
native methods for full-geometry modification processes (e.g. iterating over a 
Vec3Array VertexArray and modifying values). I will contact Rafa and Jan for 
integrating the wrapper+JNI source code in osgAndroid.

I am still a little bit speechless how the OpenCV guys are able managing large 
arrays and element-wise access without the Android SDK GC cutting their data 
off, but for now the JNI ways seems the only option.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64553#64553





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to avoid Javas Garbage Collection to free large data array elements ?

2015-07-30 Thread Christian Kehl
Hi Rafa,

Thanks for the feedback - I'll have a look into the osgjni part again. The 
extended wrappers work well until now, but the arrays (Vec2,3,4Array) I just 
wrapped via their object pointer in osgAndroid, as all other classes. So, I can 
add them to the upper-level geometry, but somwhere along the line the 
RefVec2,3,4 objects bound to the Java Vec2,3,4 classes get lost.

I'll post some update when I get further.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64538#64538





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to avoid Javas Garbage Collection to free large data array elements ?

2015-07-30 Thread Christian Kehl
Hi to everyone,

I currently extend the osgAndroid project (attempt) to do Texture Projection 
and Mapping with mobile images. I already extended the codebase so to get 
access to the geometry, Vector Arrays etc. of a loaded geometry. Now, the 
geometry loading function looks as follows:


Code:

private void _load_geometry()
{
  Node mesh_node = ReadFile.readNodeFile(pointcloud_path);
  mesh = new Group(mesh_node.getNativePtr());
  Geode mesh_geode = new Geode(mesh.getLastChild().getNativePtr());
  _drawable = new Geometry(mesh_geode.getLastDrawable().getNativePtr());
  vertex_array = _drawable.getVertexArray();
  Log.i(TEXTUREMAPPING, Vertex array loaded);
  geometry = new ArrayListPoint3();
  Log.i(TEXTUREMAPPING, Geometry allocated);
  for(int i = 0; i  vertex_array.size(); i++)
  {
geometry.add(new Point3(vertex_array.get(i).x(), vertex_array.get(i).y(), 
vertex_array.get(i).z()));
  }
  Log.i(TEXTUREMAPPING, Geometry set.);
  geometry_as_matrix = new MatOfPoint3f();
  Log.i(TEXTUREMAPPING, Number of 3D points:  + 
Integer.toString(geometry.size()));
}




geometry is here an ArrayList of OpenCV's Point3. As you can see, In the 
for-loop I touch every element in the Vec3Array. The Vec3Array itself is a 
wrapped version of the original C++ class, accessed with its object pointer, as 
seen in this JNI wrapper code:


Code:

JNIEXPORT jlong JNICALL 
Java_org_openscenegraph_osg_core_Vec3Array_nativeCreateVec3Array(JNIEnv *, 
jclass)
{
  osg::Vec3Array *a = new osg::Vec3Array();
  a-ref();
  return reinterpret_castjlong(a);
}




Now, the trouble: with a certain geometry (test:40k vertices), the test message 
of actually accessed elements [Number of 3D Points: geometry.size(), see 
above] prints ~11k vertices. In the java console logs (LogCat), I see that 
Java's GC cleared its memory two times during the upper function execution.

My question: How can I avoid it ? How can/should I do the per-Vertex operations 
? Has anybody encountered problems with Java's GC formerly, either in former 
Android wrappers or in old Java platform portations ?

The internet with several blogs and lectures tells me there is (especially with 
Android) no way to actually control the GC, or protect certain objects from 
not being freed. The only option mentioned is to code the things in JNI (C++), 
as the Garbage Collector obviously doesn't operate on the C++ code.

Opinions and suggestions are welcome.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64536#64536





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-06-05 Thread Christian Kehl
Hi,

So, I got to made it work. I re-compiled OSG with the ABI platform 15 in 
separate gles1 and gles2 folder, then made to linking in the Android.mk of 
osgAndroid. Then, I put the glider.osg from the OSG Datasets repository on the 
device, I removed my Backround adaptation (which seems to weirdly do foreground 
colour) and: abracadabra, the glider was rendered on my device, which is really 
cool. Thanks again for all the help. For reproducability, I think I'll write a 
small manual on the experience, which, when it is ready, I'd be willing to 
contribute to the community.

Thank you all again!

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63959#63959





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-06-01 Thread Christian Kehl
Hi,

I recompiled erverything, re-transmitted the models to the device, and modified 
the code to change the background colour (to make sure the rest of the code is 
working). Well, surprise surprise, the application runs and the background is 
changes. unfortunately, the models are still not shown. My logcat formost 
complains now about the apply(State) method not being supported. Any ideas 
how to circumvent the problem ? The LogCat log is appended.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63910#63910



06-01 21:41:50.956: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:50.957: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:50.957: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:50.973: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:50.974: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:50.974: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:50.990: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:50.990: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:50.991: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.006: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.007: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.007: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.023: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.024: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.025: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.040: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.040: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.040: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.057: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.057: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.057: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.073: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.074: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.074: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.090: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.091: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.091: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.107: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.107: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.107: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.123: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.124: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.124: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
06-01 21:41:51.140: I/org.openscenegraph.osg.viewer.JNIViewer(2996): Warning: 
TexGen::apply(State) - not supported.
06-01 21:41:51.141: I/org.openscenegraph.osg.viewer.JNIViewer(2996): 

Re: [osg-users] Android osgPlugins

2015-06-01 Thread Christian Kehl
Thanks for the encouragement!

The model I try to load there is the cow.osg from the OpenSceneGraph-Data 3.0.0 
repository. I also tried it with cessna and robot, but the results were the 
same ...  I try in on wednesday again to extract the sole geometry.

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63912#63912





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-27 Thread Christian Kehl
Hi Jan,

Your last post suggests we are talking about different repositories. What I did 
is compile osg 3.3.8 for Android using the cmake command line. Then, I use 
Rafa's osgAndroid from github. This package includes 4 projects: osgAndroid, 
osgjni, osgSimple and osgcamera. osgAndroid (at least for me) needs to be build 
with the NDK from the commandline (within Eclipse it doesn't work for me) using 
ndk-build. It shall compile a java library (.jar) using the static c++ 
libraries from osg 3.3.8. The osgSimple has osgAndroid as a dependency and 
shall hence include the jar in its apk.

Until there, it works for me. Thing is: the apk of osgSimple does not include 
the static osg 3.3.8 c++ libraries, which is why my logcat tells me on 
execution that it cannot find the libraries ...

What I hassle to achieve for now 2 months is just to get a working osg Android 
render application (preferably from source) that can load an osg/ive file and 
which I can modify for rendering, interaction and data modification ...

With respect to my environment, I have some shell scripts that initialize my 
environment (PATH- and LD_LIBRARY_PATH variable) so that any linking command 
takes the right libraries for a particular architecture (web, desktop, android, 
etc.). Only thing is that eclipse seems to gently ignore these paths when 
building the apk for osgSimple - or there is a problem with the make files in 
general. Fact stays: the osgSimple application does not include the static osg 
c++ libraries it needs in order to load files, create a render context or 
anything. The apk includes the osgAndroid jar file from the relative path 
written in the Android.mk file. That is why building the apk works fine, 
because the java functions can be referred. The jar-file of osgAndroid compiles 
and links to the static c++ libraries on the computer. For one reason or 
another, it does not package them, so the static c++ libraries are missing 
when the jar is transmitted to the phone ...

Hopefully that detailed explanation makes it more clear. I'm still unwilling to 
give up on it and go through the procedure step-by-step again.

Thank you!

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63842#63842





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-27 Thread Christian Kehl
I went through the build process again and have to correct: osgAndroid already 
comes with a jar-file. What the project and its ndk-build does is to generate a 
libjniosg-gles1.so file that links to the static c++ libraries. HENCE, my 
question would be now how the pre-compiled org.openscenegraph.android.jar 
refers/links to the libjniosg.so file, because I suspect this seems to be the 
step that goes wrong in my case. Any hints how that works ?

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63843#63843





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-27 Thread Christian Kehl
yep Rafa, these are exactly the steps I saw already just minutes ago, but I did 
not know that one can unpack the apk. I'll do taht and see if the files are 
actually also there for me - thanks for the hint! I stay tuned to see if it 
works :-)

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63845#63845





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-25 Thread Christian Kehl
Hi,

I still didn't get it to work. I spoke with an Android developer the recent 
days, told him the problem. His suggestion: move the requested library files in 
the libs-folder of your project, which is how the Android jni usually works. 
Said and done, I created a folder in osgSimple called libs and copied the 
OpenSceneGraph 3.3.8 library files (static libraries) into the libs folder. 
Unfortunately, I still get the same error, the app searches for the dynamic 
library (at least according to LogCat). Any further ideas ? I can still try a 
dynamic compile of OSG 3.3.8 and compile osgAndroid from there on again, but I 
don't know how promising that may be. Thing is: the osgAndroid compile itself 
is fine because the gray render window is created. It is just that the plugins 
are not found by the Android system ...

Thank you!

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63808#63808



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-25 Thread Christian Kehl
Hi Jan,

I join your thinking. The compilation is done using the cmake line from Rafa 
(see post  Sat May 02, 2015 7:48 am), and because it compiles OSG as static, I 
somehow doubt the compilation is wrong. That said, you may be right that the 
library is registered incorrectly. Thing is: I have multiple installs of OSG, 
as many of us do. One is the osg from the package manager, the other one is the 
android 3.3.8 OSG one, and then some more local ones. The funny point is that 
the Android.mk specifies all paths as absolute paths, so when one calls the 
ndk-build, it obviously takes the right libraries, as it always should. But 
when I run the osgSimple, I do this from Eclipse, which usually links the 
resources to the /usr/lib libraries. Because there are no compilation complains 
and because the osgAndroid project is statically referred to by osgSimple, it 
obviously takes that jar-file from its absolute destination. Question is: How 
do I tell the Android eclipse builder to link all inter-dep
 ending library files (osgPlugins-3.3.8) from a specific location and NOT to 
get them from the global /usr/lib location ? I am lacking the in-depth 
knowledge on how to configure the apk builder within Eclipse to change its 
behaviour. Any hint would be very much appreciated ...

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63812#63812





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-30 Thread Christian Kehl
Hi,

Thanks Rafa, I'm giving it a try! Could you also quickly tell me which osg 
version you use ? The 3.3.3 from svn, or a different one ?

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63577#63577





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-30 Thread Christian Kehl
Hi,
So, I needed to uncomment my submitted fix in GLDefines again, but with that, I 
actually made it through the compilation (yeaha).

Now, it generates the jar, I start osgSimple (I also created the osgAndroid 
folder on the phone and put the cessna in it) - buuut: the ap doesn't find the 
compiled library .a-files:

(eclipse report)
04-30 18:50:05.218: I/OpenSceneGraph-Android Library(11567): Successfully 
initialized
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
ShaderComposer::ShaderComposer() 0x70513830
04-30 18:50:05.226: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
ShaderComposer::ShaderComposer() 0x70513ba0
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
View::setSceneData() Reusing existing scene0x70526418
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): OSG 
Version:3.3.8
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
CullSettings::readEnvironmentalVariables()
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
ShaderComposer::ShaderComposer() 0x70513f60
04-30 18:50:05.227: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
ShaderComposer::ShaderComposer() 0x70529330
04-30 18:50:05.650: I/org.openscenegraph.osg.viewer.JNIViewer(11567): Warning: 
dynamic library 'osgPlugins-3.3.8/osgdb_osg.so' does not exist (or isn't 
readable):
04-30 18:50:05.650: I/org.openscenegraph.osg.viewer.JNIViewer(11567): dlopen 
failed: library osgPlugins-3.3.8/osgdb_osg.so not found
04-30 18:50:05.650: I/org.openscenegraph.osg.viewer.JNIViewer(11567): 
DynamicLibrary::failed loading osgPlugins-3.3.8/osgdb_osg.so
04-30 18:50:05.650: W/org.openscenegraph.osg.viewer.JNIViewer(11567): No data 
loaded
04-30 18:50:05.650: E/org.openscenegraph.osg.db.JNIosgDB(11567): Error loading 
scene
04-30 18:50:05.650: W/OSGActivity(11567): Attempt to invoke virtual method 
'long org.openscenegraph.osg.core.Node.getNativePtr()' on a null object 
reference
04-30 18:50:05.658: D/OpenGLRenderer(11567): Render dirty regions requested: 
true
04-30 18:50:05.660: D/Atlas(11567): Validating map...
04-30 18:50:05.709: D/NvOsDebugPrintf(11567): NvRmPrivGetChipPlatform: Could 
not read platform information 
04-30 18:50:05.709: D/NvOsDebugPrintf(11567): Expected on kernels without fuse 
support, using silicon
04-30 18:50:05.730: I/OpenGLRenderer(11567): Initialized EGL, version 1.4
04-30 18:50:05.781: D/OpenGLRenderer(11567): Enabling debug mode 0
04-30 18:50:05.930: V/RenderScript(11567): Application requested CPU execution
04-30 18:50:05.934: V/RenderScript(11567): 0x789cae00 Launching thread(s), CPUs 
4

where do I have to copy the osgPlugins-3.3.8 folder to so to make that all work 
?

I'm already quite happy it made it through the compilation - nice effort guys!

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63589#63589





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-29 Thread Christian Kehl
Hi,

So, what I tried now is to revert to the old OpenSceneGraph. I was looking up 
in the internet for the rand() error on the android platform, where people say 
cstdlib needs to be explicitly included in the header that uses the function. 
The stat64 error is an ample ifdef construct in 
OpenSceneGraph/src/osgDB/FileUtils.cpp. I tried to add there the following (osg 
svn version 3.3.3)


#if defined(GL_VERSION_ES_CM_1_0) || defined(GL_VERSION_ES_CM_1_1) || 
defined(GL_VERSION_ES_2_0) || defined(GL_VERSION_ES_1_1) || 
defined(GL_VERSION_ES_1_0)
// if we are on android,we need to obscure the 64-bit pointer (needs to 
be adapted for android =r10c
// due to 64 bit support)
#define stat64 stat
#endif

(line 93, after the switch for _DARWIN_FEATURE_64_BIT_INODE)

still, the work is unsuccessfull as I still get the same errors.

christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$
 ${ANDROID_NDK}/ndk-build
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgViewer.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosg.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgDB.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgUtil.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgGA.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIUtils.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = MultiViewNode.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = GLES2ShaderGenVisitor.cpp
[armeabi] SharedLibrary  : libjniosg-gles1.so
/home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function
 osgParticle::rangefloat::get_random() const: error: undefined reference to 
'rand'
/home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function
 osgParticle::RadialShooter::shoot(osgParticle::Particle*) const: error: 
undefined reference to 'rand'
/home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(RandomRateCounter.cpp.o):RandomRateCounter.cpp:function
 osgParticle::RandomRateCounter::numParticlesToCreate(double) const: error: 
undefined reference to 'rand'
/home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(SectorPlacer.cpp.o):SectorPlacer.cpp:function
 osgParticle::SectorPlacer::place(osgParticle::Particle*) const: error: 
undefined reference to 'rand'
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function
 osgDB::fileType(std::string const): error: undefined reference to 'stat64'
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function
 osgDB::makeDirectory(std::string const): error: undefined reference to 
'stat64'
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function
 osgDB::makeDirectory(std::string const): error: undefined reference to 
'stat64'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libjniosg-gles1.so] Error 1


Thank you!

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63567#63567





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-26 Thread Christian Kehl
Hi,

I had a closer look to the errors and the Android.mk file. 
osgdb_serializers_osgpresentation doesn't exist in my build (perhaps missing in 
general - it wasn't in the 3.0.2 Android.mk file either, so that's new things 
that is added and missing in the build).

leaving the following errors:
christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$
 ${ANDROID_NDK}/ndk-build
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgViewer.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosg.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgDB.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgUtil.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgGA.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIUtils.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = MultiViewNode.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = GLES2ShaderGenVisitor.cpp
[armeabi] SharedLibrary  : libjniosg-gles1.so
/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld:
 error: cannot find -lgnustl_static
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_ive.a(DataOutputStream.cpp.o):DataOutputStream.cpp:typeinfo
 for osg::Node const*: error: undefined reference to 'vtable for 
__cxxabiv1::__pointer_type_info'
/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld:
 the vtable symbol may be undefined because the class is missing its key 
function
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function
 osgParticle::rangefloat::get_random() const: error: undefined reference to 
'rand'
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function
 osgParticle::RadialShooter::shoot(osgParticle::Particle*) const: error: 
undefined reference to 'rand'
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(RandomRateCounter.cpp.o):RandomRateCounter.cpp:function
 osgParticle::RandomRateCounter::numParticlesToCreate(double) const: error: 
undefined reference to 'rand'
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(SectorPlacer.cpp.o):SectorPlacer.cpp:function
 osgParticle::SectorPlacer::place(osgParticle::Particle*) const: error: 
undefined reference to 'rand'
/home/christian/android-install/lib/libosgWidget.a(Input.cpp.o):Input.cpp:function
 osgWidget::Input::_calculateCursorOffsets(): error: undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android-install/lib/libosgWidget.a(Input.cpp.o):Input.cpp:function
 osgWidget::Input::_calculateCursorOffsets(): error: undefined reference to 
'std::__detail::_List_node_base::_M_unhook()'
/home/christian/android-install/lib/libosgWidget.a(Widget.cpp.o):Widget.cpp:function
 osgWidget::Widget::Widget(osgWidget::Widget const, osg::CopyOp const): 
error: undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android-install/lib/libosgWidget.a(Window.cpp.o):Window.cpp:function
 
osgWidget::Window::getParentList(std::listosg::observer_ptrosgWidget::Window,
 std::allocatorosg::observer_ptrosgWidget::Window  ) const: error: 
undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android-install/lib/libosgWidget.a(Window.cpp.o):Window.cpp:function
 
osgWidget::Window::getEmbeddedList(std::listosg::observer_ptrosgWidget::Window,
 std::allocatorosg::observer_ptrosgWidget::Window  ) const: error: 
undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function
 void std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  
::mergeSortEvents(std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  , SortEvents): error: undefined 
reference to 
'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function
 void std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  
::mergeSortEvents(std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  , SortEvents): error: undefined 
reference to 
'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function
 void std::listosg::ref_ptrosgGA::Event, 

Re: [osg-users] Android osgPlugins

2015-04-25 Thread Christian Kehl
I posted the changes on the osg-submissions mailing list. I still have the 
problem of building the JNI libraries using Eclipse. Rafael, perhaps you can 
give me a hint on how to do that, or extend the readme on the project a bit 
further so this last step is clear on howto-do ?

Thanks and Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63532#63532





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-25 Thread Christian Kehl
Hi,

Thank you for the clarification. I followed the example, which gave me this 
output:

christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$
 ${ANDROID_NDK}/ndk-build
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgViewer.cpp
jni/JNIosgViewer.cpp:23:28: fatal error: osg/observer_ptr: No such file or 
directory
 #include osg/observer_ptr
^
compilation terminated.
make: *** [obj/local/armeabi/objs/jniosg-gles1/JNIosgViewer.o] Error 1

I had a look into the Android.mk file, which gave me the following insights:
1) the makefile statically searches for the osg plugins of version 3.3.3 - I 
hardcoded now 3.3.7 (which is the version I am using). Perhaps that could be 
done with some environment variable or automatic parsing ? I would involve a 
bit cmake code, I guess ...
2) the error above may come because LOCAL_C_INCLUDES is set, but 
LOCAL_CPP_INCLUDES is not. Because OSG is C++ and because that distinction 
matters for me with g++ in teh backend, I set the path.

After this minor adaptations, the compilation with the ndk actually progresses, 
but has problems when starting to link the libraries:

christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$
 ${ANDROID_NDK}/ndk-build
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgViewer.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosg.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgDB.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgUtil.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIosgGA.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = JNIUtils.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = MultiViewNode.cpp
[armeabi] Compile++ thumb: jniosg-gles1 = GLES2ShaderGenVisitor.cpp
[armeabi] SharedLibrary  : libjniosg-gles1.so
/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld:
 error: cannot find -losgdb_serializers_osgpresentation
/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld:
 error: cannot find -lgnustl_static
/home/christian/android_install/lib/osgPlugins-3.3.7/libosgdb_ive.a(DataOutputStream.cpp.o):DataOutputStream.cpp:typeinfo
 for osg::Node const*: error: undefined reference to 'vtable for 
__cxxabiv1::__pointer_type_info'
/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld:
 the vtable symbol may be undefined because the class is missing its key 
function
/home/christian/android_install/lib/libosgWidget.a(Input.cpp.o):Input.cpp:function
 osgWidget::Input::_calculateCursorOffsets(): error: undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android_install/lib/libosgWidget.a(Input.cpp.o):Input.cpp:function
 osgWidget::Input::_calculateCursorOffsets(): error: undefined reference to 
'std::__detail::_List_node_base::_M_unhook()'
/home/christian/android_install/lib/libosgWidget.a(Widget.cpp.o):Widget.cpp:function
 osgWidget::Widget::Widget(osgWidget::Widget const, osg::CopyOp const): 
error: undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android_install/lib/libosgWidget.a(Window.cpp.o):Window.cpp:function
 
osgWidget::Window::getParentList(std::listosg::observer_ptrosgWidget::Window,
 std::allocatorosg::observer_ptrosgWidget::Window  ) const: error: 
undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android_install/lib/libosgWidget.a(Window.cpp.o):Window.cpp:function
 
osgWidget::Window::getEmbeddedList(std::listosg::observer_ptrosgWidget::Window,
 std::allocatorosg::observer_ptrosgWidget::Window  ) const: error: 
undefined reference to 
'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/home/christian/android_install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function
 void std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  
::mergeSortEvents(std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  , SortEvents): error: undefined 
reference to 
'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
/home/christian/android_install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function
 void std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  
::mergeSortEvents(std::listosg::ref_ptrosgGA::Event, 
std::allocatorosg::ref_ptrosgGA::Event  , SortEvents): error: undefined 
reference to 
'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'

Re: [osg-users] Android osgPlugins

2015-04-24 Thread Christian Kehl
Christian Kehl Christian.Kehl@... writes:

 
 Hi Jan,
 
 so, yeah, I added in line 35 of OpenSceneGraph/include/osg/GLDefines the line:
 
 typedef GLfloat GLdouble;
 
 Now GLES1 compiles. I get back to you with news after that is done.
 
 

So, compilation is done. Now, the readme of osgAndroid says:
... but the JNI part needs to be compiled using the Android NDK.
How should this be done ? If the old invocation of ndk-build via
the command line is deprecated, how else shall it be done ?

In OpenCV, one has the OpenCV manager to load a certain version, plus the
linked compilation of dependent sub-project - how is the building process in
Eclipse for the osgAndroid ?


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-24 Thread Christian Kehl
Jan Ciger jan.ciger@... writes:

 
 
 
 On Fri, Apr 24, 2015 at 12:09 AM, Christian Kehl Christian.Kehl at
uni.no wrote: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.
 
 
 
 Um, if you force the OSG build to be done using GLES2 I think the
osgAndroid code will not work correctly (different way of handling shaders).
That warning in the README is not there for fun. 
 
 The real question is why you are getting those compilation errors with
GLES1. I have checked my old NDK r8d and I don't have those declarations
(glDouble, the matrix functions using doubles) neither. That looks like an
error in the OSG headers, because those things are not supported in OpenGL
ES 1 so the code shouldn't be trying to compile them. Alternatively it
should typedef GLfloat to GLdouble.
 
 J.
 

Hi Jan,

so, yeah, I added in line 35 of OpenSceneGraph/include/osg/GLDefines the line:

typedef GLfloat GLdouble;

Now GLES1 compiles. I get back to you with news after that is done.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-23 Thread Christian Kehl
Christian Kehl Christian.Kehl@... 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_castconst 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_castconst 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_castconst 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_castconst 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_castconst 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_castconst 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

Re: [osg-users] Android osgPlugins

2015-04-23 Thread Christian Kehl
Rafa Gaitan rafa.gaitan@... writes:

 
 
 Hello Christian, 
 Just to clarify a little bit the things:
 
 - All the versions until 3.3.2 (I think that's the last one), should be
compiled using the old system (generating the Android.mk files through cmake)
 
 - Newer version must use the new Toolchain mechanism
 
 Both methods are explained
here: 
http://www.openscenegraph.org/index.php/documentation/platform-specifics/android
 
 
 Regarding the examples inside OSG, I don't know the current status, as far
as I know Jordi made them work but I usually use osgAndroid. FYI I changed
the repository of osgAndroid to github, seems that gitorious has been
absorbed by gitlab, so I moved it out. The new url
is: https://github.com/corsario/osgAndroid
 
 
 Regarding the thirdparty dependencies with the new Toolchain, you are
right, is something I forgot to add into cmake when I was cleaning it up for
building for Android. I'll try to do it once I had some time.
 
 On the other hand, you must build OSG either GLES1 or GLES2. If you build
it against GLES2 then you need to add your own shaders to see something on
screen, of course the example for GLES2 won't work if OSG was built with
GLES1 and the GLES1 example won't show anything if OSG was compiled with
GLES2, I apologize if this was already clarified :)
 
 Best regards,
 Rafa.
 
 
 



Then how do I use the toolchain file for compiling examples that are 
imported in Eclipse ? I don't fully understand the toolchain 
mechanism further than basically compiling the libraries 
(which went successfull so far).
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-22 Thread Christian Kehl
Christian Kehl Christian.Kehl@... writes:

 
 Jordi Torres jtorresfabra at ... writes:
 
  
  
  Hi Christian, 
  I just compiled OSG for Android and executed the example with the fresh
 build for GLES1 without major problems. 
  What version of OSG are you running? Does the example shipped with OSG
 works for you? Are you compiling using the toolchain?
  
   
  
  
  
  2015-04-20 10:58 GMT+02:00 Jordi Torres
 jtorresfabra@...:
  Hi Christian, Jan et al.
  Sorry for not being too active Anyway, did you try to compile all with
 the last additions from Rafa Gaitán? Now it is possible to compile OSG for
 Android with dynamic libraries, take a look

to 
http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4
 .
  Is a must for you to use static libs? You can try the dynamic version,
 maybe it solves your problems.
  
  Also we are using osgAndroid ( https://gitorious.org/osgandroid/pages/Home
 ) maybe it could be helpful. 
  
  I'm building now OSG for Android to do some testing. 
  
  I hope I can help a bit later. 
  
  
  
  
  Do the osgAndroid examples shipped with OSG work for you? If those don't
 work neither, then something has changed in OSG and broke it since mid-2013
 when I have last compiled the Android version (and when it was working). 
  
  J.
  
  
  
  
  
  
  
  
  
  ___
 
 Hi to everybody,
 
 it's comforting to see some activity going on. The last days, I was working
 on another project, so please excuse my late reply too.
 
 I am using OpenSceneGraph 3.0.1. The GLES1 and GLES2 example shipped with
 android are the ones that break (not load data). It's not a must-have for me
 to use static linking - if dynamic linking would work, it would be fine for
 me too. At the moment, I just like to see some model on my android 
 
 I will try out osgAndroid and the 3.0.4 build - let's hope it resolves the
 issue. Jordi - which version of the NDK are you using ? I have the r10 NDK
 installed. It may be good to know for tracking down the error.
 
 News are about to be reported soon. Best Regards,
 
 Christian
 
 ___
 osg-users mailing list
 osg-users at lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

So, I downloaded the 3.3.7 developer version of OpenSceneGraph and ran the 
cmake command as given in the link for Building OpenSceneGraph 3.3.2-3.4.x 
for Android (sth. like it).

After a bit of hassle, it compiled fine. 
I also put the 3rdParty folder inside the OSG root folder, but cmake reported 
that CURL, Jpeg, Tiff etc. are missing - well, weird, but not urgent for now.
I use the svn version rc2, and compile with OPENGL_PROFILE GLES2.

Then, I imported the GLES1/2 examples in Eclipse, modified the Android.mk so
to link to the installation folder (btw: still used static libs) and using
gnustl_static, ran ndk-build, and this is the output:

christian@PROMETHEUS:~/workspace/Android/osgViewerGLES1_337$
${ANDROID_NDK}/ndk-build
Android NDK: WARNING:jni/Android.mk:osgNativeLib: non-system libraries 
in linker flags:
-lgnustl_static -lcurl -ljpeg -lgif -lpng -ltiff -losgdb_dds
-losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg
-losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume
-losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain
-losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow
-losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx
-losgdb_deprecated_osganimation -losgdb_deprecated_osg
-losgdb_serializers_osgvolume -losgdb_serializers_osgtext
-losgdb_serializers_osgterrain -losgdb_serializers_osgsim
-losgdb_serializers_osgshadow -losgdb_serializers_osgparticle
-losgdb_serializers_osgmanipulator -losgdb_serializers_osgfx
-losgdb_serializers_osganimation -losgdb_serializers_osg -losgViewer
-losgVolume -losgTerrain -losgText -losgShadow -losgSim -losgParticle
-losgManipulator -losgGA -losgFX -losgDB -losgAnimation -losgUtil -losg
-lOpenThreads
Android NDK: This is likely to result in incorrect builds. Try using
LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library
dependencies of the
Android NDK: current module
Android NDK: WARNING:jni/Android.mk:osgNativeLib: non-system libraries in
linker flags: -lgnustl_static -lcurl -ljpeg -lgif -lpng -ltiff -losgdb_dds
-losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg
-losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume
-losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain
-losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow
-losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx
-losgdb_deprecated_osganimation -losgdb_deprecated_osg
-losgdb_serializers_osgvolume -losgdb_serializers_osgtext
-losgdb_serializers_osgterrain -losgdb_serializers_osgsim
-losgdb_serializers_osgshadow

Re: [osg-users] Android osgPlugins

2015-04-22 Thread Christian Kehl
Jordi Torres jtorresfabra@... writes:

 
 
 Hi Christian, 
 I just compiled OSG for Android and executed the example with the fresh
build for GLES1 without major problems. 
 What version of OSG are you running? Does the example shipped with OSG
works for you? Are you compiling using the toolchain?
 
  
 
 
 
 2015-04-20 10:58 GMT+02:00 Jordi Torres
jtorresfabra-re5jqeeqqe8avxtiumw...@public.gmane.org:
 Hi Christian, Jan et al.
 Sorry for not being too active Anyway, did you try to compile all with
the last additions from Rafa Gaitán? Now it is possible to compile OSG for
Android with dynamic libraries, take a look
to 
http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4
.
 Is a must for you to use static libs? You can try the dynamic version,
maybe it solves your problems.
 
 Also we are using osgAndroid ( https://gitorious.org/osgandroid/pages/Home
) maybe it could be helpful. 
 
 I'm building now OSG for Android to do some testing. 
 
 I hope I can help a bit later. 
 
 
 
 
 Do the osgAndroid examples shipped with OSG work for you? If those don't
work neither, then something has changed in OSG and broke it since mid-2013
when I have last compiled the Android version (and when it was working). 
 
 J.
 
 
 
 
 
 
 
 
 
 ___

Hi to everybody,

it's comforting to see some activity going on. The last days, I was working
on another project, so please excuse my late reply too.

I am using OpenSceneGraph 3.0.1. The GLES1 and GLES2 example shipped with
android are the ones that break (not load data). It's not a must-have for me
to use static linking - if dynamic linking would work, it would be fine for
me too. At the moment, I just like to see some model on my android :-)

I will try out osgAndroid and the 3.0.4 build - let's hope it resolves the
issue. Jordi - which version of the NDK are you using ? I have the r10 NDK
installed. It may be good to know for tracking down the error.

News are about to be reported soon. Best Regards,

Christian


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-20 Thread Christian Kehl
Jan Ciger jan.ciger@... writes:

 
 
 
 On Fri, Apr 17, 2015 at 1:26 PM, Christian Kehl Christian.Kehl at
uni.no wrote:
 checked - only .a files available. No shared objects/dynamic libraries
 build, all static.
 
 
 Then I am really at the end with ideas :( Perhaps Jordi will know what
could be going on there.
 
 J.
 


Hi,

is there still anybody available who has an idea what could be wrong in this
instance ? The problem continues to persist and I don't know enough about
the android wrapping system to fix the problem myself. The problem has to be
in the static libraries, but where ?

Kind Regards,

Christian




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-17 Thread Christian Kehl
Jan Ciger jan.ciger@... writes:

 
 
 
 On Thu, Apr 16, 2015 at 3:33 PM, Christian Kehl Christian.Kehl at
uni.no wrote:
 How do I make sure it uses the .a-files (static libraries) ? 
 
 Check whether you have any .so files generated for OSG. You shouldn't have
any, only .a libraries. 
 
 J.
 
 
 
 
 
 

checked - only .a files available. No shared objects/dynamic libraries
build, all static.




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-16 Thread Christian Kehl
Jan Ciger jan.ciger@... writes:

 
 
 
 Hello Christian,
 
 
 On Wed, Apr 15, 2015 at 4:15 PM, Christian Kehl
christian.kehl-fu+0ignv...@public.gmane.org wrote: 
 Hi,
 I had a look on the OsgMainApp.hpp, where these plugin links are all active
 (looks as follows):
 //Static plugins Macro
 USE_OSGPLUGIN(ive)
 USE_OSGPLUGIN(osg)
 USE_OSGPLUGIN(osg2) 
 
 
 
 USE_OSGPLUGIN(terrain)
 USE_OSGPLUGIN(rgb)
 USE_OSGPLUGIN(OpenFlight)
 USE_OSGPLUGIN(dds)
 //Static DOTOSG
 USE_DOTOSGWRAPPER_LIBRARY(osg)
 USE_DOTOSGWRAPPER_LIBRARY(osgFX)
 USE_DOTOSGWRAPPER_LIBRARY(osgParticle)
 USE_DOTOSGWRAPPER_LIBRARY(osgTerrain)
 USE_DOTOSGWRAPPER_LIBRARY(osgText)
 USE_DOTOSGWRAPPER_LIBRARY(osgViewer)
 USE_DOTOSGWRAPPER_LIBRARY(osgVolume)
 //Static serializer
 USE_SERIALIZER_WRAPPER_LIBRARY(osg)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgFX)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgText)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume)
 if one of them would go wrong, my JNI-compiler would mourn, I presume ?
 Hence, the links are active, still the models are not loaded.
 
 
 That looks sensible to me. 
 
  
 
 
 At the moment, I follow this approach:
 go on the commandline to my workdirectory,
 execute path-to-ndk/ndk-build, then go to eclipse,
 hit start and try out the app.
 May that be a cause for problems ?
 
 
 No not really. That is pretty much how it should be built.
 
 It would be best to turn on debugging and check where exactly it fails. It
could also be that you don't have osgDB compiled statically for some reason
- it was looking for its shared library. Does it load an .ive or .osg file?
Or no files at all?
 
 J.


It load's nothing at all, no matter the size. I tried out cessna.osg and
cow.osg from the sample set, an indoor .wrl-model I have (just one blank
wall, 100MB), a larger 3ds file - all run fine on the desktop but not a
single model loads on mobile. I try it currently out with the Nexus 5 and
the NVIDIA Shield tablet - same results at both.

How do I make sure it uses the .a-files (static libraries) ? I just used
the Android.mk that is shipped with the example, added -lgnustl..., as
written in all blogs to the topic, set the OSG_ANDROID_DIR to the location
of the local OSG_Android root install location (the folder with bin and
lib inside). As ndk-build reports, LOCAL_STATIC_LIBRARIES is not set in
the Android.mk, instead all libraries are referred in LOCAL_LDFLAGS.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-15 Thread Christian Kehl
Jan Ciger jan.ciger@... writes:

 
 
 
 On Mon, Apr 13, 2015 at 11:16 AM, Christian Kehl Christian.Kehl at
uni.no wrote:Hi Jordi,
 I encounter the same problem in the same situation. I've build OSG for
 Android in static mode (only way it even compiles), all static libraries
 (for me: .a-files) are in my local installation folder, together with the
 libraries for armeabi and armeabi-v7a from the Android Native Developer Kit.
 It compiles fine, I can change the background of the viewer without
 problems, but it just doesn't wanna load the models. I get the same logcat
 messages as mentioned before (not finding the plugins). I, up until now,
 loaded files from the internal HDD of the phone (I am on Nexus 5), but today
 also try out the sdcard as source. Are there any suggestions how to solve
 the problem ?
 
 
 
 
 Did you:
 
 a) Link the plugins into your JNI code? This is needed because the
libraries are static, thus it cannot load them dynamically at runtime. It is
a workaround for complicated deployment on Android. 
 
 b) Declared which plugins you are using? Again, this is linked to the
point above, because the plugin registration has to be done at compile time
when using static linking. Make sure that you have something like this in
your code (add/remove the plugins you need/don't need):
 //Static plugins
 MacroUSE_OSGPLUGIN(ive)
 USE_OSGPLUGIN(osg)
 USE_OSGPLUGIN(osg2)
 USE_OSGPLUGIN(freetype)
 //USE_OSGPLUGIN(terrain)
 USE_OSGPLUGIN(rgb)//
 USE_OSGPLUGIN(OpenFlight)
 //USE_OSGPLUGIN(dds)
 //Static
 DOTOSGUSE_DOTOSGWRAPPER_LIBRARY(osg)
 //USE_DOTOSGWRAPPER_LIBRARY(osgFX)
 //USE_DOTOSGWRAPPER_LIBRARY(osgParticle)
 //USE_DOTOSGWRAPPER_LIBRARY(osgTerrain)
 USE_DOTOSGWRAPPER_LIBRARY(osgText)
 USE_DOTOSGWRAPPER_LIBRARY(osgAnimation)
 //USE_DOTOSGWRAPPER_LIBRARY(osgViewer)
 //USE_DOTOSGWRAPPER_LIBRARY(osgVolume)
 //Static serializer
 USE_SERIALIZER_WRAPPER_LIBRARY(osg)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation)
 //USE_SERIALIZER_WRAPPER_LIBRARY(osgFX)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator)
 //USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle)
 //USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain)
 USE_SERIALIZER_WRAPPER_LIBRARY(osgText)
 //USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume)
 
 Without this sort of declaration and the corresponding linking statement
it will not work when built as a fully static library. 
 
 J.


Hi,

I had a look on the OsgMainApp.hpp, where these plugin links are all active
(looks as follows):

//Static plugins Macro
USE_OSGPLUGIN(ive)
USE_OSGPLUGIN(osg)
USE_OSGPLUGIN(osg2)
USE_OSGPLUGIN(terrain)
USE_OSGPLUGIN(rgb)
USE_OSGPLUGIN(OpenFlight)
USE_OSGPLUGIN(dds)
//Static DOTOSG
USE_DOTOSGWRAPPER_LIBRARY(osg)
USE_DOTOSGWRAPPER_LIBRARY(osgFX)
USE_DOTOSGWRAPPER_LIBRARY(osgParticle)
USE_DOTOSGWRAPPER_LIBRARY(osgTerrain)
USE_DOTOSGWRAPPER_LIBRARY(osgText)
USE_DOTOSGWRAPPER_LIBRARY(osgViewer)
USE_DOTOSGWRAPPER_LIBRARY(osgVolume)
//Static serializer
USE_SERIALIZER_WRAPPER_LIBRARY(osg)
USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation)
USE_SERIALIZER_WRAPPER_LIBRARY(osgFX)
USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator)
USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle)
USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain)
USE_SERIALIZER_WRAPPER_LIBRARY(osgText)
USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume)

if one of them would go wrong, my JNI-compiler would mourn, I presume ?
Hence, the links are active, still the models are not loaded.

At the moment, I follow this approach:
go on the commandline to my workdirectory, 
execute path-to-ndk/ndk-build, then go to eclipse, 
hit start and try out the app. 
May that be a cause for problems ?

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-15 Thread Christian Kehl
Jan Ciger jan.ciger@... writes:

 
 
 
 On Mon, Apr 13, 2015 at 11:16 AM, Christian Kehl Christian.Kehl at
uni.no wrote:Hi Jordi,
 I encounter the same problem in the same situation. I've build OSG for
 Android in static mode (only way it even compiles), all static libraries
 (for me: .a-files) are in my local installation folder, together with the
 libraries for armeabi and armeabi-v7a from the Android Native Developer Kit.
 It compiles fine, I can change the background of the viewer without
 problems, but it just doesn't wanna load the models. I get the same logcat
 messages as mentioned before (not finding the plugins). I, up until now,
 loaded files from the internal HDD of the phone (I am on Nexus 5), but today
 also try out the sdcard as source. Are there any suggestions how to solve
 the problem ?
 
 
 
 
 Did you:
 
 a) Link the plugins into your JNI code? This is needed because the
libraries are static, thus it cannot load them dynamically at runtime. It is
a workaround for complicated deployment on Android. 
 

 
 Without this sort of declaration and the corresponding linking statement
it will not work when built as a fully static library. 
 
 J.

I also append the output of the ndk-build, in case this may give some
indication what goes wrong there ...

christian@PROMETHEUS:~/workspace/Android/osgViewer2$ ${ANDROID_NDK}/ndk-build
Android NDK: WARNING:jni/Android.mk:osgNativeLib: non-system libraries in
linker flags: -lgnustl_static -lcurl -ljpeg -lgif -lpng -ltiff -losgdb_dds
-losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg
-losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume
-losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain
-losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow
-losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx
-losgdb_deprecated_osganimation -losgdb_deprecated_osg
-losgdb_serializers_osgvolume -losgdb_serializers_osgtext
-losgdb_serializers_osgterrain -losgdb_serializers_osgsim
-losgdb_serializers_osgshadow -losgdb_serializers_osgparticle
-losgdb_serializers_osgmanipulator -losgdb_serializers_osgfx
-losgdb_serializers_osganimation -losgdb_serializers_osg -losgViewer
-losgVolume -losgTerrain -losgText -losgShadow -losgSim -losgParticle
-losgManipulator -losgGA -losgFX -losgDB -losgAnimation -losgUtil -losg
-lOpenThreads
Android NDK: This is likely to result in incorrect builds. Try using
LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library
dependencies of the
Android NDK: current module
Android NDK: WARNING:jni/Android.mk:osgNativeLib: non-system libraries in
linker flags: -lgnustl_static -lcurl -ljpeg -lgif -lpng -ltiff -losgdb_dds
-losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg
-losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume
-losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain
-losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow
-losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx
-losgdb_deprecated_osganimation -losgdb_deprecated_osg
-losgdb_serializers_osgvolume -losgdb_serializers_osgtext
-losgdb_serializers_osgterrain -losgdb_serializers_osgsim
-losgdb_serializers_osgshadow -losgdb_serializers_osgparticle
-losgdb_serializers_osgmanipulator -losgdb_serializers_osgfx
-losgdb_serializers_osganimation -losgdb_serializers_osg -losgViewer
-losgVolume -losgTerrain -losgText -losgShadow -losgSim -losgParticle
-losgManipulator -losgGA -losgFX -losgDB -losgAnimation -losgUtil -losg
-lOpenThreads
Android NDK: This is likely to result in incorrect builds. Try using
LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library
dependencies of the
Android NDK: current module
[armeabi] Compile++ thumb: osgNativeLib = osgNativeLib.cpp
[armeabi] Compile++ thumb: osgNativeLib = OsgMainApp.cpp
[armeabi] Compile++ thumb: osgNativeLib = OsgAndroidNotifyHandler.cpp
[armeabi] SharedLibrary  : libosgNativeLib.so
[armeabi] Install: libosgNativeLib.so = libs/armeabi/libosgNativeLib.so
[armeabi-v7a] Compile++ thumb: osgNativeLib = osgNativeLib.cpp
[armeabi-v7a] Compile++ thumb: osgNativeLib = OsgMainApp.cpp
[armeabi-v7a] Compile++ thumb: osgNativeLib = OsgAndroidNotifyHandler.cpp
[armeabi-v7a] SharedLibrary  : libosgNativeLib.so
[armeabi-v7a] Install: libosgNativeLib.so =
libs/armeabi-v7a/libosgNativeLib.so




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-04-13 Thread Christian Kehl
Hi Jordi,

I encounter the same problem in the same situation. I've build OSG for
Android in static mode (only way it even compiles), all static libraries
(for me: .a-files) are in my local installation folder, together with the
libraries for armeabi and armeabi-v7a from the Android Native Developer Kit.
It compiles fine, I can change the background of the viewer without
problems, but it just doesn't wanna load the models. I get the same logcat
messages as mentioned before (not finding the plugins). I, up until now,
loaded files from the internal HDD of the phone (I am on Nexus 5), but today
also try out the sdcard as source. Are there any suggestions how to solve
the problem ?

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org