Re: [osg-users] How to detect rotating image
Hi Clement, On 27 February 2012 06:26, clement@csiro.au wrote: I would like to know how to detect the image is rotating. For example, we can use the mouse to rotate the image on viewer. If we drag on the viewer, the image will automatically rotate. Any event I can get the image is rotating by itself? Thanks. It's not possible to know precisely what you mean given the above. What exactly do you mean by image? A texture on a quad? The whole framebuffer? Are we talking about an object in the scene graph being rotated by a transform, or simply an object moving because the camera is moving. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Read dae files with osg.
You'll need to make sure that you have a dll called osgdb_dae.dll in your plugins folder and that your OSG binary can find it. Generally speaking this problem is caused because you haven't set up the environment variables correctly so OSG can't find it's plugins on the path. Hope that helps, Kim. On 27 February 2012 01:16, Peterakos hay...@gmail.com wrote: Hello. First of all thnx for your answer. Watchig the list with projects in open scene graph solution, i notice there is a Plugins dae project. Even after building everything (using the all build project), my application is still unable to load dae files. I build for both release and debug mode. I get the same warning as before. My 3rd party binaries are visible and well recognized by CMake. Any ideas? Thnx. On 26 February 2012 17:54, Kim Bale kcb...@googlemail.com wrote: You will need to point CMake to the Collada libraries when you build the OpenSceneGraph project. I believe there's a copy of them in the prebuilt 3rd party dependencies that are distributed along side OSG. After that you you should get a DAE plugin inside of the OSG projects list. This will enable you to load collada files. Regards, Kim. On 26 February 2012 15:47, Peterakos hay...@gmail.com wrote: Hello. I have to load a .dae model in my scene and i was wondering if there is any code example. I use the following code osg::ref_ptrosg::Node root = osgDB::readNodeFile( bmw.dae ); but i get a warning: Could not find plugin to read objects from file bmw.dae. I have built OpenSceneGraph code, but there isn't any project for this extension in the solution's plugin project list. How can i proceed ? Thank you for your time. ___ 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
Re: [osg-users] How to detect rotating image
Hi Clement, The osgViewer::ViewerBase (base class for Viewer) has a FrameScheme hint for the run() method which enables ON_DEMAND or CONTINUOUS, ON_DEMAND is the approach you'd want. You'll be calling frame() yourself rather than run() so won't be able to utilize this feature, but you should be able to learn from it. Have a look at the ViewerBase::run() method in OpenSceneGraph/src/osgViewer/ViewerBase.cpp, in particular the use of checkNeedToDoFrame() which is used to decide whether a frame is needed or not. Robert. On 27 February 2012 09:57, clement@csiro.au wrote: Hi Robert, I mentioned before I got much cpu usage on MFC window. In osgMFC example, it uses a thread and for loop to keep calling _osgViewer-frame(). It is a reason why the cpu keeps loading and it also depended on how large of volume data loaded. Now I have changed to call frame() on MFC OnPaint event. It can decrease much cpu usage. I also added to call frame() on mouse move, mouse wheel and size events for zooming and rotating the image. But all MFC events cannot be fired if the image is rotating by itself. Thus, I am thinking whether osg has an event to detect the image is rotating. I just found a solution to add MFC mouse button up and down to detect whether the user wants to rotate the image. Then I can do it all on MFC event. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 8:17 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image Hi Clement, On 27 February 2012 06:26, clement@csiro.au wrote: I would like to know how to detect the image is rotating. For example, we can use the mouse to rotate the image on viewer. If we drag on the viewer, the image will automatically rotate. Any event I can get the image is rotating by itself? Thanks. It's not possible to know precisely what you mean given the above. What exactly do you mean by image? A texture on a quad? The whole framebuffer? Are we talking about an object in the scene graph being rotated by a transform, or simply an object moving because the camera is moving. 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
Re: [osg-users] How to detect rotating image
Hi Robert, Thanks for your suggestion. I checked the source code viewerbase.cpp. There is attribute called _runFrameScheme, but the value is assigned by getenv(OSG_RUN_FRAME_SCHEME). Except to set the environment variable, any method I can assign the value to _runFrameScheme? Thanks. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 9:55 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image Hi Clement, The osgViewer::ViewerBase (base class for Viewer) has a FrameScheme hint for the run() method which enables ON_DEMAND or CONTINUOUS, ON_DEMAND is the approach you'd want. You'll be calling frame() yourself rather than run() so won't be able to utilize this feature, but you should be able to learn from it. Have a look at the ViewerBase::run() method in OpenSceneGraph/src/osgViewer/ViewerBase.cpp, in particular the use of checkNeedToDoFrame() which is used to decide whether a frame is needed or not. Robert. On 27 February 2012 09:57, clement@csiro.au wrote: Hi Robert, I mentioned before I got much cpu usage on MFC window. In osgMFC example, it uses a thread and for loop to keep calling _osgViewer-frame(). It is a reason why the cpu keeps loading and it also depended on how large of volume data loaded. Now I have changed to call frame() on MFC OnPaint event. It can decrease much cpu usage. I also added to call frame() on mouse move, mouse wheel and size events for zooming and rotating the image. But all MFC events cannot be fired if the image is rotating by itself. Thus, I am thinking whether osg has an event to detect the image is rotating. I just found a solution to add MFC mouse button up and down to detect whether the user wants to rotate the image. Then I can do it all on MFC event. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 8:17 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image Hi Clement, On 27 February 2012 06:26, clement@csiro.au wrote: I would like to know how to detect the image is rotating. For example, we can use the mouse to rotate the image on viewer. If we drag on the viewer, the image will automatically rotate. Any event I can get the image is rotating by itself? Thanks. It's not possible to know precisely what you mean given the above. What exactly do you mean by image? A texture on a quad? The whole framebuffer? Are we talking about an object in the scene graph being rotated by a transform, or simply an object moving because the camera is moving. 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to detect rotating image
On 27 February 2012 11:26, clement@csiro.au wrote: Hi Robert, Thanks for your suggestion. I checked the source code viewerbase.cpp. There is attribute called _runFrameScheme, but the value is assigned by getenv(OSG_RUN_FRAME_SCHEME). Except to set the environment variable, any method I can assign the value to _runFrameScheme? Thanks. You have the source code, your hopefully are a programmer so should be capable of looking at the API and reading what the methods are. Please try it before asking lots of low level questions that could be answered with a quick look with an editor. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] request new frame manually
Thank you, Robert! it worked well. for the record, the correct call is made on osg::View Code: _view-requestRedraw() I am puzzled how i could have missed the method in the sources :? Cheers, Andrey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45791#45791 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to detect rotating image
Hi Clement, If you want to find out what is going on use a debugger. A modicum of self reliance is key element of being a successful programmer. You can't expect others to keep hand walking your through every little feature one by one. Robert. On 27 February 2012 13:11, clement@csiro.au wrote: Hi Robert, Do you know how to test the osgViewer is using ON_DEMAND flag? Here is my code: void cOSG::Render(void* ptr) { cOSG* osg = (cOSG*)ptr; osgViewer::Viewer* viewer = osg-getViewer(); viewer-run(); } void cOSG::initOSGViewer() { putenv(OSG_RUN_FRAME_SCHEME=ON_DEMAND); osgViewer::Viewer* osgViewer = new osgViewer::Viewer(); ... ... } Before I create osgViewer, I added environment variable. But I can't see any different compare without environment variable setting. I am not sure whether osg viewer is using ON_DEMAND. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 10:35 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image On 27 February 2012 11:26, clement@csiro.au wrote: Hi Robert, Thanks for your suggestion. I checked the source code viewerbase.cpp. There is attribute called _runFrameScheme, but the value is assigned by getenv(OSG_RUN_FRAME_SCHEME). Except to set the environment variable, any method I can assign the value to _runFrameScheme? Thanks. You have the source code, your hopefully are a programmer so should be capable of looking at the API and reading what the methods are. Please try it before asking lots of low level questions that could be answered with a quick look with an editor. 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
Re: [osg-users] How to detect rotating image
You could do a setenv(..), in you code on startup Gordon Tomlinson Chief Engineer(Remoteview) Overwatch An Operating Unit of Textron Systems __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of clement@csiro.au Sent: Monday, February 27, 2012 6:27 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How to detect rotating image Hi Robert, Thanks for your suggestion. I checked the source code viewerbase.cpp. There is attribute called _runFrameScheme, but the value is assigned by getenv(OSG_RUN_FRAME_SCHEME). Except to set the environment variable, any method I can assign the value to _runFrameScheme? Thanks. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 9:55 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image Hi Clement, The osgViewer::ViewerBase (base class for Viewer) has a FrameScheme hint for the run() method which enables ON_DEMAND or CONTINUOUS, ON_DEMAND is the approach you'd want. You'll be calling frame() yourself rather than run() so won't be able to utilize this feature, but you should be able to learn from it. Have a look at the ViewerBase::run() method in OpenSceneGraph/src/osgViewer/ViewerBase.cpp, in particular the use of checkNeedToDoFrame() which is used to decide whether a frame is needed or not. Robert. On 27 February 2012 09:57, clement@csiro.au wrote: Hi Robert, I mentioned before I got much cpu usage on MFC window. In osgMFC example, it uses a thread and for loop to keep calling _osgViewer-frame(). It is a reason why the cpu keeps loading and it also depended on how large of volume data loaded. Now I have changed to call frame() on MFC OnPaint event. It can decrease much cpu usage. I also added to call frame() on mouse move, mouse wheel and size events for zooming and rotating the image. But all MFC events cannot be fired if the image is rotating by itself. Thus, I am thinking whether osg has an event to detect the image is rotating. I just found a solution to add MFC mouse button up and down to detect whether the user wants to rotate the image. Then I can do it all on MFC event. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 8:17 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image Hi Clement, On 27 February 2012 06:26, clement@csiro.au wrote: I would like to know how to detect the image is rotating. For example, we can use the mouse to rotate the image on viewer. If we drag on the viewer, the image will automatically rotate. Any event I can get the image is rotating by itself? Thanks. It's not possible to know precisely what you mean given the above. What exactly do you mean by image? A texture on a quad? The whole framebuffer? Are we talking about an object in the scene graph being rotated by a transform, or simply an object moving because the camera is moving. 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 ___ 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 detect rotating image
Hi Robert, Sorry for the mass email. I have debugged the program and I am sure ON_DEMAND is set to OSG_RUN_FRAME_SCHEME, but I can't see any different. The cpu usage is still used 25% on idle. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Tuesday, 28 February 2012 12:41 AM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image Hi Clement, If you want to find out what is going on use a debugger. A modicum of self reliance is key element of being a successful programmer. You can't expect others to keep hand walking your through every little feature one by one. Robert. On 27 February 2012 13:11, clement@csiro.au wrote: Hi Robert, Do you know how to test the osgViewer is using ON_DEMAND flag? Here is my code: void cOSG::Render(void* ptr) { cOSG* osg = (cOSG*)ptr; osgViewer::Viewer* viewer = osg-getViewer(); viewer-run(); } void cOSG::initOSGViewer() { putenv(OSG_RUN_FRAME_SCHEME=ON_DEMAND); osgViewer::Viewer* osgViewer = new osgViewer::Viewer(); ... ... } Before I create osgViewer, I added environment variable. But I can't see any different compare without environment variable setting. I am not sure whether osg viewer is using ON_DEMAND. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 27 February 2012 10:35 PM To: OpenSceneGraph Users Subject: Re: [osg-users] How to detect rotating image On 27 February 2012 11:26, clement@csiro.au wrote: Hi Robert, Thanks for your suggestion. I checked the source code viewerbase.cpp. There is attribute called _runFrameScheme, but the value is assigned by getenv(OSG_RUN_FRAME_SCHEME). Except to set the environment variable, any method I can assign the value to _runFrameScheme? Thanks. You have the source code, your hopefully are a programmer so should be capable of looking at the API and reading what the methods are. Please try it before asking lots of low level questions that could be answered with a quick look with an editor. 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgCompute] Computation on a rendered texture quad
Hi jcronje, The method applyAsRenderTarget() or mapAsRenderTarget() is automatically called when a GLMemoryTargetCallback is attached to a camera. Please see the osgRTTDemo-example. It is required in order to synchronize the memory spaces correctly. You need to be shure that a GL-Context is ready in order to call applyAsRenderTarget(). Does it already work by now? Best regards, Jens -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45797#45797 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] OpenSceneGraph 3.0 Cookbook: ready for pre-order and code tests
Hi Rui, I'm looking forward to get your new book! I'll play with the online code repository these days and give you feedback! Best regards, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45798#45798 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgUtil::Optimizer and osgSim::DOFTransform with data variance STATIC
We recently discovered that osgSim::DOFTransform nodes were unexpectedly removed from the scene graph by the unconditional use of the osgUtil::Optimizer in osgconv. The DOFTransform nodes were marked by our modelling tool (Max with the osgmaxeporter plugin) as STATIC. Should the optimizer flatten DOFTransform nodes at all, under any circumstances? They carry much more information than a simple transformation matrix, such as the ranges for the DOFs. In our case it was this information that needed to be preserved. Can anyone think of a good use case where one would want to flatten DOFTransform nodes with osgconv? After all, if I weren't interested in the additional information, I could just use a MatrixTransform... Regards, Magnus ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] GL_TRANSFORM_FEEDBACK_BUFFER_NV in OSG
Hello, Is it possible to use GL_TRANSFORM_FEEDBACK_BUFFER_NV extension in osg? I would like write back my vertex position data into a new Vertex Buffer Object. Is there any example about this? Cheers Martin -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgUtil::Optimizer and osgSim::DOFTransform with data variance STATIC
HI Magnus, If you make a Transform node as STATIC then you've told the scene graph that it will never change so will be fair game for the Optimizer. You have two choices if you don't want to have the Optimizer optimize it away: 1) Don't call the Optimizer with the FLATTEN_STATIC_TRANSFORM enabled. 2) Make your Transforms which will be changing as DYNAMIC. Robert. On 27 February 2012 15:10, Magnus Kessler magnus.kess...@gmx.net wrote: We recently discovered that osgSim::DOFTransform nodes were unexpectedly removed from the scene graph by the unconditional use of the osgUtil::Optimizer in osgconv. The DOFTransform nodes were marked by our modelling tool (Max with the osgmaxeporter plugin) as STATIC. Should the optimizer flatten DOFTransform nodes at all, under any circumstances? They carry much more information than a simple transformation matrix, such as the ranges for the DOFs. In our case it was this information that needed to be preserved. Can anyone think of a good use case where one would want to flatten DOFTransform nodes with osgconv? After all, if I weren't interested in the additional information, I could just use a MatrixTransform... Regards, Magnus ___ 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] osgUtil::Optimizer and osgSim::DOFTransform with data variance STATIC
On Monday 27 Feb 2012 15:26:15 Robert Osfield wrote: HI Magnus, If you make a Transform node as STATIC then you've told the scene graph that it will never change so will be fair game for the Optimizer. You have two choices if you don't want to have the Optimizer optimize it away: 1) Don't call the Optimizer with the FLATTEN_STATIC_TRANSFORM enabled. 2) Make your Transforms which will be changing as DYNAMIC. Robert. Hi Robert, Thanks for your rapid answer. I understand perfectly well the way the optimizer works and how to get the desired behaviour in its current implementation. DYNAMIC DOFTransform is the way to go (FLATTEN_STATIC_TRANSFORMS wouldn't work, as these DOFTransform nodes are part of bigger scenes, that do benefit from transformation flattening). I was just trying to see if there was a good reason to ever set the data variance to STATIC on a DOFTransform. But maybe this question is more to the authors of osgmaxexporter. Why does osgmaxexporter unconditionally set the data variance to STATIC? What are the use cases where one would model a STATIC DOFTransform? Magnus ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GL_TRANSFORM_FEEDBACK_BUFFER_NV in OSG
Yes, it's possible, but there are no examples that I know of. You might try binding a buffer object in a Camera pre-draw callback, for an example of one strategy. -Paul On 2/27/2012 8:21 AM, Martin Großer wrote: Hello, Is it possible to use GL_TRANSFORM_FEEDBACK_BUFFER_NV extension in osg? I would like write back my vertex position data into a new Vertex Buffer Object. Is there any example about this? Cheers Martin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Release built OSG libs with debug built app...
All, I believe this issue has been addressed before but I can't find the previous discussion. Therefore I will ask again... Is there a way to get Release-built OSG libs to play nicely with an app that is built with Debug? Right now if I link with Release-built OSG libs, my app (built with Debug option) doesn't work. If I link with Debug-built OSG libs, things work fine. If I built my app with Release, then it also works fine. Because OSG is so slow when using the Debug libs, I would like to avoid using them since I have no need to debug down into OSG code. I do need to debug my app. I'm using VS 2008 SP1 on Windows 7... Thank you! Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45809#45809 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Release built OSG libs with debug built app...
On Mon, Feb 27, 2012 at 11:34 AM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: All, I believe this issue has been addressed before but I can't find the previous discussion. Therefore I will ask again... Is there a way to get Release-built OSG libs to play nicely with an app that is built with Debug? Right now if I link with Release-built OSG libs, my app (built with Debug option) doesn't work. If I link with Debug-built OSG libs, things work fine. If I built my app with Release, then it also works fine. Basically, no. However, I believe you could build a release build of your app with no optimization and with all debug symbols included. This should allow you to debug your code (though not as completely as a full Debug build) from within a release build. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Release built OSG libs with debug built app...
On 02/27/2012 02:12 PM, Chris Hanson wrote: On Mon, Feb 27, 2012 at 11:34 AM, Shayne Tueller shayne.tuel...@hill.af.mil mailto:shayne.tuel...@hill.af.mil wrote: All, I believe this issue has been addressed before but I can't find the previous discussion. Therefore I will ask again... Is there a way to get Release-built OSG libs to play nicely with an app that is built with Debug? Right now if I link with Release-built OSG libs, my app (built with Debug option) doesn't work. If I link with Debug-built OSG libs, things work fine. If I built my app with Release, then it also works fine. Here is an explanation of why this doesn't work... http://msdn.microsoft.com/en-us/library/ms235460%28v=vs.80%29.aspx The article talks about the differences between msvcrt.dll and msvcrversion.dll, but the same problem exists when you mix debug and release runtime libraries. You can't pass a pointer generated by your app in debug mode (using the debug version of the C runtime) to OSG in release mode (using the release version of the C runtime). The key is the C runtime flag sent to the compiler. Either compile everything with /MD (Multithreaded DLL) or /MDd (Multithreaded debug DLL). Mixing them is bad. However, I believe you could build a release build of your app with no optimization and with all debug symbols included. This should allow you to debug your code (though not as completely as a full Debug build) from within a release build. Yeah, this works (sort of). --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgUtil::Optimizer and osgSim::DOFTransform with data variance STATIC
Hi Magnus, But maybe this question is more to the authors of osgmaxexporter. Why does osgmaxexporter unconditionally set the data variance to STATIC? What are the use cases where one would model a STATIC DOFTransform? DOFTransforms are a relic of Multigen (Presagis) Creator, and in that software they were the most widely used transform node. Modelers (as you probably know) are fond of putting lots of transforms (and groups) all over the scene graph, to keep things understandable to them, and to make it easier to modify the model later. Unfortunately, there are often many of these transforms that aren't really useful once the models are in the simulation software. So yes, there is a valid use case for static DOFTransforms - transforms that were just put there by the modeler for convenience, but which don't have any use in simulation. Now, I agree with you, the STATIC data variance should not be unconditionally applied. There can be rules to determine when it should be, for example if the DOFTransform does not have any limits. At my previous employer, we had made a custom osgconv which would massage the scene graph before calling the osgUtil::Optimizer on it (I think I mentioned this before on this list). This massage is highly dependent on what you'll be doing with your data, which is why I don't think it would be useful to submit such a thing - OSG provides the tools for you to do the right thing in your situation. But just as an example, our tool would: * Normalize state to expected values (we didn't require artists to set the right filtering or face culling manually, we enforced it in the tools, so that osgUtil::Optimizer's various merge operations could give good results) * Flag nodes as dynamic if we didn't want them optimized away (we had various rules, including if a comment contained Dynamic, if a DOF had limits, etc. * Remove most Group nodes since these just hinder the merge visitors and in most cases, better batching (less draw calls) is more important than better spatial culling. Again, I've talked about these things in the past, and others have shared similar or related advice too. Hope this helps, J-S -- __ 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
Re: [osg-users] Testing of OpenSceneGraph svn/trunk in prep for 3.1 dev release
Hi Robert I've had a few compile errors on IOS with everything configured for Float, nothing major. Fixes have been submitted. With fixes I successfully built with XCode 4.2.1 for IOS SDK 5.0, GLES2, run on IPad and IPhone. Also compiled with Apples newer LLVM compiler and everything seems to work fine. Cheers Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org