Re: [osg-users] Shader composer and position state

2013-09-05 Thread Robert Milharcic
On 4.9.2013 15:39, Robert Osfield wrote: Hi Robert, When implementing the osg::ShaderComposer functionality I had in mind that ability to have a custom StateAttribute/ShaderAttribute::apply() compute the view dependent uniform state and apply this to the osg::State. The apply() method would

[osg-users] osgText::Text, a question about line breaker \n

2013-09-05 Thread Fan ZHANG
Hi all, Sorry to disturb but I have a question about the line breaker '\n'. If I use text-setText(This is the first line \n This is the second line); It works and gets the result as: This is the first line This is the second line But if I read the string from a variable, it does not work,

Re: [osg-users] osgText::Text, a question about line breaker \n

2013-09-05 Thread Sebastian Messerschmidt
Hi Fan, Could you try: String str = This is the first line \\n This is the second line; text-setText(str); (note the double \) cheers Sebastian Hi all, Sorry to disturb but I have a question about the line breaker '\n'. If I use text-setText(This is the first line \n This is the second

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Fan ZHANG
Thanks for your reply but it still does not work:( Sebastian Messerschmidt wrote: Hi Fan, Could you try: String str = This is the first line \\n This is the second line; text-setText(str); (note the double \) cheers Sebastian Hi all, Sorry to disturb but I have a

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Wojciech Lewandowski
Hi, Its just a guess, but I believe your call: text-setText(This is the first line \n This is the second line); is done implicit conversion to std::string and calling following method: TextBase::setText( const std::string ); so in your code I would try declaring str variable as std::string

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Fan ZHANG
Thanks for your reply. In my codes, I did declare it as std::String str. Just simply put String here to illustrate:) Wojtek wrote: Hi, Its just a guess, but I believe your call:   text-setText(This is the first line n This is the second line); is done implicit conversion to

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Wojciech Lewandowski
Hi, Hmm, still have doubts. Because of uppercase String name yu just wrote. std::String does not exist. I would be ok, though, if you wrote you did declare it as std::string (lowercase) ;-). But lets assume you did just that and it still does not work, so then I would suggest to enter setText

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Fan ZHANG
Forgive my silly typo, I did mean std::string. It is strange that now std::string str = This is the first line \n This is the second line; text-setText(str); works!!! I don't know why it failed two hours ago. But if I change the str content with

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Fan ZHANG
Here is what I get: Set the text using a std::string, which is converted to an internal TextString. I think I should find out the secret of TextString. Oceane wrote: Forgive my silly typo, I did mean std::string. It is strange that now std::string str = This is

Re: [osg-users] osg::ref_ptr: Why isn't it deleting my camera?

2013-09-05 Thread Chris Stankevitz
On Wed, Sep 4, 2013 at 5:47 PM, Roland Hill roland.h...@fourwindstechnology.com.au wrote: In point 7, while you pass a raw Camera* to viewer.addSlave, you will probably find that it then stores that pointer in a osg::ref_ptrosg::Camera, which then increments the reference count. Therefore the

Re: [osg-users] osg::ref_ptr: Why isn't it deleting my camera?

2013-09-05 Thread Chris Stankevitz
On Thu, Sep 5, 2013 at 6:26 AM, Chris Stankevitz chrisstankev...@gmail.com wrote: Thank you. I did not expect that behavior, although I knew I was wrong about something. There must be some interesting plumbing that allows I see now. osg::ref_ptr is more like an intrusive_ptr than a

Re: [osg-users] osg::ref_ptr: Why isn't it deleting my camera?

2013-09-05 Thread Sebastian Messerschmidt
Hi Chris, On Wed, Sep 4, 2013 at 5:47 PM, Roland Hill roland.h...@fourwindstechnology.com.au wrote: In point 7, while you pass a raw Camera* to viewer.addSlave, you will probably find that it then stores that pointer in a osg::ref_ptrosg::Camera, which then increments the reference count.

Re: [osg-users] osgText::Text, a question about line breaker n

2013-09-05 Thread Fan ZHANG
Problem solved! Because I read texts from XML files, so I just put ' ' instead of '\n'. Thanks for all the replies above! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56126#56126 ___ osg-users

Re: [osg-users] OSG errors when running on a virtual machine

2013-09-05 Thread Marcel Pursche
Hi, it looks like the driver in your virtual machine does not support OpenGL =2.0. The function pointers for some newer features can not be found. So things like shaders, occlusion queries, framebuffers and instancing will not work. If fear there is nothing much you can do about that. You can

Re: [osg-users] OSG errors when running on a virtual machine

