[osg-users] OSG on Android with NDK 12 and clang++
Hello, as Android NDK dropped the support of the GNU++ compiler with version 11/12 in favour of clang++ I looked into building OSG for Android with NDK 12. But the build script states that it only supports NDK till version 10c. Will there be support of NDK version 12 any time soon? Or does it matter at all? Also do you know a good tutorial on how to build OSG using clang++ and the "-stdlib=libc++”? Thanks Thorsten___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG for android cube texture problem
Hello everyone:I got a cube texture problem in my program base on ES2.0. The texture is black, does anyone know what is the problem.Here is my shader code: *Vertex shader * varying vec3 Normal; varying vec3 EyeDir; uniform samplerCube cubeMap; void main() { gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex; Normal = gl_NormalMatrix * gl_Normal; EyeDir = vec3(gl_ModelViewMatrix * gl_Vertex); } *Fragment shader * varying vec3 Normal; varying vec3 EyeDir; uniform samplerCube cubeMap; void main(void) { vec3 reflectedDirection = normalize(reflect(EyeDir, normalize(Normal))); reflectedDirection.y = -reflectedDirection.y; vec4 fragColor = textureCube(cubeMap, reflectedDirection); gl_FragColor = fragColor; } Here is my osg code: void CSkyBox::setSkyBoxRadius(osg::Vec3 centre, double r) { m_centre=centre; m_r=r; } osg::TextureCubeMap* CSkyBox::readCubeMap(osg::Image* imagePosX, osg::Image* imageNegX, osg::Image* imagePosY, osg::Image* imageNegY, osg::Image* imagePosZ, osg::Image* imageNegZ) { osg::TextureCubeMap* cubemap = NULL; if (imagePosX imageNegX imagePosY imageNegY imagePosZ imageNegZ) { cubemap = new osg::TextureCubeMap; cubemap-setImage(osg::TextureCubeMap::POSITIVE_X, imagePosX); cubemap-setImage(osg::TextureCubeMap::NEGATIVE_X, imageNegX); cubemap-setImage(osg::TextureCubeMap::POSITIVE_Y, imagePosY); cubemap-setImage(osg::TextureCubeMap::NEGATIVE_Y, imageNegY); cubemap-setImage(osg::TextureCubeMap::POSITIVE_Z, imagePosZ); cubemap-setImage(osg::TextureCubeMap::NEGATIVE_Z, imageNegZ); cubemap-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); cubemap-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); cubemap-setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_EDGE); cubemap-setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR); cubemap-setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR); } return cubemap; } osg::TextureCubeMap* CSkyBox::readCubeMap() { std::string path=getImagesPath(); osg::Image* imagePosX = osgDB::readImageFile(path+\\posx.jpg); osg::Image* imageNegX = osgDB::readImageFile(path+\\negx.jpg); osg::Image* imagePosY = osgDB::readImageFile(path+\\posy.jpg); osg::Image* imageNegY = osgDB::readImageFile(path+\\negy.jpg); osg::Image* imagePosZ = osgDB::readImageFile(path+\\posz.jpg); osg::Image* imageNegZ = osgDB::readImageFile(path+\\negz.jpg); return readCubeMap(imagePosX, imageNegX, imagePosY, imageNegY, imagePosZ, imageNegZ); } struct TexMatCallback : public osg::NodeCallback { public: TexMatCallback(osg::TexMat tm) : _texMat(tm) { } virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osgUtil::CullVisitor* cv = dynamic_castosgUtil::CullVisitor*(nv); if (cv) { const osg::Matrix MV = *(cv-getModelViewMatrix()); const osg::Matrix R = osg::Matrix::rotate( osg::DegreesToRadians(112.0f), 0.0f,0.0f,1.0f)* osg::Matrix::rotate( osg::DegreesToRadians(90.0f), 1.0f,0.0f,0.0f); osg::Quat q = MV.getRotate(); const osg::Matrix C = osg::Matrix::rotate( q.inverse() ); _texMat.setMatrix( C*R ); } traverse(node,nv); } osg::TexMat _texMat; }; class MoveEarthySkyWithEyePointTransform : public osg::Transform { public: /** Get the transformation matrix which moves from local coords to world coords.*/ virtual bool computeLocalToWorldMatrix(osg::Matrix matrix,osg::NodeVisitor* nv) const { osgUtil::CullVisitor* cv = dynamic_castosgUtil::CullVisitor*(nv); if (cv) { osg::Vec3 eyePointLocal = cv-getEyeLocal(); matrix.preMult(osg::Matrix::translate(eyePointLocal)); } return true; } /** Get the transformation matrix which moves from world coords to local coords.*/ virtual bool computeWorldToLocalMatrix(osg::Matrix matrix,osg::NodeVisitor* nv) const { osgUtil::CullVisitor* cv = dynamic_castosgUtil::CullVisitor*(nv); if (cv) { osg::Vec3 eyePointLocal = cv-getEyeLocal(); matrix.postMult(osg::Matrix::translate(-eyePointLocal)); } return true; } }; osg::Node* CSkyBox::createSkyBoxWithTextureCubeMap(osg::TextureCubeMap* skymap) { osg::StateSet* stateset = new osg::StateSet(); osg::TexMat *tm = new osg::TexMat; stateset-setTextureAttribute(0, tm); if (skymap) { stateset-setDataVariance(osg::Object::DYNAMIC); osg::ref_ptrosg::Program skyProgram = new osg::Program; osg::Shader* vertex_shader = new osg::Shader(osg::Shader::VERTEX,skybox_vert); skyProgram-addShader(vertex_shader); osg::Shader* fragment_shader = new osg::Shader(osg::Shader::FRAGMENT,skybox_frag); skyProgram-addShader(fragment_shader); stateset-addUniform(new osg::Uniform(uEnvironmentMap,0)); stateset-setAttributeAndModes(skyProgram); stateset-setTextureAttribute(0,skymap); } //stateset-setTextureAttributeAndModes(0, skymap, osg::StateAttribute::ON); stateset-setMode( GL_LIGHTING, osg::StateAttribute::OFF ); stateset-setMode( GL_CULL_FACE, osg::StateAttribute::OFF ); // clear the depth to the far plane. osg::Depth* depth = new osg::Depth; depth-setFunction(osg::Depth::ALWAYS); depth-setRange(1.0,1.0);
Re: [osg-users] OSG and Android
On Fri, Jan 11, 2013 at 1:28 AM, Jason Daly jd...@ist.ucf.edu wrote: Actually, we've got shared library loading working already. A lot of our software is plugin-based (using dlopen), and it's working fine on Android. There is a bit of JNI involved, but only enough to hook into the regular Android GUI/View stuff. Ah, that's good news then. Would you mind to publish any changes you needed to do to it? I would love to switch to shared lib too, because with the static linking the recompiles are taking ages every time. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and Android
On 01/11/2013 04:48 AM, Jan Ciger wrote: On Fri, Jan 11, 2013 at 1:28 AM, Jason Daly jd...@ist.ucf.edu mailto:jd...@ist.ucf.edu wrote: Actually, we've got shared library loading working already. A lot of our software is plugin-based (using dlopen), and it's working fine on Android. There is a bit of JNI involved, but only enough to hook into the regular Android GUI/View stuff. Ah, that's good news then. Would you mind to publish any changes you needed to do to it? I would love to switch to shared lib too, because with the static linking the recompiles are taking ages every time. I will if I can. I doubt I'll be able to, though. I'm frantically trying to finish this up before I switch jobs next week, and I've got a few other things on the plate, too. My outside work time is pretty full too, with moving and stuff. I'm currently doing things like writing the Android.mk file manually for our specific build tree, which is fine for the guys here, but probably wouldn't do for OSG in general. If nothing else, I could give you what I end up with and you (or someone else) could massage it into a nice, CMake-friendly form if you like. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and Android
Hi, all, I had a question about compiling OSG on Android. I understand that the current advice is to build static libraries instead of shared. I was just wondering why this was the case. Is there some reason that the OSG can't be built with shared libraries instead? The main reason I'm asking is that I'd prefer to avoid having to specify the plugins in the code, and use the normal dynamic loading mechanism, if possible. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and Android
Because the shared linker at execution time in Android works as hell on a bench. It just doesn't call the dependencies of a library... and also your shared libraries are not installed on the system... etc The system is just not friendly to use shared libraries. Can OSG be used as a shared library... if you modify it yourself yes. There are some crashes here and there but it's functional. But then you'll have to face all the other worryes of installing the shared libraries... where... for each application and create an ordered library opener. OpenCV had to create another program just to deploy it's own shared libraries. P.S. Oh and I was forgetting that the shared linker on Android when a library has failed to load then it won't try load that library even if you want to force him until he's forgotten the library (mainly when you kill your process) GoodLuck 2013/1/10 Jason Daly jd...@ist.ucf.edu I had a question about compiling OSG on Android. I understand that the current advice is to build static libraries instead of shared. I was just wondering why this was the case. Is there some reason that the OSG can't be built with shared libraries instead? The main reason I'm asking is that I'd prefer to avoid having to specify the plugins in the code, and use the normal dynamic loading mechanism, if possible. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and Android
On 01/10/2013 05:16 PM, Jorge Izquierdo Ciges wrote: Because the shared linker at execution time in Android works as hell on a bench. It just doesn't call the dependencies of a library... and also your shared libraries are not installed on the system... etc The system is just not friendly to use shared libraries. Can OSG be used as a shared library... if you modify it yourself yes. There are some crashes here and there but it's functional. But then you'll have to face all the other worryes of installing the shared libraries... where... for each application and create an ordered library opener. OpenCV had to create another program just to deploy it's own shared libraries. P.S. Oh and I was forgetting that the shared linker on Android when a library has failed to load then it won't try load that library even if you want to force him until he's forgotten the library (mainly when you kill your process) OK, if that's all it is, I'm going to give it a shot. After fighting a bit with the platform, we've had some luck with getting other libraries working as shared libraries, so I think we'll be OK here. It's compiling now and seems to be reasonably happy. Of course, as you pointed out, compiling and linking is the easy part :-) --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and Android
On 01/10/2013 11:49 PM, Jason Daly wrote: OK, if that's all it is, I'm going to give it a shot. After fighting a bit with the platform, we've had some luck with getting other libraries working as shared libraries, so I think we'll be OK here. It's compiling now and seems to be reasonably happy. Of course, as you pointed out, compiling and linking is the easy part :-) I think you will have most problems with actually using plugins (unless you keep them linked in statically). I don't think that there is a documented interface how to load shared libs at runtime from C/C++ on Android, you have to load the shared libs from within Java code. If you compile all of OSG into one large shared lib and try to load that at runtime instead of static linking, that should be possible without too much hassle - e.g. Qualcomm's Vuforia/QCAR is doing it, OpenCV is doing it, etc. Just make sure to set the lib up as prebuilt, so that it gets actually included in your APK and deployed on the device properly. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and Android
On 01/10/2013 06:32 PM, Jan Ciger wrote: On 01/10/2013 11:49 PM, Jason Daly wrote: OK, if that's all it is, I'm going to give it a shot. After fighting a bit with the platform, we've had some luck with getting other libraries working as shared libraries, so I think we'll be OK here. It's compiling now and seems to be reasonably happy. Of course, as you pointed out, compiling and linking is the easy part :-) I think you will have most problems with actually using plugins (unless you keep them linked in statically). I don't think that there is a documented interface how to load shared libs at runtime from C/C++ on Android, you have to load the shared libs from within Java code. If you compile all of OSG into one large shared lib and try to load that at runtime instead of static linking, that should be possible without too much hassle - e.g. Qualcomm's Vuforia/QCAR is doing it, OpenCV is doing it, etc. Just make sure to set the lib up as prebuilt, so that it gets actually included in your APK and deployed on the device properly. Actually, we've got shared library loading working already. A lot of our software is plugin-based (using dlopen), and it's working fine on Android. There is a bit of JNI involved, but only enough to hook into the regular Android GUI/View stuff. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG for Android with Necessitas?
Hi, i have recompiled OSG 3.0.1 for Android wint Ubuntu 11, and now i'm trying to compiled the osgviewerQT example under Windows, using Necessitas (QT Android porting). I have some problems with EGL initializations. I get eglMakeCurrent:674 error 3002 (EGL_BAD_ACCESS). Someone has been using Necessitas with OSG? Some tricks and tips? Thank you! Cheers, Massimo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47779#47779 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Jorge, So, that means that I am doing thing in the correct order. After some more test I found out the problem: it's something in Cygwin. If I use relative paths instead of absolute ones everything works fine. No idea why and I don't want to investigate further, but at least now I know it's a cygwin-specific thing... Thanks! Luca -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42106#42106 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Jorge Izquierdo Ciges wrote: ... About the other things probably is just that you didn't do a make install to create a directory with all the includes etc Hi, I also have some issues with the example, basically the same as Riccardo. I did run the make install on my OSG build and it went OK (everything was installed under /usr/local/). But running the build command on that Android.mk still does not find the header files, unless I explicitly add an entry to the LOCAL_C_INCLUDES to add the standard osg/include tree. No idea why it works for you and not for us... A question: did you create your Android build in a separate folder (in my case under the OSG root) or did you do in source. mixing the new stuff with what comes out of SVN? Now on to the next issue: linker... I get this error: Code: ld.exe: cannot find -losgdb_dds Of course that lib as well as all the others are present in my build tree (and I indicated it correctly in the Android.mk file). Any idea what could cause these issue? Last but not least, is everybody using the ndk-build command to compile the example? Or is there another solution maybe going through CMake? I'd like to make sure that I do the things I'm supposed to... Thanks, Luca -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42101#42101 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
I usually install it in a separate directory because there's no point in installing it into system. It would be trouble with the standard linux installation on your system. I usually build it out of the OSG svn directory, i don't like mix svn and not svn things. And, of course last time I tested everything (about two weeks) all was running in thrunk. About linking, one again that's just an error of not finding the librarie. In that case is the dds plugin. It should not be any trouble if you set the path on the Android.mk (osgAndroidExampleGLES*/jni) Line:7 OSG_ANDROID_DIR := type your install directory here Which SETS both LOCAL_L_INCLUDES and LOCAL_LDFLAGS variables according to the the Target Architecture. And no, there are no other ways supplied. There are other ways to compile with NDK but require scripting and bypassing the usual ndk build. 2011/8/17 Luca Vezzadini luca.vezzad...@gmail.com Jorge Izquierdo Ciges wrote: ... About the other things probably is just that you didn't do a make install to create a directory with all the includes etc Hi, I also have some issues with the example, basically the same as Riccardo. I did run the make install on my OSG build and it went OK (everything was installed under /usr/local/). But running the build command on that Android.mk still does not find the header files, unless I explicitly add an entry to the LOCAL_C_INCLUDES to add the standard osg/include tree. No idea why it works for you and not for us... A question: did you create your Android build in a separate folder (in my case under the OSG root) or did you do in source. mixing the new stuff with what comes out of SVN? Now on to the next issue: linker... I get this error: Code: ld.exe: cannot find -losgdb_dds Of course that lib as well as all the others are present in my build tree (and I indicated it correctly in the Android.mk file). Any idea what could cause these issue? Last but not least, is everybody using the ndk-build command to compile the example? Or is there another solution maybe going through CMake? I'd like to make sure that I do the things I'm supposed to... Thanks, Luca -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42101#42101 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Riccardo, I have used the ndk-build command and (after long time J ) it has finished apparently without errors. The I have copied the files to the osgViewer project (under the obj folder). After that, I have tried to compile using ndk-build, and I got this error: Compile++ thumb : osgNativeLib = osgNativeLib.cpp /bin/sh: -Itype: No such file or directory make: *** [/cygdrive/c/Projects/Eclipse/osgViewer/obj/local/armeabi/objs/osgNativeLib/ osgNativeLib.o] Error 1 Of course, there is no such file in that folder. I neither have been able to find that file in the OSG folder. So, maybe compilation has not worked correctly? Cheers Héctor From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Riccardo Corsi Sent: viernes, 12 de agosto de 2011 15:49 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android Hi Hector, maybe you can try to use the ndk-build command instead of make, and see if it runs smooth. If so, probably there's something wrong with the makefile generated by CMake... Regarding the osg Android example, the folder structure is the same as the one of the NDK examples. Build instructions for native projects are very clear on the ndk online documentation, especially if you use Eclipse. You basically need to build the native part of the example before (under the jni folder) the same way you compiled the native osg libs, and afterwards build the java files under src. They make use of the native lib, and both the java code and the native library will be packed in the apk by Eclipse (or the compiler you're using). HTH, Ricky 2011/8/12 Héctor Martínez hector.marti...@sensetrix.com Hi and thank you. I first tried with the Cmake GUI, but I got some errors. After that, I have read your answer pointing to command line. I have used the cmake command line (not without some problems J ): cmake - OK make - Error: make[3]: *** [/cygdrive/c/Projects/OpensSceneGraph-3.0.1/OpenSceneGraph/obj/local/armeabi -v7a/objs/osgdb_serializers_osg/BlendEquation..o] Error 126 make[3]: *** Waiting for unfinished jobs . make[2]: *** [Android-OpenSceneGraph] Error 2 make[1]: *** [CMakeFiles/ndk.dir/all] Error 2 make: *** [all] Error 2 After that, I have tried to use make install and it has finished without error, but I think this is a weird behavior. Anyway, does somebody now how to solve the problem? And another question, after compiling (if I can make it J ), what files (and where) will I need to include in the OSG Android example? Thank you. Cheers, Héctor From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mourad Boufarguine Sent: jueves, 11 de agosto de 2011 16:50 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android On Thu, Aug 11, 2011 at 1:09 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Hector, 2011/8/11 Héctor Martínez hector.marti...@sensetrix.com Thank you Mourad and Jorge. I have never used CygWin and I am trying to follow those instructions: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/C ygwin http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cy gwin Those are for building OSG with cygwin to be used on a PC. But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? 1/ install Cygwin ^^ , make sure to install gcc , g++, make, ... (a full install may be helpful). Please note that, although we won't be compiling osg with cygwin's g++ , it needs to be installed in order for cmake to get over compiler checks at the beginning of configuration. (and other packages may be also needed) 2/ in cmake gui, set the sources and binairies folders, hit configure and choose Unix Makefiles as generator 3/ Check OSG_BUILD_PLATFORM_ANDROID and hit configure 4/ Set (if not set) ANDROID_NDK path 5/ Configure your build whether you want GLES1 or GLES2 following these instructions : http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES 6/ Configure and Generate 7/ open Cygwin batch, cd to binaires dir, and make Héctor Cheers, Mourad After re trying and checking, i found out that it is preferable to use the command line cmake in cygwin rather than cmake gui : cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=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 -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF Mourad
Re: [osg-users] OSG for Android
Hi and thank you. I first tried with the Cmake GUI, but I got some errors. After that, I have read your answer pointing to command line. I have used the cmake command line (not without some problems J ): cmake - OK make - Error: make[3]: *** [/cygdrive/c/Projects/OpensSceneGraph-3.0.1/OpenSceneGraph/obj/local/armeabi -v7a/objs/osgdb_serializers_osg/BlendEquation..o] Error 126 make[3]: *** Waiting for unfinished jobs . make[2]: *** [Android-OpenSceneGraph] Error 2 make[1]: *** [CMakeFiles/ndk.dir/all] Error 2 make: *** [all] Error 2 After that, I have tried to use make install and it has finished without error, but I think this is a weird behavior. Anyway, does somebody now how to solve the problem? And another question, after compiling (if I can make it J ), what files (and where) will I need to include in the OSG Android example? Thank you. Cheers, Héctor From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mourad Boufarguine Sent: jueves, 11 de agosto de 2011 16:50 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android On Thu, Aug 11, 2011 at 1:09 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Hector, 2011/8/11 Héctor Martínez hector.marti...@sensetrix.com Thank you Mourad and Jorge. I have never used CygWin and I am trying to follow those instructions: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/C ygwin http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cy gwin Those are for building OSG with cygwin to be used on a PC. But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? 1/ install Cygwin ^^ , make sure to install gcc , g++, make, ... (a full install may be helpful). Please note that, although we won't be compiling osg with cygwin's g++ , it needs to be installed in order for cmake to get over compiler checks at the beginning of configuration. (and other packages may be also needed) 2/ in cmake gui, set the sources and binairies folders, hit configure and choose Unix Makefiles as generator 3/ Check OSG_BUILD_PLATFORM_ANDROID and hit configure 4/ Set (if not set) ANDROID_NDK path 5/ Configure your build whether you want GLES1 or GLES2 following these instructions : http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES 6/ Configure and Generate 7/ open Cygwin batch, cd to binaires dir, and make Héctor Cheers, Mourad After re trying and checking, i found out that it is preferable to use the command line cmake in cygwin rather than cmake gui : cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=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 -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Hector, maybe you can try to use the ndk-build command instead of make, and see if it runs smooth. If so, probably there's something wrong with the makefile generated by CMake... Regarding the osg Android example, the folder structure is the same as the one of the NDK examples. Build instructions for native projects are very clear on the ndk online documentation, especially if you use Eclipse. You basically need to build the native part of the example before (under the jni folder) the same way you compiled the native osg libs, and afterwards build the java files under src. They make use of the native lib, and both the java code and the native library will be packed in the apk by Eclipse (or the compiler you're using). HTH, Ricky 2011/8/12 Héctor Martínez hector.marti...@sensetrix.com Hi and thank you. ** ** I first tried with the Cmake GUI, but I got some errors. After that, I have read your answer pointing to command line. I have used the cmake command line (not without some problems J ): cmake - OK make - Error: make[3]: *** [/cygdrive/c/Projects/OpensSceneGraph-3.0.1/OpenSceneGraph/obj/local/armeabi-v7a/objs/osgdb_serializers_osg/BlendEquation..o] Error 126 make[3]: *** Waiting for unfinished jobs…. make[2]: *** [Android-OpenSceneGraph] Error 2 make[1]: *** [CMakeFiles/ndk.dir/all] Error 2 make: *** [all] Error 2 After that, I have tried to use “make install” and it has finished without error, but I think this is a weird behavior. ** ** Anyway, does somebody now how to solve the problem? ** ** And another question, after compiling (if I can make it J ), what files (and where) will I need to include in the OSG Android example? ** ** Thank you. ** ** Cheers, ** ** Héctor ** ** *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Mourad Boufarguine *Sent:* jueves, 11 de agosto de 2011 16:50 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OSG for Android ** ** ** ** On Thu, Aug 11, 2011 at 1:09 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Hector, ** ** 2011/8/11 Héctor Martínez hector.marti...@sensetrix.com Thank you Mourad and Jorge. I have never used CygWin and I am trying to follow those instructions: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cygwin ** ** Those are for building OSG with cygwin to be used on a PC. But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? ** ** ** ** 1/ install Cygwin ^^ , make sure to install gcc , g++, make, ... (a full install may be helpful). ** ** Please note that, although we won't be compiling osg with cygwin's g++ , it needs to be installed in order for cmake to get over compiler checks at the beginning of configuration. (and other packages may be also needed) ** ** 2/ in cmake gui, set the sources and binairies folders, hit configure and choose Unix Makefiles as generator ** ** 3/ Check OSG_BUILD_PLATFORM_ANDROID and hit configure 4/ Set (if not set) ANDROID_NDK path ** ** 5/ Configure your build whether you want GLES1 or GLES2 following these instructions : http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES ** ** 6/ Configure and Generate ** ** 7/ open Cygwin batch, cd to binaires dir, and make ** ** Héctor ** ** Cheers, Mourad ** ** ** ** After re trying and checking, i found out that it is preferable to use the command line cmake in cygwin rather than cmake gui : ** ** ** ** ** ** cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=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 -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF Mourad ** ** ** ** ** ** ** ** ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Thank you Mourad and Jorge. I have never used CygWin and I am trying to follow those instructions: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/C ygwin http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cy gwin But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? Héctor From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jorge Izquierdo Ciges Sent: miércoles, 10 de agosto de 2011 19:31 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android YAOUCH! I missed that! xD you are damn right. 2011/8/10 Mourad Boufarguine mourad.boufargu...@gmail.com Hi Hector, 2011/8/10 Héctor Martínez hector.marti...@sensetrix.com Thank you for the response. I am having some problems with the MINGW/MSYS make. Here is the problem: You have to use Cygwin not MinGW/MSYS on windows to develop with android ndk. Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG for Android on Mac
Hi, I am trying to build OSG for Android on Mac 10.6.7. I already get Eclipse, Android Plugin and CDT Plugin and also Android NDK. I configure the project with CMake and generate an Eclipse CDT4 project. After that, I create a new Android Project with Create project from existing source and add the generated Eclipse CDT4 project. Now, when I try to build this project, I get following error: Conversion to Dalvik format failed with error 1 Dx no classfiles specified Are my steps to compile OSG for Android false? Cheers, Büsra -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41997#41997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Hector, 2011/8/11 Héctor Martínez hector.marti...@sensetrix.com Thank you Mourad and Jorge. ** ** I have never used CygWin and I am trying to follow those instructions: ** ** http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cygwin Those are for building OSG with cygwin to be used on a PC. ** ** But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? ** 1/ install Cygwin ^^ , make sure to install gcc , g++, make, ... (a full install may be helpful). Please note that, although we won't be compiling osg with cygwin's g++ , it needs to be installed in order for cmake to get over compiler checks at the beginning of configuration. (and other packages may be also needed) 2/ in cmake gui, set the sources and binairies folders, hit configure and choose Unix Makefiles as generator 3/ Check OSG_BUILD_PLATFORM_ANDROID and hit configure 4/ Set (if not set) ANDROID_NDK path 5/ Configure your build whether you want GLES1 or GLES2 following these instructions : http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES 6/ Configure and Generate 7/ open Cygwin batch, cd to binaires dir, and make ** Héctor ** ** Cheers, Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Mourad and all, I've succesfully built osg_3.0.1 on Windows with Cygwin (without 3rd party plugins for now). I'm now trying to build the osgAndroidExampleGLES1, and everything compiles, but the linker (ld) throws an error says that it cannot find the dds lib, here it is: $ ../../../../../Android/android-ndk-r6/ndk-build NDK_APPLICATION_MK=Application.mk Compile++ thumb : osgNativeLib = osgNativeLib.cpp Compile++ thumb : osgNativeLib = OsgMainApp.cpp Compile++ thumb : osgNativeLib = OsgAndroidNotifyHandler.cpp SharedLibrary : libosgNativeLib.so D:/SourceCode/Android/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../ lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot find -losgd b_dds collect2: ld returned 1 exit status make: *** [/cygdrive/d/SourceCode/OSG/osg_3.0.1/examples/osgAndroidExampleGLES1/obj/local/armeabi/libosgNativeLib.so] Error 1 I'm checking the options of the Android.mk file and it looks like there's a variable LIBDIR to specify the library path which is then used here: [...] LOCAL_LDFLAGS := -L $(LIBDIR) \ -losgdb_dds \ [...] I've already tried to set it to relative and absolute paths, I've also tried to copy the compiled libraries in the local example folder, but cannot get it finding the libraries! Have you got any other suggestion? Thank you, Ricky On Thu, Aug 11, 2011 at 13:09, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Hector, 2011/8/11 Héctor Martínez hector.marti...@sensetrix.com Thank you Mourad and Jorge. ** ** I have never used CygWin and I am trying to follow those instructions:*** * ** ** http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cygwin Those are for building OSG with cygwin to be used on a PC. ** ** But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? ** 1/ install Cygwin ^^ , make sure to install gcc , g++, make, ... (a full install may be helpful). Please note that, although we won't be compiling osg with cygwin's g++ , it needs to be installed in order for cmake to get over compiler checks at the beginning of configuration. (and other packages may be also needed) 2/ in cmake gui, set the sources and binairies folders, hit configure and choose Unix Makefiles as generator 3/ Check OSG_BUILD_PLATFORM_ANDROID and hit configure 4/ Set (if not set) ANDROID_NDK path 5/ Configure your build whether you want GLES1 or GLES2 following these instructions : http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES 6/ Configure and Generate 7/ open Cygwin batch, cd to binaires dir, and make ** Héctor ** ** Cheers, Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
On Thu, Aug 11, 2011 at 1:09 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Hector, 2011/8/11 Héctor Martínez hector.marti...@sensetrix.com Thank you Mourad and Jorge. ** ** I have never used CygWin and I am trying to follow those instructions:*** * ** ** http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Cygwin Those are for building OSG with cygwin to be used on a PC. ** ** But it is a bit messy for me. Mourad, it seems like you have successfully compiled OSG for Android in Windows. Could you please give me a quick guide or some tips? ** 1/ install Cygwin ^^ , make sure to install gcc , g++, make, ... (a full install may be helpful). Please note that, although we won't be compiling osg with cygwin's g++ , it needs to be installed in order for cmake to get over compiler checks at the beginning of configuration. (and other packages may be also needed) 2/ in cmake gui, set the sources and binairies folders, hit configure and choose Unix Makefiles as generator 3/ Check OSG_BUILD_PLATFORM_ANDROID and hit configure 4/ Set (if not set) ANDROID_NDK path 5/ Configure your build whether you want GLES1 or GLES2 following these instructions : http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES 6/ Configure and Generate 7/ open Cygwin batch, cd to binaires dir, and make ** Héctor ** ** Cheers, Mourad After re trying and checking, i found out that it is preferable to use the command line cmake in cygwin rather than cmake gui : cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=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 -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android on Mac
Hi Busra, I'm not familiar with Mac dev environment, but I guess that you're trying to build osg with Eclipse CDT with the regular gcc compiler, which is targetting pc architecture. Instead you need to create a makefile suited for the ndk-build. The CMake options you need are fully detailed in the wiki page and in other threads of this mailing list. Good luck, Ricky 2011/8/11 Büsra Gülten busragul...@hotmail.de Hi, I am trying to build OSG for Android on Mac 10.6.7. I already get Eclipse, Android Plugin and CDT Plugin and also Android NDK. I configure the project with CMake and generate an Eclipse CDT4 project. After that, I create a new Android Project with Create project from existing source and add the generated Eclipse CDT4 project. Now, when I try to build this project, I get following error: Conversion to Dalvik format failed with error 1 Dx no classfiles specified Are my steps to compile OSG for Android false? Cheers, Büsra -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41997#41997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Riccardo, On Thu, Aug 11, 2011 at 1:59 PM, Riccardo Corsi riccardo.co...@kairos3d.itwrote: Hi Mourad and all, I've succesfully built osg_3.0.1 on Windows with Cygwin (without 3rd party plugins for now). I'm now trying to build the osgAndroidExampleGLES1, and everything compiles, but the linker (ld) throws an error says that it cannot find the dds lib, here it is: $ ../../../../../Android/android-ndk-r6/ndk-build NDK_APPLICATION_MK=Application.mk Compile++ thumb : osgNativeLib = osgNativeLib.cpp Compile++ thumb : osgNativeLib = OsgMainApp.cpp Compile++ thumb : osgNativeLib = OsgAndroidNotifyHandler.cpp SharedLibrary : libosgNativeLib.so D:/SourceCode/Android/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../ lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot find -losgd b_dds collect2: ld returned 1 exit status make: *** [/cygdrive/d/SourceCode/OSG/osg_3.0.1/examples/osgAndroidExampleGLES1/obj/local/armeabi/libosgNativeLib.so] Error 1 I'm checking the options of the Android.mk file and it looks like there's a variable LIBDIR to specify the library path which is then used here: [...] LOCAL_LDFLAGS := -L $(LIBDIR) \ -losgdb_dds \ [...] I've already tried to set it to relative and absolute paths, I've also tried to copy the compiled libraries in the local example folder, but cannot get it finding the libraries! Have you got any other suggestion? What did you put in OSG_ANDROID_DIR ? I just tried with my binaries folder path and it worked. Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Mmmm look the Android make file inside the GLES example and change type your directory here into your path to OSG 2011/8/11 Mourad Boufarguine mourad.boufargu...@gmail.com ed with my binaries folder path and it worked. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi guys, it works!! I had to tweak something and then I've run some tests, let me share some points with you: - Builing I have made a floder called ndk-build inside the osg folder tree to place all the nkd builind stuff. If I set the OSG_ANDROID_DIR to that folder, the compiler doesn't file the osg includes, so I had to add the osg include folder to the LOCAL_C_INCLUDES. By doing that everything compile and link. What I don't get is why it wasn't working before, when I had edited directly the variables LOCAL_C_INCLUDES and LIBDIR by setting them to full paths - any hints on this point?? - Running I've been trying only the GLES1 example, and it works just fine on my Nexus S (android 2.3.4) Instead I've tried to build the example also for the 3.x platform target: it build and upload on my tablet, but it just shows up for a couple of seconds and then it dies. I have no time to investigate right now, I'll run some more tests tomorrow. Have you got any idea what it might be depending on? My device is an Acer Iconia Tab A500. Thank you for your support and great job! Ricky On Thu, Aug 11, 2011 at 17:05, Jorge Izquierdo Ciges jori...@gmail.comwrote: Mmmm look the Android make file inside the GLES example and change type your directory here into your path to OSG 2011/8/11 Mourad Boufarguine mourad.boufargu...@gmail.com ed with my binaries folder path and it worked. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
I don't have very much idea what can happen with 3.X it would be needed to see in detail the Logcat to find what's happening. 2.3 and 3.X have the same base in common so it shouldn't be anything big. About the other things probably is just that you didn't do a make install to create a directory with all the includes etc. 2011/8/11 Riccardo Corsi riccardo.co...@kairos3d.it dk-build inside the osg folder tree to place all the nkd builind stuff. If I set the OSG_ANDROID_DIR to that folder, the compiler doesn't file the osg includes, so I had to add the osg include folder to the LOCAL_C_INCLUDES. By doing that everything compile and link. What I don't get is why it wasn't working before, when I had edited directly the variables LOCAL_C_INCLUDES and LIBDIR by setting them to full paths - any hints on this point?? - Running I've been trying only the GLES1 example, and it works just fine on my Nexus S (android 2.3.4) Instead I've tried to build the example also for the 3.x platform target: it build and upload on my tablet, but it just shows up for a couple of seconds and then it dies. I have no time to investigate right now, I'll run some more tests tomorrow. Have you got any idea what it might be depending on? My device is an Acer Iconia Tab A500. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Thank you for the response. I am having some problems with the MINGW/MSYS make. Here is the problem: Android NDK: Trying to define local module OpenThreads in C:/Projects/OpenSceneGraph-3.0.1/OpenSceneGraph/build32_Android/src/OpenThre ads/pthreads/Android.mk. Android NDK: But this module was already defined by C:/Projects/OpenSceneGraph-3.0.1/OpenSceneGraph/build32_Android/src/OpenThre ads/pthreads/Android.mk. /C/Projects/android-ndk-r5b/build/core/build-moduloe.mk:34: *** Android NDK: Aborting. . Stop. make[2]: *** [Android-OpenSceneGraph] Error 2 make[1]: *** [CMakeFiles/ndk.dir/all] Error 2 Any ideas? It seems like it is loading some file twice or something like that. From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jorge Izquierdo Ciges Sent: lunes, 08 de agosto de 2011 17:14 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android There's no trouble in that. Android binaries are platform independant (they are from Android) and I suppose following the google instructions shouldn't give much trouble to anyone. I didn't like MinGW so I sticked with Linux. - Thank you for the dependencies. But, how am I supposed to use them? I mean, which is the structure for cmake to recognize them? -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Rafa Gaitan Sent: martes, 09 de agosto de 2011 9:10 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android Hi Hector, ThirdParty package for android is deployed here: http://www2.ai2.upv.es/difusion/osgAndroid/3rdpartyAndroid.zip http://www2.ai2.upv.es/difusion/osgAndroid/3rdpartyAndroid.zip Cheers, Héctor ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Hector, 2011/8/10 Héctor Martínez hector.marti...@sensetrix.com Thank you for the response. I am having some problems with the MINGW/MSYS make. Here is the problem: You have to use Cygwin not MinGW/MSYS on windows to develop with android ndk. Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
YAOUCH! I missed that! xD you are damn right. 2011/8/10 Mourad Boufarguine mourad.boufargu...@gmail.com Hi Hector, 2011/8/10 Héctor Martínez hector.marti...@sensetrix.com Thank you for the response. I am having some problems with the MINGW/MSYS make. Here is the problem: You have to use Cygwin not MinGW/MSYS on windows to develop with android ndk. Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Hector, ThirdParty package for android is deployed here: http://www2.ai2.upv.es/difusion/osgAndroid/3rdpartyAndroid.zip I'm sure other developers reported that they were able to build in windows using mingw or cygwin but we usually work on linux or mac (making our life easier! :)). Cheers, Rafa. 2011/8/8 Jorge Izquierdo Ciges jori...@gmail.com: There's no trouble in that. Android binaries are platform independant (they are from Android) and I suppose following the google instructions shouldn't give much trouble to anyone. I didn't like MinGW so I sticked with Linux. I'll try to find the 3rd party package link and submit it when I can... but right now I'm on vacation so i can't reach physically where it is. El 8 de agosto de 2011 14:36, Héctor Martínez hector.marti...@sensetrix.com escribió: . But, will I be able to use the compiled library in an Eclipse+Windows environment for the Android development? Regarding to the plugins, I thought that there were the same as the ones inside the 3rdparty folder of OSG. Do you think I will be able to get those you mention? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es http://gvsig3d.blogspot.com Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Try cleaning Cmake configure of the osg directory first. And don't use a graphical Cmake bad shit happens sometimes. In wiki there is a comand line cmake example. El 8 de agosto de 2011 07:55, Héctor Martínez hector.marti...@sensetrix.com escribió: and clicking the Configure button, a huge amount of similar errors appear. I have tried with An ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
Hi Jorge, thank you for your response! You were right, it works with command line. But now I have new problems: - It doesn´t find some plugins (jpg, png etc). - When trying to build the solution I get this error: 2InitializeBuildStatus: 2 Touching Win32\Debug\ndk\ndk.unsuccessfulbuild. 2CustomBuild: 2 The system cannot find the path specified. 2 Generating Android-OpenSceneGraph 2C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: cmd.exe exited with code 3. 2 2Build FAILED Any ideas about whats wrong? Thank you. Cheers, Héctor From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jorge Izquierdo Ciges Sent: lunes, 08 de agosto de 2011 10:42 To: OpenSceneGraph Users Subject: Re: [osg-users] OSG for Android Try cleaning Cmake configure of the osg directory first. And don't use a graphical Cmake bad shit happens sometimes. In wiki there is a comand line cmake example. El 8 de agosto de 2011 07:55, Héctor Martínez hector.marti...@sensetrix.com escribió: and clicking the Configure button, a huge amount of similar errors appear. I have tried with An ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
2011/8/8 Héctor Martínez hector.marti...@sensetrix.com Hi Jorge, ** ** thank you for your response! You were right, it works with command line. But now I have new problems: ** ** **- **It doesn´t find some plugins (jpg, png… etc). **- **When trying to build the solution I get this error: 2InitializeBuildStatus: 2 Touching Win32\Debug\ndk\ndk.unsuccessfulbuild. 2CustomBuild: 2 The system cannot find the path specified. 2 Generating Android-OpenSceneGraph 2C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: cmd.exe exited with code 3. 2 2Build FAILED ** ** Any ideas about what’s wrong? ** ** Thank you. ** ** Cheers, ** ** Héctor Hi Hector, You can't use Visual Studio to build OSG for android. You need to choose Unix Makefile as generator in CMake gui. Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG for Android
There's no trouble in that. Android binaries are platform independant (they are from Android) and I suppose following the google instructions shouldn't give much trouble to anyone. I didn't like MinGW so I sticked with Linux. I'll try to find the 3rd party package link and submit it when I can... but right now I'm on vacation so i can't reach physically where it is. El 8 de agosto de 2011 14:36, Héctor Martínez hector.marti...@sensetrix.com escribió: . But, will I be able to use the compiled library in an Eclipse+Windows environment for the Android development? Regarding to the plugins, I thought that there were the same as the ones inside the 3rdparty folder of OSG. Do you think I will be able to get those you mention? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] Android Development Plans
Hi all, I gave osg android port a try on Windows using cygwin, and it worked like a charm (only a tiny problem with osgViewer, when cross compiling for android using cygwin, the windows path in osgViewer/CMakeLists.txt is used rather than the android one, fix attached). For the moment I only compiled all the osg libs and plugins that don't rely on a 3rdParty lib. I will let you know when I succeed to build an app for my nexus S :) (the test apk Jorge sent, works for me) Thanks for your efforts. Mourad On Tue, Mar 8, 2011 at 5:37 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Rafa, Jorge and all ;-) On Mon, Mar 7, 2011 at 11:53 AM, Rafa Gaitan rafa.gai...@gmail.com wrote: Finally Jorge and me have finished a first approach to build OSG under Android using the android NDK. Attached you will find all required code and cmake modifications (They are based on a previous submissions I sent last week). Many thanks for your efforts. I have now merged and checked in changes to OpenSceneGraph svn/trunk. I haven't tested the Android build at all yet, only the normal Linux build side. Would it be possible for you to put up a documentation page on the wiki to show how to set up to build the OSG on Android? Thanks, Robert. ___ osg-submissions mailing list osg-submissi...@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org # FIXME: For OS X, need flag for Framework or dylib IF(DYNAMIC_OPENSCENEGRAPH) ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY) ELSE() ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) ENDIF() SET(LIB_NAME osgViewer) SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME}) SET(TARGET_H ${HEADER_PATH}/CompositeViewer ${HEADER_PATH}/Export ${HEADER_PATH}/GraphicsWindow ${HEADER_PATH}/Renderer ${HEADER_PATH}/Scene ${HEADER_PATH}/Version ${HEADER_PATH}/View ${HEADER_PATH}/Viewer ${HEADER_PATH}/ViewerBase ${HEADER_PATH}/ViewerEventHandlers ) SET(LIB_COMMON_FILES CompositeViewer.cpp HelpHandler.cpp Renderer.cpp Scene.cpp ScreenCaptureHandler.cpp StatsHandler.cpp Version.cpp View.cpp Viewer.cpp ViewerBase.cpp ViewerEventHandlers.cpp ${OPENSCENEGRAPH_VERSIONINFO_RC} ) SET(LIB_EXTRA_LIBS) IF(WIN32 AND NOT ANDROID) # # Enable workaround for OpenGL driver issues when used in multithreaded/multiscreen with NVidia drivers on Windows XP # For example: osgviewer dumptruck.osg was showing total garbage (screen looked like shattered, splashed hedgehog) # There were also serious issues with render to texture cameras. # Workaround repeats makeCurrentContext call as it was found that this causes the problems to dissapear. # OPTION(OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND Set to ON if you have NVidia board and drivers earlier than 177.92 ver OFF) MARK_AS_ADVANCED(OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND) IF(OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND) ADD_DEFINITIONS(-DOSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND) ENDIF() SET(TARGET_H ${TARGET_H} ${HEADER_PATH}/api/Win32/GraphicsHandleWin32 ${HEADER_PATH}/api/Win32/GraphicsWindowWin32 ${HEADER_PATH}/api/Win32/PixelBufferWin32 ) SET(LIB_COMMON_FILES ${LIB_COMMON_FILES} GraphicsWindowWin32.cpp PixelBufferWin32.cpp ) ELSE() IF(APPLE) IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR) SET(OSG_WINDOWING_SYSTEM IOS CACHE STRING Windowing system type for graphics window creation, options only IOS.) ELSE() SET(OSG_WINDOWING_SYSTEM Carbon CACHE STRING Windowing system type for graphics window creation, options Carbon, Cocoa or X11.) ENDIF() ELSE() IF(ANDROID) SET(OSG_WINDOWING_SYSTEM None CACHE STRING None Windowing system type for graphics window creation.) ELSE() SET(OSG_WINDOWING_SYSTEM X11 CACHE STRING Windowing system type for graphics window creation. options only X11) ENDIF() ENDIF() IF(${OSG_WINDOWING_SYSTEM} STREQUAL Cocoa) ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION) IF(OSG_COMPILE_FRAMEWORKS) SET(LIB_COMMON_FILES ${LIB_COMMON_FILES} ${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa ${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa ${HEADER_PATH}/api/Cocoa/PixelBufferCocoa ) SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa) SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa) SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/PixelBufferCocoa PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa)
Re: [osg-users] [osg-submissions] Android Development Plans
Thanks Mourad, fix now merged and submitted to svn/trunk. On Thu, Mar 10, 2011 at 2:30 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi all, I gave osg android port a try on Windows using cygwin, and it worked like a charm (only a tiny problem with osgViewer, when cross compiling for android using cygwin, the windows path in osgViewer/CMakeLists.txt is used rather than the android one, fix attached). For the moment I only compiled all the osg libs and plugins that don't rely on a 3rdParty lib. I will let you know when I succeed to build an app for my nexus S :) (the test apk Jorge sent, works for me) Thanks for your efforts. Mourad On Tue, Mar 8, 2011 at 5:37 PM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Rafa, Jorge and all ;-) On Mon, Mar 7, 2011 at 11:53 AM, Rafa Gaitan rafa.gai...@gmail.com wrote: Finally Jorge and me have finished a first approach to build OSG under Android using the android NDK. Attached you will find all required code and cmake modifications (They are based on a previous submissions I sent last week). Many thanks for your efforts. I have now merged and checked in changes to OpenSceneGraph svn/trunk. I haven't tested the Android build at all yet, only the normal Linux build side. Would it be possible for you to put up a documentation page on the wiki to show how to set up to build the OSG on Android? Thanks, Robert. ___ osg-submissions mailing list osg-submissi...@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] Android Development Plans
Hi Robert, Thank you very much for reviewing!, We will include some documentation on the wiki, but I have some work trips this weeks so probably Jorge will do the most part. Rafa. 2011/3/8 Robert Osfield robert.osfi...@gmail.com: Hi Rafa, Jorge and all ;-) On Mon, Mar 7, 2011 at 11:53 AM, Rafa Gaitan rafa.gai...@gmail.com wrote: Finally Jorge and me have finished a first approach to build OSG under Android using the android NDK. Attached you will find all required code and cmake modifications (They are based on a previous submissions I sent last week). Many thanks for your efforts. I have now merged and checked in changes to OpenSceneGraph svn/trunk. I haven't tested the Android build at all yet, only the normal Linux build side. Would it be possible for you to put up a documentation page on the wiki to show how to set up to build the OSG on Android? Thanks, Robert. ___ osg-submissions mailing list osg-submissi...@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es http://gvsig3d.blogspot.com Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG on Android ?
On 10/06/10 14:32 , Vivek Kumar Dwivedi wrote: Don't send me messages Unsubscribe and they'll go away: http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG on Android ?
David Glenn wrote: Hi, I got my HTC EVO toy this week and I'm already playing with the idea of making Android apps (with OpenGL ES ). I know that apps for android are mostly based on java, but I have to be the one to ask! Yea! I know! I Know! |-) I know that there was an IPhone version in the works! All I know is here: http://forum.openscenegraph.org/viewtopic.php?t=3046 Good luck! --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org