Re: [osg-users] Android build failure with Android NDK r13
Hi, everything works fine for me following the same instructions with the same osg/ndk versions. Maybe your toolchain is actually broken. Martino Il giorno gio 27 ott 2016 alle ore 17:34 Rafa Gaitan ha scritto: > Hi Andy, > > The toolchain for cmake in osg is probably not updated since the ndk r10e. > Unfortunately I'm not working anymore in Android and I don't have time for > take a look at it. > > I used the toolchain file from the opencv project, so probably updating it > with that file will fix that problem > > Best regards, > Rafa. > > El jue., 27 oct. 2016 10:11, Andy Tai escribió: > > Hi, I followed this page to build OpenSceneGraph 3.4 for Android. > > http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4 > > It builds successfully with NDK r10e. > > > However, with the current NDK release, r13. I got these error in the cmake > stage, on an Fedora 23 GNU/Linux x86-64 system: > > cmake `pwd`/../osg.git/ > -DCMAKE_TOOLCHAIN_FILE=`pwd`/../osg.git/PlatformSpecifics/Android/android.toolchain.cmake > -DOPENGL_PROFILE="GLES2" -DDYNAMIC_OPENTHREADS=OFF > -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15 > -DCMAKE_INSTALL_PREFIX=/share/software/open_scene_graph/installed-android-armeabi-v7a > -DBUILD_OSG_EXAMPLES=true > CMake Error at PlatformSpecifics/Android/android.toolchain.cmake:663 > (message): > Could not find any working toolchain in the NDK. Probably your Android > NDK > is broken. > Call Stack (most recent call first): > /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:98 (include) > CMakeLists.txt:114 (PROJECT) > > > CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage > CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage > -- Configuring incomplete, errors occurred! > > > NDK r13 uses clang as the default compiler, instead of gcc. Would that be > related to the error? Thanks for any help on this. > > > -- > Andy Tai, a...@atai.org, Skype: licheng.tai, Line: andy_tai, WeChat: > andytai1010 > Year 2016 民國105年 > 自動的精神力是信仰與覺悟 > 自動的行為力是勞動與技能 > ___ > 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Winding up to OpenSceneGraph-3.2 stable release
Uh, right... It is src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp. I'm attaching it Thanks for your attention 2013/7/23 Robert Osfield > Hi Rocco, > > Could you send me the complete modified file as right now I don't know > what you've modified, the only way for me to be sure that the change works > on your system if by using the same files as you. > > Thanks, > Robert. > > > On 23 July 2013 16:54, rocco martino wrote: > >> Hello, >> >> the ffmpeg plugin fails to compile against the ffmpeg trunk because the >> deprecated AVCODEC_MAX_FRAME_SIZE constant has been definitively removed. >> >> I solved with >> >> #ifndef AVCODEC_MAX_FRAME_SIZE >> #define AVCODEC_MAX_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio >> >> Regards >> >> >> >> 2013/7/23 Robert Osfield >> >>> Hi All, >>> >>> I'm ready to tag another release candidate, currently svn/trunk and the >>> OSG-3.2 branch are pretty well in sync save for their version numbers. >>> Could the community pitch in with a quick build/run test and let me know >>> how you platform is doing so I can get another release candidate out. >>> >>> Cheers, >>> Robert. >>> >>> ___ >>> 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 mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > #include "FFmpegDecoderAudio.hpp" #include #include #include //DEBUG //#include #ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 #endif namespace osgFFmpeg { static int decode_audio(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, const uint8_t *buf, int buf_size) { #if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=32) // following code segment copied from ffmpeg's avcodec_decode_audio2() // implementation to avoid warnings about deprecated function usage. AVPacket avpkt; av_init_packet(&avpkt); avpkt.data = const_cast(buf); avpkt.size = buf_size; return avcodec_decode_audio3(avctx, samples, frame_size_ptr, &avpkt); #else // fallback for older versions of ffmpeg that don't have avcodec_decode_audio3. return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size); #endif } FFmpegDecoderAudio::FFmpegDecoderAudio(PacketQueue & packets, FFmpegClocks & clocks) : m_packets(packets), m_clocks(clocks), m_stream(0), m_context(0), m_packet_data(0), m_bytes_remaining(0), m_audio_buffer((AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2), m_audio_buf_size(0), m_audio_buf_index(0), m_end_of_stream(false), m_paused(true), m_exit(false) { } FFmpegDecoderAudio::~FFmpegDecoderAudio() { this->close(true); } void FFmpegDecoderAudio::open(AVStream * const stream) { try { // Sound can be optional (i.e. no audio stream is present) if (stream == 0) return; m_stream = stream; m_context = stream->codec; m_frequency = m_context->sample_rate; m_nb_channels = m_context->channels; switch (m_context->sample_fmt) { case AV_SAMPLE_FMT_NONE: throw std::runtime_error("invalid audio format AV_SAMPLE_FMT_NONE"); case AV_SAMPLE_FMT_U8: m_sample_format = osg::AudioStream::SAMPLE_FORMAT_U8; break; case AV_SAMPLE_FMT_S16: m_sample_format = osg::AudioStream::SAMPLE_FORMAT_S16; break; case AV_SAMPLE_FMT_S32: m_sample_format = osg::AudioStream::SAMPLE_FORMAT_S32; break; case AV_SAMPLE_FMT_FLT: m_sample_format = osg::AudioStream::SAMPLE_FORMAT_F32; break; case AV_SAMPLE_FMT_DBL: throw std::runtime_error("unhandled audio format AV_SAMPLE_FMT_DBL"); default: throw std::runtime_error("unknown audio format"); } // Check stream sanity if (m_context->codec_id == CODEC_ID_NONE) throw std::runtime_error("invalid audio codec");;
Re: [osg-users] Winding up to OpenSceneGraph-3.2 stable release
Hello, the ffmpeg plugin fails to compile against the ffmpeg trunk because the deprecated AVCODEC_MAX_FRAME_SIZE constant has been definitively removed. I solved with #ifndef AVCODEC_MAX_FRAME_SIZE #define AVCODEC_MAX_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio Regards 2013/7/23 Robert Osfield > Hi All, > > I'm ready to tag another release candidate, currently svn/trunk and the > OSG-3.2 branch are pretty well in sync save for their version numbers. > Could the community pitch in with a quick build/run test and let me know > how you platform is doing so I can get another release candidate out. > > Cheers, > Robert. > > ___ > 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] META_OBJECT
Hi all, Those methods are defined by the "META_Object" macro ( osg/Object header ) Not completely sure because I do not have a great experience with osgCompute, but I used the "find" utility and can't find META_OBJECT (all capitals) in the osgCompute trunk dir Regards, Martino 2013/4/29 Thomas Hogarth > hi > > Posting what META_OBJECT defines will help, but the clue is here > > /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/include/osgOpenCL/osgOpenCLContext:23:4: > error: cannot declare parameter ?? to be of abstract type > ?osgOpenCL::osgOpenCLContext? > /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/include/osgOpenCL/osgOpenCLContext:18:23: > note: because the following virtual functions are pure within > ?osgOpenCL::osgOpenCLContext?: > > You have some pure virtual functions somewhere, then other code is trying > to allocate an instance of a class with pure virtual functions which is not > allowed. > > Tom > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=53855#53855 > > > > > > ___ > 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] [Post-installation] wrong ELF class: ELFCLASS64
Hi Alain, perhaps you are linking a 32 bit application to a 64 bit library Martino 2013/3/1 Alain P > Hi all, > > I've a problem when I try to run a program which use OSG: > > "error while loading shared libraries: libOpenThreads.so.13: wrong ELF > class: ELFCLASS64" > > before that, i had to update my LD_LIBRARY_PATH and add /usr/lib, else > shared libraries wasn't found. > > I use debian (64bits). > > What I have to change to be able to get out this error ? > > Thanks in advance (and excuse my english...) > > Cheers, > Alain > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=52924#52924 > > > > > > ___ > 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] how to buildethe debug version of osg under Linux?
Hi, move to the OSG folder and type: cmake . -DCMAKE_BUILD_TYPE=Debug Have a nice day, Martino 2013/1/18 Lv Qing > Hi, > > When I cmake the osg source under Linux,it seems to bulid the release > version by default.Just want to know how to bulid the debug version :) > ... > > Thank you! > > Cheers, > Lv > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=52005#52005 > > > > > > ___ > 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] Importing 3DS max in OSG
Hi Valeriu, the easiest way is: osg::ref_ptrroot = osgDB::readNodeFile("my_model.obj") you will find more info at http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/Plugins Regards, Martino 2012/11/20 Valeriu Schneider > Hi, > > Is there any simple method to import 3ds max/maya models into osg? > > Thank you! > > Cheers, > Valeriu > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51159#51159 > > > > > > ___ > 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] screen capture with Qt
Yes, I tested SINGLE_PBO, DOUBLE_PBO, TRIPLE_PBO and READ_PIXELS with SingleThreaded, CullDrawThread etc. I simply had to change the mode at line 666, right? I have osg 3.0.1 and Qt 4.7.0 on Slackware64 13.1 with latest fglrx proprietary drivers 2012/10/30 Gianni Ambrosio > Hi Rocco, > thank you for trying the code! > Anyway that's really strange. In a Qt application I can get correct images > just with WindowCaptureCallback::READ_PIXELS mode. While I get a black > image s with the others (WindowCaptureCallback::SINGLE_PBO and > WindowCaptureCallback::DOUBLE_PBO). On the other hand in a NON-Qt > application all modes work fine. > Sorry for asking you again but can you confirm you get correct images with > SINGLE_PBO and DOUBLE_PBO modes? > > Regards, > Gianni > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=50896#50896 > > > > > > ___ > 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] screen capture with Qt
Hello Gianni, I just tried your code and it works fine on my machine I don't know how to help you. Martino 2012/10/30 Robert Osfield > Hi Gianni, > > I'm afraid I personally don't have the time available to chase up the > problem in your code. Perhaps others will be able. > > Robert. > > On 29 October 2012 17:11, Gianni Ambrosio wrote: > > Thank you Robert for the fast reply. > > In the meanwhile I'm attaching the code. > > > > Regards, > > Gianni > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=50868#50868 > > > > > > > > > > Attachments: > > http://forum.openscenegraph.org//files/scenecaptureqt_189.cpp > > > > > > ___ > > 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 139.com Spam
Idem 2012/6/7 Kim Bale > Is anyone else getting these Chinese emails quoting the subject of a post > made to osg-users? > > I've had a few now and I have no idea where they're coming from. > > K. > > ___ > 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] Troubles with the Texture2D serializer when _image is an ImageSequence
Hello everyone, I've discovered a problem with the Texture2D serializer that occurs when the associated image is an instance of an osg::ImageSequence. I think this happens because the ImageSerializer::read method calls the InputStream::readImage without ensuring that the object is actually an osg::Image, producing a read error. Can someone evaluate my observations? I use OSG-3.0.1, but in 3.1.2 ChangeLog file I have not found anything about it. This is the osgviewer output: [martino@slack] osg_image_sequence $ osgviewer graph.osgt InputStream::readObject(): Unsupported wrapper class osg::StateAttributeCallback Warning: Could not find plugin to read objects from file "". AsciiInputIterator::readProperty(): Unmatched property }, expecting Value I attach two files: write_graph.cpp produces graph.osgt graph.osgt contains the ImageSequence that osgDB::readNodeFile cannot read Thanks you all, Martino #include #include #include #include #include int main(int argc, char** argv) { osg::ref_ptrroot= NULL ; osg::Geometry* geometry= NULL ; osg::ImageSequence* image_sequence = NULL ; osg::Texture2D* texture = NULL ; geometry = osg::createTexturedQuadGeometry( osg::Vec3(-1, 0, -1), osg::Vec3( 2, 0, 0), osg::Vec3( 0, 0, 2) ) ; root = new osg::Geode() ; root->addDrawable( geometry ) ; image_sequence = new osg::ImageSequence() ; for(int i=1; iaddImageFile( argv[i] ) ; } texture = new osg::Texture2D( image_sequence ) ; root->getOrCreateStateSet()->setTextureAttributeAndModes( 0, texture, osg::StateAttribute::ON ) ; osgDB::writeNodeFile( *root, "graph.osgt" ) ; return 0 ; } graph.osgt Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgconv with fbx
Hi, Martin, the FBX plugin requires the FBX SDK: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/Plugins<%20http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/Plugins> Regards 2012/1/25 Martin Haffner > Hi, > > I wanted to convert a .fbx file to an .osgb, but unfortunately I always > get an error: > Warning: Could not find plugin to read objects from file > "Per3D05MaleAnimatedTx3.fbx". > Error no data loaded. > I check my osgPlugins-3.1.0 folder and it does not contain any > osgdb_fbx.so file. > Are there any special steps needed to build such an osgdb_fbx.so file? > > > Thank you! > > Cheers, > Martin > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=45010#45010 > > > > > > ___ > 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] More Information about the osgAndroid [help]
Sorry for my late reply, Like in any other C++ application, you must specify the correct path to your headers. By copying the osg headers in the "/home/nearchos/OpenSceneGraph_Android/make_test/include" folder the compilation process should succeed. Alternatively, you can modify the Android.mk file at line 17: LOCAL_C_INCLUDES := /your/path/to/osg/include Note that the Android emulator does not support GLES 2.0, so you have to run the example in a concrete device. Martino ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] More Information about the osgAndroid Examples 2
Hi, Nearchos, I think you should edit Android.mk:7 6 ### Main Install dir 7 OSG_ANDROID_DIR:= < type your install directory > Martino 2011/12/18 Nearchos > ** > Hello, > > I am having trouble compiling the osg examples. I follow the instructions > of the > > > http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android > > I downloaded the ndk-version *android-ndk-r7* > OpenScenegraph *OpenSceneGraph-3.0.1* > > And i am using linux > > cmake ../OpenSceneGraph-3.0.1/ > -DOSG_BUILD_PLATFORM_ANDROID=ON > -DDYNAMIC_OPENTHREADS=OFF > -DDYNAMIC_OPENSCENEGRAPH=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 > -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF > -DOSG_GL1_AVAILABLE=OFF > -DOSG_GL2_AVAILABLE=OFF > -DOSG_GL3_AVAILABLE=OFF > -DOSG_GLES1_AVAILABLE=OFF > -DOSG_GLES2_AVAILABLE=ON > -DCMAKE_BUILD_TYPE=Release > > I correct the NDK_PATH with *ccmake .* > > And then complete the *make* and *make install *without errors (I also > tried the NDK_BUILD) > > Now my problem is when I try to build the Sample Application. I import the > sample in eclipse and try to compile the jni without success > *./OpenSceneGraph-3.0.1/android-ndk-r7/ndk-build > Compile++ thumb : osgNativeLib <= osgNativeLib.cpp > /bin/sh: cannot open -Itype: No such file > make: *** > [/home/nearchos/OpenSceneGraph_Android/test_osg2_1/obj/local/armeabi/objs/osgNativeLib/osgNativeLib.o] > Error 2 > ** > *I believe the problem is that i do not include binaries directories in > the eclipse project. > *"After that you need to set up properly your include and binaries > directories."* > > Could you please elaborate what should i include? > > PS: I also tried to do the procedure in the osgAndroid example (cmake .. / > make / make install) but still i did not manage to run it > > Thanks in advance > > > > ___ > 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