[osg-users] ADD_LIST_SERIALIZER giving compilation error
Hi, I have a class which is derived from osg::Object and it has following set and get method:- void setData(const std::vectorDataXY); const std::vectorDataXY getData() const; where DataXY is following structure:- struct DataXY { double x; double y; }; After adding following line in the body of REGISTER_OBJECT_WRAPPER ADD_LIST_SERIALIZER(Data, std::vectorDataXY); I am getting following compilation error:- C:\OpenSceneGraph-3.0.1\include\osgDB/Serializer(715): error C2678: binary '' : no operator found which takes a left-hand operand of type 'osgDB::InputStream' (or there is no acceptable conversion) Please advise me how to resolve this issue. Regards, Mukundan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB ifstream / ofstream conflict
Hi, so far, /FORCE:multiple has worked for me. Thank you! Cheers, Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56555#56555 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Unwanted effect with two effect nodes in the line of sight (see-through)
Hi David and all, thank you for taking your time to answer this. To make things clear, I am using self-written subclasses of the Effect class (from the osgFX namespace). Simply adding the second pass to the transparent bin did not help. Though I have to admit I do not have the expertise (yet) to understand the interaction between multi-pass and multi-bin. I suspect that I need a transparency effect in two passes, not in one pass. This would explain why the single pass transparency occludes my second pass of the other effect node, right? I would like to understand this a bit more, before I start trying things out, so my question are: 1. how do multi-pass and multiple bins play together? 2. if have nodes using two-pass rendering, does my transparency effect node also need two-pass (AND transparent bin) in order to take effect OVER the other effect nodes? As another hint: I am also using the built-in osgFX::Scribe node which suffers from the effect, that the scribed nodes gets completely occluded by the transparent wall (left, in the attached screenshot scribe-gets-occluded.png). Thank you! Cheers, Florian Links I found (relevant?): http://forum.openscenegraph.org/viewtopic.php?t=11180 http://forum.openscenegraph.org/viewtopic.php?t=12791 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56559#56559 Attachments: http://forum.openscenegraph.org//files/scribe_gets_occluded_175.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Reference pointer pattern question?
Hi, I was looking at Don Burns text from 2003 about reference pointers in osg (sadly no longer available online, although it can be found via Internet Archive sites.) But this got me thinking about the suggested pattern for returning pointers from methods. Looking through different parts of the osg source code you can find two different patterns for returning pointers of object whose class inherits from osg::Referenced. Pattern 1: Code: osg::ref_ptr osg::Node createObject() { osg::ref_ptr osg::Node objectPtr = new osg::Node; return objectPtr; } Pattern 2: Code: osg::Node* createObject() { osg::ref_ptr osg::Node objectPtr = new osg::Node; return objectPtr.release(); } Is one of these preferred? If so why? Regards Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56560#56560 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Reference pointer pattern question?
Hi Björn, Returning a ref_ptr is more safe w.r.t memory management, forcing the user to use ref_ptr themselves, but no as efficient as just returning a C pointer. In my own code I typically just pass a C pointer back as as long as your aware of what you are doing avoiding the pitfalls isn't difficult. Robert. On 1 October 2013 12:45, Björn Blissing bjorn.bliss...@vti.se wrote: Hi, I was looking at Don Burns text from 2003 about reference pointers in osg (sadly no longer available online, although it can be found via Internet Archive sites.) But this got me thinking about the suggested pattern for returning pointers from methods. Looking through different parts of the osg source code you can find two different patterns for returning pointers of object whose class inherits from osg::Referenced. Pattern 1: Code: osg::ref_ptr osg::Node createObject() { osg::ref_ptr osg::Node objectPtr = new osg::Node; return objectPtr; } Pattern 2: Code: osg::Node* createObject() { osg::ref_ptr osg::Node objectPtr = new osg::Node; return objectPtr.release(); } Is one of these preferred? If so why? Regards Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56560#56560 ___ 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] VPB adding noise to imagery
Just to get it on record: Specifying --no-interpolate-imagery as a global switch fixed the issue. -B -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Colbert Sent: Thursday, September 26, 2013 12:39 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB adding noise to imagery Hi folks, I tried --RGB-16 and I get the same effect. There is some kind of sampling going on and it's hard to tell what it is. The same pattern is in all color channels. Any ideas? -B From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Arthur Bogard Sent: Thursday, September 26, 2013 12:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB adding noise to imagery I've found that RGB-16 solves my issues, but not RGBA On Thu, Sep 26, 2013 at 6:39 PM, Brad Colbert bcolb...@rscusa.com wrote: Hi Robert, Maybe I'm using the wrong switch? From my email below the target has compression disabled using -RGBA. Does this need to be specified after each -layer # switch? -B From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, September 26, 2013 11:27 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB adding noise to imagery HI Brad, My guess is that it's an artefact of using OpenGL/ST3C compression that the OSG uses by default to keep the tile sizes. You can disable compression when doing the VPB build by choosing an RGB output format. Run osgdem --help to see all the options. Robert. On 26 September 2013 17:39, Brad Colbert bcolb...@rscusa.com wrote: Hi folks, We are building a database using an additional texture layer as a height field. I'm finding that the image stored in database is coming across with what appears to be 1bit noise. A constant image of say, 125 / 255 after going through VPB is coming out with some values of 124 / 255. The pattern looks a bit like quantization noise but we are setting --disable-error-diffusion just in case and the target has compression disabled using -RGBA. Does anyone in OSG land have an idea where I can look to see what is causing this? I'm attaching captured images where I've applied the same stretching formula. One is from the rendering of the database and the other is from Mathcad, where I loaded the source image and displayed it with the same stretch. The database image capture shows the speckles where as the source image does not. -B --- Brad Colbert Renaissance Sciences Corporation (480) 290-3997 ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Cmd line cmake for OSX under 10.9
Hi, I've had success building for 10.8.x in the past, using a simple .sh script to set cmake on its way. Upon switching to 10.9 and using XCode5-DP6, I'm having problems getting cmake to see OpenGL. Here's how I kick off cmake (where ARCH in this case is x86_64): OPTIONS=-DBUILD_OSG_APPLICATIONS=0 OPTIONS=-DBUILD_OSG_EXAMPLES=0 $OPTIONS OPTIONS=-DOSG_COMPILE_FRAMEWORKS=1 $OPTIONS OPTIONS=-DOSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR=@rpath $OPTIONS OPTIONS=-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio $OPTIONS OPTIONS=-DOSG_WINDOWING_SYSTEM=Cocoa $OPTIONS OPTIONS=-DCMAKE_INSTALL_PREFIX=~/Desktop/OSGFramework-$TYPE-$ARCH $OPTIONS export CC=`xcrun -find clang` export CXX=`xcrun -find clang++` cmake ../$DIR -DCMAKE_BUILD_TYPE=$TYPE -DCMAKE_OSX_ARCHITECTURES=$ARCH $OPTIONS Compilers being used are: CC = /Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CXX = /Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ And finally, here's the error I'm seeing: -- Could NOT find LibXml2 (missing: LIBXML2_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find CURL (missing: CURL_INCLUDE_DIR) -- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find Boost -- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_LIBRARY) -- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE) -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) disabling quicktime because it's not supported by the selected SDK macosx10.9 Will compile OpenThreads.framework! CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OPENGL_INCLUDE_DIR (ADVANCED) used as include directory in directory /Volumes/Development/Users/neil/GitDevelopment/swb/ThirdParty/Source/OSG/osg used as include directory in directory /Volumes/Development/Users/neil/GitDevelopment/swb/ThirdParty/Source/OSG/osg/src/OpenThreads/pthreads I'm no expert in cmake at all. Can someone please point me in the right direction regarding either a known fix (I did search before I posted), or where I should begin looking to resolve (i.e: setting of vars; etc) Thank you! Cheers, Neil -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56570#56570 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Cmd line cmake for OSX under 10.9
The magic gnomes visited. I deleted my source tree and re-checked out. Still no luck. Now it can't even find stdlib.h. Hmm. I then tried various other versions of Xcode via xcode-switch, and found my old xcode4.6.3 wasn't installed properly. Not that it worked when I fixed that, because the scripts pick up a SDK of 10.9 which isn't supported by 4.6.3. Anyway; I switched back to xcode5-dp6, rebooted for some other reason not related to this problem at all, and low and behold while I was messing with other things the gnomes visited and fixed everything. How odd. I wonder ... who let them in? Anyway; for reasons unknown to mortal man it's now working. Yay, I guess! -- Neil -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56571#56571 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org