Re: [osg-users] Shadow Volumes integration
Hi Johan and JS, My inclination would be towards using a nested namespace as suggest by J-S, this will avoid wider namespace pollution with generic names, but still allow the implementation to use the short hand and end up with more readable code. Another twist on this is to use the class as a namespace, so have the support classes nested within the ShadowTechnique implementation. Robert. On 1 February 2013 00:38, Jean-Sébastien Guay jean_...@videotron.ca wrote: Hi John, One suggestion, you could use nested namespaces, and then abbreviate locally so it's easier to read. For example: namespace osgShadow { namespace ShadowVolume { class Occluder { ... } } } // then in some .cpp file where you need to use it: namespace osgsv = osgShadow::ShadowVolume; void someFunction() { osg::ref_ptrosgsv::Occluder occluder = new osgsv::Occluder; } That way we don't need a new separate top-level namespace, it shows it's clearly a shadow technique so it's in osgShadow, yet it's separate from the other osgShadow code so you prevent name clashes. And using the abbreviated name locally helps with code that would become really verbose and hard to read, while not being ambiguous like using namespace ... in the case some classes have the same name eventually. Just a suggestion, I don't know if Robert will like this style, he may prefer one of your other suggestions but this is another alternative to add to the mix. J-S On 31/01/2013 5:21 AM, PCJohn wrote: Hi, me and my coleague have developed number of Shadow Volume shadow algorithms and we would like to contribute them one day to OSG. To mention the reason for Shadow Volumes: They are often used in CAD, etc. as they work in screen space, thus they do not suffer with aliasing/resolution problems of Shadow Map-based algorithms. Surely, you pay the quality by the speed. But sometimes, you simply can not tolerate shadow artifacts and performance of shadow volumes on today graphics cards is basically excellent (in my eyes). My questions (probably on Robert) to best fit with OSG design: - My implementation covers number of methods (7-10 planned, 2 in developement, 4 finished) starting from simple cpu implementations and finishing by geometry shader and OpenCL implementations (silhouette based approaches). Thus I have family of classes like Occluder, OccluderGroup, ShadowDataBuilder, CpuSilhouetteDataBuilder, OpenCLSilhouetteOccluder (12 at the moment, and more on the way). I was considering to append them to osgShadow library, but I am worrying about some name clashes as, for instance, Occluder or ShadowDataBuilder are too general names and developers of Shadow Maps might (1) want to use them or (2) they might cause some confusion as there is already, for instance, OccluderGeometry class. Would you prefer to: (a) do not worry about clashes and simply use Occluder name as it is still not in use in osgShadow (the same with all other classes). (b) to create namespace osgShadowVolume and make ecosystem of classes of shadow maps and shadow volumes distinct - they really does not have much in common and probably only share just two abstract base classes: osgShadow::ShadowedScene and osgShadow::ShadowTechnique. Having two separate namespaces may make even doc more understandable because when looking for a particular class, I will look into the appropriate namespace and not to the mix of both shadow approaches. (c) prepend Occluder by a prefix SV, e.g. SVOccluder, SVOccluderGroup (d) prepend Occluder by ShadowVolume prefix, e.g. ShadowVolumeOccluder, ShadowVolumeVertexExtrusionDataBuilder, ShadowVolumeGeometryShader2DManifoldSilhouetteOccluder. I am just not sure if some names would not lost readability - 4 words in class name seems acceptable to me but adding two more seems too much. And surely, I would need to think how to make the longest names a little bit shorter - the last class still does not exist, but its full name would not be acceptable. (e) postpone the decision I am refactoring my code now so any suggestions welcomed. John ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Jean-Sebastien Guay jean_...@videotron.ca http://whitestar02.dyndns-web.com/ ___ 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] [osgPlugins] : Cannot compile DDS plugin GL_HALF_FLOAT not defined in this scope
Hi Christian, On 1 February 2013 07:31, Christian Schulte christian.schu...@onera.fr wrote: my nightly build worked fine on RedHat 5.3(64bits) but also on CentOS 6.3(64bits), WinXP(32bits)¨and Win7(64bits). Thanks again for your quick answer and solution. By the way did you think about how to correct the math.h problem (regarding the round function, see discussion [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR) ? In our environment I have recompiled all OSG 3.0.1 and trunk replacing math.h by cmath in include/osg/Math and didn't have any problems until now. The only way to find out whether cmath is safe to use in include/osg/Math is to do it and then get the community to test across the full set of platforms. Problem areas are likely to be HP-UX, AIX, Solaris and IRIX. The later being the most likely to be a problem but it's also not something we official support now as no one tests on that platform that I'm aware of. Perhaps we could put a CMAKE variable into control whether to use cmath or math.h in case using cmath is problematic. This does add complexity though and if we don't need it it'll be a waste of time. There is no way for me to know until we do wider testing. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] : Cannot compile DDS plugin GL_HALF_FLOAT not defined in this scope
Hi Robert, I agree with you that there is no other way than testing. Maybe we could make an platform dependent include of math.h instead of cmath for the platforms you think there is a risk (like IRIX) on the trunk and ask the community to test it. Christian Le 01/02/2013 10:13, Robert Osfield a écrit : Hi Christian, On 1 February 2013 07:31, Christian Schulte christian.schu...@onera.fr wrote: my nightly build worked fine on RedHat 5.3(64bits) but also on CentOS 6.3(64bits), WinXP(32bits)¨and Win7(64bits). Thanks again for your quick answer and solution. By the way did you think about how to correct the math.h problem (regarding the round function, see discussion [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR) ? In our environment I have recompiled all OSG 3.0.1 and trunk replacing math.h by cmath in include/osg/Math and didn't have any problems until now. The only way to find out whether cmath is safe to use in include/osg/Math is to do it and then get the community to test across the full set of platforms. Problem areas are likely to be HP-UX, AIX, Solaris and IRIX. The later being the most likely to be a problem but it's also not something we official support now as no one tests on that platform that I'm aware of. Perhaps we could put a CMAKE variable into control whether to use cmath or math.h in case using cmath is problematic. This does add complexity though and if we don't need it it'll be a waste of time. There is no way for me to know until we do wider testing. 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] [build] How to play Video on Android
On Fri, Feb 1, 2013 at 8:24 AM, Koduri Lakshmi ankiredd...@gmail.comwrote: If I added -lffmpeg to LOCAL_LDLIBS in Android.mk file then I am getting the following error. Code: cannot find -lffmpeg Can you please help how to link ffmpeg plugin for Andorid. Maybe dumb question, but do you actually have ffmpeg for Android compiled and the libraries installed? It isn't included with the precompiled pack of OSG dependencies for Android. I also believe that the library is not actually called libffmpeg.so.x.x but that there are several shared libs that you need to link in - libavformat, libavcodec and libavutils (maybe few more). Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fedora 18 with nVidia driver: OSG crashes session
On Fri, Feb 1, 2013 at 1:38 AM, Ulrich Hertlein u.hertl...@sandbox.dewrote: I agree with Robert, this doesn't look OSG-specific. Have you tried running 'glxinfo' and 'glxgears' to check if OpenGL support is available? Yes, run glxinfo and check whether you are actually running Nvidia/ATI binary driver - look for the renderer line in the output. I think Fedora installs the open source drivers for Nvidia/ATI by default and they will not work correctly for OSG. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
Hi Koduri as Jan said you have to add the generated ffmpeg static libs, I have in my Android.mk: $(OSG_SDK)/obj/local/armeabi-v7a/libavformat.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libavcodec.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libavdevice.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libswscale.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libavutil.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libswresample.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libswresample.a \ But I use 0.8 version so make sure about what static libraries have you generated for ffmpeg in the 1.0 version. Cheers. 2013/2/1 Jan Ciger jan.ci...@gmail.com On Fri, Feb 1, 2013 at 8:24 AM, Koduri Lakshmi ankiredd...@gmail.comwrote: If I added -lffmpeg to LOCAL_LDLIBS in Android.mk file then I am getting the following error. Code: cannot find -lffmpeg Can you please help how to link ffmpeg plugin for Andorid. Maybe dumb question, but do you actually have ffmpeg for Android compiled and the libraries installed? It isn't included with the precompiled pack of OSG dependencies for Android. I also believe that the library is not actually called libffmpeg.so.x.x but that there are several shared libs that you need to link in - libavformat, libavcodec and libavutils (maybe few more). Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
Hi Jordi Torres and Jan Ciger, Thank you very much for the reply. I downloaded ffmpeg1.0 from FFmpeg site. Now compiled statically to generate .a files. I generated /armeabi-v7a/libavformat.a /armeabi-v7a/libavcodec.a /armeabi-v7a/libavdevice.a /armeabi-v7a/libswscale.a l/armeabi-v7a/libavutil.a /armeabi-v7a/libswresample.a /armeabi-v7a/libswresample.a. After this I downloaded the latest submission for ffmpeg plugin (by David Longest dated Oct 09, 2012). Replaced all files of this to $OSG/src/plugins/ffmpeg folder. Now I gave the following cmake command Code: 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 -DFFMPEG_LIBAVCODEC_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec.a -DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice.a -DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat.a -DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil.a -DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale.a -DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF -DCMAKE_CXX_FLAGS=__STDC_CONSTANT_MACROS -DJ=4 -DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall Faced some error and solved them. make install installed all include and lib files to /home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall folder. I gave /home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall path as OSG_ANDROID_DIR in Android.mk files. As of my knowledge to use ffmpeg plugin I should use USE_OSGPLUGIN() macro. Here I am facing problem. I dont have much idea how to use this plugin. Can you please help me how to link ffmpeg plugin for Android. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52322#52322 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fedora 18 with nVidia driver: OSG crashes session
Hi, To clarify, problem is already solved with the fix to xorg.conf I posted. glxinfo and glxgears were not running correctly and now they are. Yes, I am running nvidia drivers properly and all was well under F17 as I stated. This is a bug in F18 that should get fixed eventually. Thanks all, Stuart -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52323#52323 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
Hi Koduri, You can create a Quad and then add the image stream, something like that: osg::ref_ptrosg::Image image = osgDB::readImageFile( /sdcard/videodemo256256.avi.ffmpeg ); osg::ImageStream* imageStream = dynamic_castosg::ImageStream*( image.get() ); if ( imageStream ) { imageStream-play(); } osg::ref_ptrosg::Texture2D texture = new osg::Texture2D; texture-setImage( image.get() ); osg::ref_ptrosg::Geometry quad = osg::createTexturedQuadGeometry( osg::Vec3(), osg::Vec3(1.0f, 0.0f, 0.0f), osg::Vec3(0.0f, 0.0f, 1.0f),0,1,1,0 ); quad-getOrCreateStateSet()-setTextureAttributeAndModes( 0, texture.get() ); osg::ref_ptrosg::Geode geode = new osg::Geode; geode-addDrawable( quad.get() ); Cheers. 2013/2/1 Koduri Lakshmi ankiredd...@gmail.com Hi Jordi Torres and Jan Ciger, Thank you very much for the reply. I downloaded ffmpeg1.0 from FFmpeg site. Now compiled statically to generate .a files. I generated /armeabi-v7a/libavformat.a /armeabi-v7a/libavcodec.a /armeabi-v7a/libavdevice.a /armeabi-v7a/libswscale.a l/armeabi-v7a/libavutil.a /armeabi-v7a/libswresample.a /armeabi-v7a/libswresample.a. After this I downloaded the latest submission for ffmpeg plugin (by David Longest dated Oct 09, 2012). Replaced all files of this to $OSG/src/plugins/ffmpeg folder. Now I gave the following cmake command Code: 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 -DFFMPEG_LIBAVCODEC_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec.a -DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice.a -DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat.a -DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil.a -DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg -DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale.a -DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF -DCMAKE_CXX_FLAGS=__STDC_CONSTANT_MACROS -DJ=4 -DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall Faced some error and solved them. make install installed all include and lib files to /home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall folder. I gave /home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall path as OSG_ANDROID_DIR in Android.mk files. As of my knowledge to use ffmpeg plugin I should use USE_OSGPLUGIN() macro. Here I am facing problem. I dont have much idea how to use this plugin. Can you please help me how to link ffmpeg plugin for Android. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52322#52322 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
Hi Jordi Torres, Thank you very much for the help. I did that in .cpp file as follows Code: img = osgDB::readImageFile(filename); videoStream[idx] = dynamic_castosg::ImageStream*(img); if (videoStream[idx].valid()) { LOG( Got movie); videoStream[idx]-setLoopingMode( osg::ImageStream::NO_LOOPING); } else { LOG( No movie!); } aspectRatio = (float)img-t() / (float)img-s(); videoWidth = img-t(); videoHeight =img-s(); mVideoTexture = new osg::Texture2D; geode = new osg::Geode; mVideoTexture-setImage( videoStream[idx].get() ); geode-addDrawable(osg::createTexturedQuadGeometry( osg::Vec3(0, 0, 0), osg::Vec3(videoWidth, 0, 0), osg::Vec3(0, 0, videoHeight) )); geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, mVideoTexture, osg::StateAttribute::ON ); mtForMarker[idx] = new osg::MatrixTransform(); mtForMarker[idx]-addChild(geode.get()); modelSwitch-addChild(mtForMarker[idx]); but it is not compiling. When I gave nkd-build then getting above said errors. I think these are linker errors. How to use ffmpeg plugin-in my code. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52325#52325 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
You should investigate further about what are failing in your compilation and fix it, as I don't have your computer in front of me I can't say much more. Sorry. 2013/2/1 Koduri Lakshmi ankiredd...@gmail.com Hi Jordi Torres, Thank you very much for the help. I did that in .cpp file as follows Code: img = osgDB::readImageFile(filename); videoStream[idx] = dynamic_castosg::ImageStream*(img); if (videoStream[idx].valid()) { LOG( Got movie); videoStream[idx]-setLoopingMode( osg::ImageStream::NO_LOOPING); } else { LOG( No movie!); } aspectRatio = (float)img-t() / (float)img-s(); videoWidth = img-t(); videoHeight =img-s(); mVideoTexture = new osg::Texture2D; geode = new osg::Geode; mVideoTexture-setImage( videoStream[idx].get() ); geode-addDrawable(osg::createTexturedQuadGeometry( osg::Vec3(0, 0, 0), osg::Vec3(videoWidth, 0, 0), osg::Vec3(0, 0, videoHeight) )); geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, mVideoTexture, osg::StateAttribute::ON ); mtForMarker[idx] = new osg::MatrixTransform(); mtForMarker[idx]-addChild(geode.get()); modelSwitch-addChild(mtForMarker[idx]); but it is not compiling. When I gave nkd-build then getting above said errors. I think these are linker errors. How to use ffmpeg plugin-in my code. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52325#52325 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Compiling Stateset for Node Move
I need to move some nodes around in my structure that inherit various parts of their statesets from it's parent nodes. Is there an easy way to compile it's stateset for moving it around? I will give a very dumbed down example of what I am trying to do: Grp 1 / \ / \ Grp 2 Grp 3 | | Grp 4 So each group has it's own stateset, but inherit some aspect of it's state from it's parent. I want to move Grp 4 over to be under Grp 3. So I would need to compile the full stateset of Grp 4 before I move it over. Karl Cary SAIC Software Developer 301-227-5656 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
Hi Jordi Torres, When I use jpeg plugin, I did the following things 1) USE_OSGPLUGIN(jpeg) in .h file 2) Added -ljpeg to LOCAL_LDLIBS in Android.mk file 3) Added -losgdb_jpeg \ to LOCAL_LDFLAGS in Android.mk file. Similarly I need to do for ffmpeg plugin also. I added -lffmpeg to LOCAL_LDLIBS and -losgdb_ffmpeg\ to LOCAL_LDFLAGS in Android.mk file. And added USE_OSGPLUGIN(ffmpeg) in .h file. After ndk-build I am getting Code: cannot find -lffmpeg If I remove -lffmpeg to LOCAL_LDLIBS then the above said errors. What steps do I need to take to use ffmpeg plugin. Does am I going in correct way. I will dig more if the steps what I did are correct. Can you please guide me in correct way. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52328#52328 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to play Video on Android
I said you in a previous mail, and Jan too. You need to add to your TARGET_LDLIBS in the Android.mk of your application the libraries generated when building the ffmpeg. NO ffmpeg.a library is created so calling to -lffmpeg is an error and try to link with it too. $(OSG_SDK)/obj/local/armeabi-v7a/libavformat.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libavcodec.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libavdevice.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libswscale.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libavutil.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libswresample.a \ $(OSG_SDK)/obj/local/armeabi-v7a/libswresample.a \ 2013/2/1 Koduri Lakshmi ankiredd...@gmail.com Hi Jordi Torres, When I use jpeg plugin, I did the following things 1) USE_OSGPLUGIN(jpeg) in .h file 2) Added -ljpeg to LOCAL_LDLIBS in Android.mk file 3) Added -losgdb_jpeg \ to LOCAL_LDFLAGS in Android.mk file. Similarly I need to do for ffmpeg plugin also. I added -lffmpeg to LOCAL_LDLIBS and -losgdb_ffmpeg\ to LOCAL_LDFLAGS in Android.mk file. And added USE_OSGPLUGIN(ffmpeg) in .h file. After ndk-build I am getting Code: cannot find -lffmpeg If I remove -lffmpeg to LOCAL_LDLIBS then the above said errors. What steps do I need to take to use ffmpeg plugin. Does am I going in correct way. I will dig more if the steps what I did are correct. Can you please guide me in correct way. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52328#52328 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] getting errors in creating First OSG program
i am a beggineer ... and i stuck at very begining . i created my first OSG program in ubuntu i get this error message ... Scanning dependencies of target MyProject [100%] Building CXX object CMakeFiles/MyProject.dir/test.cpp.o /home/heart-hacker/osgproject/program-2/test.cpp:1:23: fatal error: osg/ref_ptr: No such file or directory compilation terminated. make[2]: *** [CMakeFiles/MyProject.dir/test.cpp.o] Error 1 make[1]: *** [CMakeFiles/MyProject.dir/all] Error 2 make: *** [all] Error 2 i have used cmake to build CMakeLists.txt .. suceeded but when run make command , above errors occured. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fedora 18 with nVidia driver: OSG crashes session
On Fri, Feb 1, 2013 at 12:27 PM, Stuart Mentzer osgfo...@tevs.eu wrote: Hi, To clarify, problem is already solved with the fix to xorg.conf I posted. glxinfo and glxgears were not running correctly and now they are. Yes, I am running nvidia drivers properly and all was well under F17 as I stated. This is a bug in F18 that should get fixed eventually. It seems that Fedora 18 is a really big lemon, there are quite a few scathing reviews of the thing online - one here: http://www.dedoimedo.com/computers/fedora-18-kde.html and I have seen an even more scathing one elsewhere. Good to know that OpenGL is screwed up as well - the review mentions that the desktop effects don't work, I guess that OpenGL not working could be a good explanation for that issue too ... Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadow Volumes integration
Hi Robert and J-S, thanks for suggestions. The namespace trick seems interesting. I will try to lead our code in this direction. John On Friday 01 of February 2013 09:05:47 Robert Osfield wrote: Hi Johan and JS, My inclination would be towards using a nested namespace as suggest by J-S, this will avoid wider namespace pollution with generic names, but still allow the implementation to use the short hand and end up with more readable code. Another twist on this is to use the class as a namespace, so have the support classes nested within the ShadowTechnique implementation. Robert. On 1 February 2013 00:38, Jean-Sébastien Guay jean_...@videotron.ca wrote: Hi John, One suggestion, you could use nested namespaces, and then abbreviate locally so it's easier to read. For example: namespace osgShadow { namespace ShadowVolume { class Occluder { ... } } } // then in some .cpp file where you need to use it: namespace osgsv = osgShadow::ShadowVolume; void someFunction() { osg::ref_ptrosgsv::Occluder occluder = new osgsv::Occluder; } That way we don't need a new separate top-level namespace, it shows it's clearly a shadow technique so it's in osgShadow, yet it's separate from the other osgShadow code so you prevent name clashes. And using the abbreviated name locally helps with code that would become really verbose and hard to read, while not being ambiguous like using namespace ... in the case some classes have the same name eventually. Just a suggestion, I don't know if Robert will like this style, he may prefer one of your other suggestions but this is another alternative to add to the mix. J-S On 31/01/2013 5:21 AM, PCJohn wrote: Hi, me and my coleague have developed number of Shadow Volume shadow algorithms and we would like to contribute them one day to OSG. To mention the reason for Shadow Volumes: They are often used in CAD, etc. as they work in screen space, thus they do not suffer with aliasing/resolution problems of Shadow Map-based algorithms. Surely, you pay the quality by the speed. But sometimes, you simply can not tolerate shadow artifacts and performance of shadow volumes on today graphics cards is basically excellent (in my eyes). My questions (probably on Robert) to best fit with OSG design: - My implementation covers number of methods (7-10 planned, 2 in developement, 4 finished) starting from simple cpu implementations and finishing by geometry shader and OpenCL implementations (silhouette based approaches). Thus I have family of classes like Occluder, OccluderGroup, ShadowDataBuilder, CpuSilhouetteDataBuilder, OpenCLSilhouetteOccluder (12 at the moment, and more on the way). I was considering to append them to osgShadow library, but I am worrying about some name clashes as, for instance, Occluder or ShadowDataBuilder are too general names and developers of Shadow Maps might (1) want to use them or (2) they might cause some confusion as there is already, for instance, OccluderGeometry class. Would you prefer to: (a) do not worry about clashes and simply use Occluder name as it is still not in use in osgShadow (the same with all other classes). (b) to create namespace osgShadowVolume and make ecosystem of classes of shadow maps and shadow volumes distinct - they really does not have much in common and probably only share just two abstract base classes: osgShadow::ShadowedScene and osgShadow::ShadowTechnique. Having two separate namespaces may make even doc more understandable because when looking for a particular class, I will look into the appropriate namespace and not to the mix of both shadow approaches. (c) prepend Occluder by a prefix SV, e.g. SVOccluder, SVOccluderGroup (d) prepend Occluder by ShadowVolume prefix, e.g. ShadowVolumeOccluder, ShadowVolumeVertexExtrusionDataBuilder, ShadowVolumeGeometryShader2DManifoldSilhouetteOccluder. I am just not sure if some names would not lost readability - 4 words in class name seems acceptable to me but adding two more seems too much. And surely, I would need to think how to make the longest names a little bit shorter - the last class still does not exist, but its full name would not be acceptable. (e) postpone the decision I am refactoring my code now so any suggestions welcomed. John ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Jean-Sebastien Guay jean_...@videotron.ca http://whitestar02.dyndns-web.com/ ___ osg-users mailing list
Re: [osg-users] Fedora 18 with nVidia driver: OSG crashes session
On 01/31/2013 04:30 PM, Stuart Mentzer wrote: Hi Robert, You were right: the problem was broader than OSG. The fix was to modify /etc/X11/xorg.conf so that these 2 lines were in the Files section: Code: Section Files ModulePath /usr/lib64/nvidia/xorg ModulePath /usr/lib64/xorg/modules EndSection (Sorry I just saw this thread...) You could also put that little blurb somewhere in /usr/share/X11/xorg.conf.d, since a static xorg.conf isn't as flexible. I should note that I also use Fedora 18 exclusively, and I do it with no problems at all. I use two different builds of OSG, one of which uses my Intel card/GLES2-only and another which is routed through Bumblebee and uses the NVidia optimus technology on my T410. All of this works flawlessly, and I even get about 3-5 hours of battery life, depending on how hard I'm pushing the machine. Of course, this could have something to do with working for a company whose sole purpose is to put Linux on laptops and make them work well, but. :) (Another interesting note: when we install the NVidia drivers here on our machines, we don't even run the binary they provide; we just extract it into /opt/emperor, touch a few configs to add the appropriate library paths, and configure bumblebee to search the right directories; no existing RPM files are modified, as it is our policy to avoid futzing with the core in any way...) This comes from http://forums.fedoraforum.org/showthread.php?p=1626150 I hope this helps some other F18 users (until this bug is fixed). Cheers, Stuart -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52308#52308 ___ 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] [build] How to play Video on Android
Koduri, When I use jpeg plugin, I did the following things 1) USE_OSGPLUGIN(jpeg) in .h file 2) Added -ljpeg to LOCAL_LDLIBS in Android.mk file 3) Added -losgdb_jpeg \ to LOCAL_LDFLAGS in Android.mk file. Similarly I need to do for ffmpeg plugin also. I added -lffmpeg to LOCAL_LDLIBS and -losgdb_ffmpeg\ to LOCAL_LDFLAGS in Android.mk file. And added USE_OSGPLUGIN(ffmpeg) in .h file. After ndk-build I am getting In this case, when you add -ljpeg to LOCAL_LDLIBS it attempts to find libjpeg.a or libjpeg.so. Try adding the following to LOCAL_LDLIBS. -lavformat -lavcodec -lavdevice -lswscale -lavutil -lswresample David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PagedLOD and coordinates transform
Hi all, I have a question regarding PagedLOD. I use as input a hierarchy of files. The vertices in the geometries are in a local reference system, and, for some reason, in need to transform them to a projected coordinate system : Lambert 93. I have a transformation which works fine. However, Lambert 93 coordinates are around 100 for X and around 600 for Y. I thus center them with the barycenter of all the vertices in the geometry and apply a MatrixTransform (translate) with this center with the Geode as child (and the PagedLOD as parent). I also set the PagedLOD user center to this value. To be sure to not loss anything in the scene graph I just replace the old geometry with the new one using setVertexArray This process works fine (I work in double precision). However, when having a look at the details, it seems that they is a remaining problem. It seems that LODs are not correctly displayed : https://www.dropbox.com/s/ulg311af9qizlz3/pagedlods_ranges.jpeg. This image is a screenshot of my terrain viewed from top (perpendicular). It seems to me that some LODs are not correct since some of them are more detailled than some others whereas they are at the same or a lower distance. Sometimes, when I am very close ftom the terrain and rotate, the closest tile disappear, and, if I move a few, it appears again. I guess this is a ranges or culling problem. For now, I do not change them. They are in PIXEL_SIZE_ON_SCREEN. I tried to update them by multiplying or dividing the values by a ratio of old and new boundingsphere radius, but the problem remains. In the original data, the problem does not appear. Do you have any idea on how to solve this issue? Regards, Olivier ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Plugin vrml
On 01/31/2013 10:20 PM, lucie lemonnier wrote: I compiled openvrml-0.17.12 with visual studio 2008 without problem. When I try to compile openvrml-0.17.12 with visual studio 2010, I have this error in compilation several times : typename cannot be used outside a template declaration Does that tell you something? That sounds like some non-standard C++ code in OpenVRML. However, that version is quite old, try a more recent one. That particular bug may have been fixed since then - the version 0.18.7 has this in the changelog: This release includes changes to build against XULRunner 2.0, project files for Visual C++ 2010, and minor bug fixes. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fedora 18 with nVidia driver: OSG crashes session
Thanks for all the input. The Files section with those 2 lines already appears in /etc/X11/xorg.conf.d/00-nvidia.conf but for some reason isn't getting picked up in F18. I am not sure there is a benefit to copying that to /usr/share/X11/xorg.conf.d/ as well. I am no expert on how the nvidia drivers use the xorg.conf system but since it is obsolete on Fedora it is a likely source of future grief, unfortunately. Not the place to debate distros but I can't agree with Fedora 18 being a lemon although I didn't use the new installer that is attracting complaints. Each Fedora release has problems initially that require these sorts of work-arounds but that is the nature of the beast. It is still a great development platform when you need the latest tools, although my Kubuntu 12.10 system is almost as up to date (except for kernels of course) and was a lot easier to set up. YMMV. Stuart -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52337#52337 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] getting errors in creating First OSG program
Sounds like you may have missed an include file in your test.cpp file, or you have included something that it does not know about. If your program is short you may want to paste it into a reply and then people could maybe determine the problem. Michael On Fri, 2013-r2-01 at 19:10 +0530, om prakash Paliwal wrote: i am a beggineer ... and i stuck at very begining . i created my first OSG program in ubuntu i get this error message ... Scanning dependencies of target MyProject [100%] Building CXX object CMakeFiles/MyProject.dir/test.cpp.o /home/heart-hacker/osgproject/program-2/test.cpp:1:23: fatal error: osg/ref_ptr: No such file or directory compilation terminated. make[2]: *** [CMakeFiles/MyProject.dir/test.cpp.o] Error 1 make[1]: *** [CMakeFiles/MyProject.dir/all] Error 2 make: *** [all] Error 2 i have used cmake to build CMakeLists.txt .. suceeded but when run make command , above errors occured. ___ 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] Retrieve Wold matrix while animating
Hello. I try to obtain the world matrices using getWorldMatrices. The graph is : Group Group MatrixTransform The object uses the following matrix as Matrix Transform: 1 0 0 0 0 1 0 0 0 0 1 2.5 0 0 0 1 But i still get 3 identity matrices. When i add the object in scene, its position is correct +2.5 to z axis. How can i obtain the world matrix of an object ? thnx. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] getting errors in creating First OSG program
one more problem i have ... when i complile/build using cmake and then use make i get an error .. i have to modify the code genereted by cmake to get is corrected .. why so ... the error that is genereted are pasted below is there any problem with installation .. heart-hacker@hearthacker-HP-Pavilion-g6-Notebook-PC:~/osgproject/program-2$ cmake ./ -- Configuring done -- Generating done -- Build files have been written to: /home/heart-hacker/osgproject/program-2 heart-hacker@hearthacker-HP-Pavilion-g6-Notebook-PC:~/osgproject/program-2$ make CMake Warning (dev) at CMakeFiles/MyProject.dir/DependInfo.cmake:16 (SET): Syntax error in cmake code at /home/heart-hacker/osgproject/program-2/CMakeFiles/MyProject.dir/DependInfo.cmake:17 when parsing string ${OPENTHREADS_INCLUDE_DIR syntax error, unexpected $end, expecting } (25) Policy CMP0010 is not set: Bad variable reference syntax is an error. Run cmake --help-policy CMP0010 for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeFiles/MyProject.dir/DependInfo.cmake:16 (SET): Syntax error in cmake code at /home/heart-hacker/osgproject/program-2/CMakeFiles/MyProject.dir/DependInfo.cmake:19 when parsing string ${OSG_INCLUDE_DIR syntax error, unexpected $end, expecting } (17) Policy CMP0010 is not set: Bad variable reference syntax is an error. Run cmake --help-policy CMP0010 for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeFiles/MyProject.dir/DependInfo.cmake:16 (SET): Syntax error in cmake code at /home/heart-hacker/osgproject/program-2/CMakeFiles/MyProject.dir/DependInfo.cmake:20 when parsing string ${OSGDB_INCLUDE_DIR syntax error, unexpected $end, expecting } (19) Policy CMP0010 is not set: Bad variable reference syntax is an error. Run cmake --help-policy CMP0010 for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeFiles/MyProject.dir/DependInfo.cmake:16 (SET): Syntax error in cmake code at /home/heart-hacker/osgproject/program-2/CMakeFiles/MyProject.dir/DependInfo.cmake:21 when parsing string ${OSGUTIL_INCLUDE_DIR syntax error, unexpected $end, expecting } (21) Policy CMP0010 is not set: Bad variable reference syntax is an error. Run cmake --help-policy CMP0010 for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeFiles/MyProject.dir/DependInfo.cmake:16 (SET): Syntax error in cmake code at /home/heart-hacker/osgproject/program-2/CMakeFiles/MyProject.dir/DependInfo.cmake:22 when parsing string ${OSGVIEWER_INCLUDE_DIR syntax error, unexpected $end, expecting } (23) Policy CMP0010 is not set: Bad variable reference syntax is an error. Run cmake --help-policy CMP0010 for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. [100%] Building CXX object CMakeFiles/MyProject.dir/test.cpp.o /home/heart-hacker/osgproject/program-2/test.cpp:1:23: fatal error: osg/ref_ptr: No such file or directory compilation terminated. make[2]: *** [CMakeFiles/MyProject.dir/test.cpp.o] Error 1 make[1]: *** [CMakeFiles/MyProject.dir/all] Error 2 make: *** [all] Error 2 any correction you suggest ? thanks for the help .. i am also pasting the CMakeLists.txt file cmake_minimum_required( VERSION 2.6 ) project( MyProject ) find_package( OpenThreads ) find_package( osg ) find_package( osgDB ) find_package( osgUtil ) find_package( osgViewer ) macro( config_project PROJNAME LIBNAME ) include_directories(${${LIBNAME}_INCLUDE_DIR } ) target_link_libraries(${PROJNAME} ${${LIBNAME}_LIBRARY}) endmacro() add_executable( MyProject test.cpp ) config_project( MyProject OPENTHREADS ) config_project( MyProject OSG ) config_project( MyProject OSGDB ) config_project( MyProject OSGUTIL ) config_project( MyProject OSGVIEWER ) On Sat, Feb 2, 2013 at 10:55 AM, om prakash Paliwal omprakash.paliwa...@gmail.com wrote: #include osg/Referenced #include iostream class MonitoringTarget : public osg:Referenced { public: MonitoringTarget(int id) : _id(id) { std::cout Constructing target _idstd::endl; } protected: virtual ~MonitoringTarget() { std::cout Destroying target _idstd::endl; } int _id; }; int main() {
[osg-users] OpenSceneGraph, om prakash Paliwal has invited you to open a Gmail account
I've been using Gmail and thought you might like to try it out. Here's an invitation to create an account. You're Invited to Gmail! om prakash Paliwal has invited you to open a Gmail account. Gmail is Google's free email service, built on the idea that email can be intuitive, efficient, and fun. Gmail has: *Less spam* Keep unwanted messages out of your inbox with Google's innovative technology. *Lots of space* Enough storage so that you'll never have to delete another message. *Built-in chat* Text or video chat with om prakash Paliwal and other friends in real time. *Mobile access* Get your email anywhere with Gmail on your mobile phone. You can even import your contacts and email from Yahoo!, Hotmail, AOL, or any other web mail or POP accounts. Once you create your account, om prakash Paliwal will be notified of your new Gmail address so you can stay in touch. Learn morehttp://mail.google.com/mail/help/intl/en/about.htmlor get startedhttp://mail.google.com/mail/a-9036e4cde3-7fde3cf9ed-PtWAGQI3_3ghvXuXrc-5yVX4W5c?pc=en-rf---a ! Sign uphttp://mail.google.com/mail/a-9036e4cde3-7fde3cf9ed-PtWAGQI3_3ghvXuXrc-5yVX4W5c?pc=en-rf---a Google Inc. | 1600 Ampitheatre Parkway | Mountain View, California 94043 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org