2013-09-05 Thread Marcel Pursche
Hi, according to the homepage of VMWare they support DirectX 9.0 and OpenGL 2.1 and VirtualBox has DirectX 9.0 and OpenGL(no version mentioned) support. So hardware accelaration should work, if a new version of VMWare or VirtualBox is used. Thank you! Cheers, Marcel -- Read

[osg-users] Winding up to the OpenSceneGraph-3.2.1 stable release

2013-09-05 Thread Robert Osfield
Hi All, This month I'm planning on making a OpenSceneGraph-3.2.1 that will wrap up some bug and build fixes that slipped through testing of 3.2.0. I believe the OpenSceneGraph-3.2 branch in subversion should be pretty close to 3.2.1 now so believe it's a good time for the community to start

Re: [osg-users] OSG errors when running on a virtual machine

2013-09-05 Thread Jordi Torres
Hi Marcel, 2013/9/5 Marcel Pursche marcel.purs...@student.hpi.uni-potsdam.de Hi, according to the homepage of VMWare they support DirectX 9.0 and OpenGL 2.1 and VirtualBox has DirectX 9.0 and OpenGL(no version mentioned) support. So hardware accelaration should work, if a new version of

[osg-users] Short-circuiting 3rd party lib detection

2013-09-05 Thread James Turner
Hello, I need to short-circuit the CMake detection of FreeType, for annoying reasons on Mac (users being pestered to install Xquartz at odd points during the app when the osgFT plugin is loaded). OSG_3RDPARTY_BIN seems like it was designed to do this, based on my reading of

Re: [osg-users] OSG errors when running on a virtual machine

2013-09-05 Thread Aurelien Albert
Hi, I've got some bad experience with virtual machines. The 3D hardware acceleration in a virtual machine is generally not that good. In fact, hardware acceleration is usualy not available at all on a Virtual Machine. Because this is a virtual machine. Just like a remote session on windows

[osg-users] Android build fails with osg from git

2013-09-05 Thread Preet
Hiya, I think some of the recent code wrt osgPresentation is causing the Android build to fail. Here's my cmake config call: cmake \ -DOSG_BUILD_PLATFORM_ANDROID=ON \ -DANDROID_NDK=/home/preet/Dev/env/sys/android-ndk-r8e \ -DCMAKE_INSTALL_PREFIX=/home/preet/Dev/env/android/osg-git-debug \

Re: [osg-users] Short-circuiting 3rd party lib detection

2013-09-05 Thread James Turner
On 5 Sep 2013, at 17:23, James Turner zakal...@mac.com wrote: OSG_3RDPARTY_BIN seems like it was designed to do this, based on my reading of Find3rdPartyDependencies.cmake, but there's no examples of using it anywhere that Google can find. Can someone provide one? My reading was wrong,

Re: [osg-users] Short-circuiting 3rd party lib detection

2013-09-05 Thread Robert Osfield
Hi James, The Find3rdPartyDepedendencies.cmake is written specific for Windows pre-built dependency package and isn't appropriate for other platforms. Other platforms we just rely on the standard CMake find scripts to find each dependencies independently. If the default Cmake find scripts don't

Re: [osg-users] Android build fails with osg from git

2013-09-05 Thread Robert Osfield
Hi Preet, Yesterday afternoon I missed a svn add for the Model.cpp, this morning I fixed it, so you should you be able to do a update and get the Model.cpp, unless the git mirror is falling behind too much, in which case I'd suggest using svn/trunk. Robert. On 5 September 2013 16:37, Preet

Re: [osg-users] Short-circuiting 3rd party lib detection

2013-09-05 Thread James Turner
On 5 Sep 2013, at 17:43, Robert Osfield robert.osfi...@gmail.com wrote: If the default Cmake find scripts don't find the lib you are looking from using ccmake . to bring up the console based UI for setting various build variables such as paths to the 3rd Party libs. This is an automated

Re: [osg-users] Short-circuiting 3rd party lib detection

2013-09-05 Thread Robert Osfield
Hi James, On 5 September 2013 17:38, James Turner zakal...@mac.com wrote: This is an automated build scenario, so that's not possible unfortunately. I'm investigating if Eric Wing's tweaks to FindFreeType work as described (CMAKE_PATH_PREFIX is searched first) You can set various

Re: [osg-users] Android build fails with osg from git

2013-09-05 Thread Preet
Hmm. Even with the osgPresentation issue fixed, I'm unable to build the libs I get hundreds of errors like: /home/preet/Dev/env/sys/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:

Re: [osg-users] osg::ref_ptr: Why isn't it deleting my camera?

2013-09-05 Thread Roland Hill
Chris, Yes. To use osg::ref_ptr the object has to be derived from osg::Object. That's where the reference count code is. Roland -- ROLAND HILL Director Four Winds