[osg-users] requestContinuousUpdate not called
I have found the reason why requestContinuousUpdate() is not been called in my application (that is based on osgviewerWX example). The osgviewerWX graphics window is derived from osgViewer::GraphicsWindow (class GraphicsWindowWX : public wxGLCanvas, public osgViewer::GraphicsWindow) and here I correctly add the TrackballManipulator and tried to override osgViewer::GraphicsWindow::requestContinuousUpdate() without success. That is because TrackballManipulator calls, when needed, View::requestContinuousUpdate(). So obviously overriding osgViewer::GraphicsWindow::requestContinuousUpdate(), as I was doing, has no effect. Now I created a class derived from osgViewer::Viewer and here I redefine the function and this now works. But this opens a question: which is the goal of adding a virtual requestContinuousUpdate() to osgViewer::GraphicsWindow? Who calls it? Thanks for your help! mario -- Ing. Mario Valle Visualization Group | http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60 v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Function decoration....
Hi Neil, I'm afriad I don't really have much to suggest on the error you have. You could as an experiment try 2.2, and use the osgProducer library to provide an easier porting path. Robert. On Nov 5, 2007 9:20 AM, [EMAIL PROTECTED] wrote: Hi All, I'm having a slight problem building a release version of OSG1.2. I know I should move to 2.2 - and a colleague of mine has - however for various reasons I'm unable to at this moment. I'm running VS2005, and the problem I have is that I can build a debug version, link it against my app, and everything is fine. When I build the Release version of the OSG1.2 and link this against the release version of my app I get 5 unknown function calls - as follows. 1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual bool __thiscall osgProducer::Viewer::realize(enum Producer::CameraGroup::ThreadingModel) ([EMAIL PROTECTED]@osgProducer@@[EMAIL PROTECTED]@Producer@@@Z) 1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual bool __thiscall osg::Group::removeChild(unsigned int,unsigned int) ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) 1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual bool __thiscall osg::Group::removeChild(class osg::Node *) ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@@Z) 1axtest1ctrl.obj : error LNK2001: unresolved external symbol public: virtual bool __thiscall osg::Geode::removeDrawable(unsigned int,unsigned int) ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) 1axtest1ctrl.obj : error LNK2019: unresolved external symbol __declspec(dllimport) public: void __thiscall osg::CameraNode::setRenderOrder(enum osg::CameraNode::RenderOrder) ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@@Z) referenced in function public: unsigned long __thiscall CAxTest1Ctrl::CreateHUDNode(void) ([EMAIL PROTECTED]@@QAEKXZ) 1CorrectInitialUnitPartMatrixVisitor.obj : error LNK2019: unresolved external symbol __declspec(dllimport) class osg::Matrixd __cdecl osg::computeLocalToWorld(class std::vectorclass osg::Node *,class std::allocatorclass osg::Node * const ) ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@osg@@@std@@@std@@@Z) referenced in function public: virtual void __thiscall CCorrectInitialUnitPartMatrixVisitor::apply(class osg::Transform ) ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@@Z) Sorry about that. Anyway, on closer inspection it appears that my app is trying to link to osg::Group::removeChild(unsigned int,unsigned int) ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) however when I examine the OSG dll produced when building a release version it contains the decorated function osg::Group::removeChild(unsigned int,unsigned int) ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) (in case you missed it, the bit that's different is the decoration). I've trawled through the MS documentation, played with a few compiler/linker settings associated with inline functions, all to no avail. Has anyone got any ideas ? Many thanks for any help. Neil. ___ 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] databasepageloader and composite viewer
Hi David, Which version of the OSG are you using? Robert. On Nov 5, 2007 9:40 AM, David _ [EMAIL PROTECTED] wrote: Hi We´re dealing with a MDI application with multiple views of the same scene, which is composed by some pagelod islands. we´re using the composite viewer in order to have an independent camera in every child window and it´s working fine. The problem comes when we want to delete one of these windows. For deleting a view we use the removeView method of the composite viewer in order to free the osgViewer, but, sometimes it kills the databasepageloader too which stops all the LOD switching stuff. This is not happening all the viewers, just with some of them. How can we avoid this (killing a view of the composite viewer without killing the LOD stuff)??? How can we check if the databasepageloader is gone and re-start it?? thanks in advance help would be really appreciated Express yourself instantly with MSN Messenger! MSN Messenger ___ 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] Scaling images
Hi Guy, If you hardware is capable of non power of two textures switch off the hint to resize non power of two textures: texture-setResizeNonPowerOfTwoHint(false); Robert. On Nov 6, 2007 5:48 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to send float data beyond the range of [0, 1] to a texture. I set the texture and the image format to float. If the image size is power of two, things seems to be ok, but if the sizes are different it seems the the gluScaleImage command truncate the values in some manner (it's even not clamping everything above 1.0 to 1.0 and everything below 0 to 0, but some truncation that leaes only the fraction of the value). Any ideas how to prevent it from happenning? thanks, Guy ___ 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] osgSim::OpenFlightOptimizer
Hi, I believe Jasons memory is correct. Now the regular optimizer is up to the task. IIRC, it was used at one point by the newer OpenFlight plugin to handle some of the lower-level optimization (things that the regular Optimizer couldn't do). Regards, Brede On 11/6/07, Robert Osfield [EMAIL PROTECTED] wrote: On Nov 4, 2007 10:54 PM, Paul Martz [EMAIL PROTECTED] wrote: Robert -- If you'd like, I could submit a code change that marks this class as deprecated. If it's not being used then we could remove it for 2.4. Perhaps Brede might be able to add something to this. For 2.2.1 we'll need to live it in just for backwards compatibility, so for this a comment in the docs that this is deprecated would be appropriate. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] SVN XCode repositoryhas filename issue
This is an academic issue for me, but I thought I'd just pass it along. Having downloaded the entire OSG repository (using the Tortoise SVN tool) onto my home WinXP system, the tool hit a problem when it reached one of the Xcode projects under the Tags (tagged releases) repository. I think this was either the osgProducer_OpenSceneGraph_BranchPoint or Producer_OpenSceneGraph_BranchPoint release, but I can't remember which - it may have been another. Anyhow, SVN gets itself confused because it downloads a filename in one case and then gets asked to download the same filename with some letters in the alternative (upper/ lower) case. This will work ok on case sensitive systems (ie Linux and Apple) but not on case insensitive Windows, where both filenames resolve to the same filename. The result is that Tortoise SVN gives up reporting errors, because it can't create the second file and it leaves things locked. Obviously the lock issue is down to Tortoise, but the filename issue may require resolution, or perhaps this email appearing in the archives may suffice. I'm a WinXP user but have just started a Linux project so get to see the best and worst of both (let battle commence!!!) PhilT ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Placing camera manually
Hi! I want to manually place the camera at a point. For that I have written the following two functions. The second function returns a view which is added to the viewer. But the problem is that whatever values I fill in the osg::Matrix::translate(osg::Vec3(...)), nothing seems to be happening. The view remains the same... osg::MatrixTransform* setPosition(osg::Node* scene, osg::BoundingSphere* bs){ osg::MatrixTransform* mTop = new osg::MatrixTransform; mTop-setName(Top View); mTop-setMatrix(osg::Matrix::rotate(osg::inDegrees(90.0),osg::Vec3(1.0,0.0,0.0)) * osg::Matrix::translate(osg::Vec3(100.0, 600.0, 0.0))); /*All changes done here*/ mTop-setMatrix(n); mTop-addChild(scene); return mTop; } osgViewer::View* createTopView(osg::Node* scene){ osgViewer::View* topView = new osgViewer::View; osg::BoundingSphere bsh = scene-getBound(); cout bsh.radius() endl; topView-getCamera()-setProjectionMatrixAsPerspective(60.0f, (double)traits-width/(double)traits-height, 1.0, 1000.0); topView-getCamera()-setViewport(new osg::Viewport(0, 0, (traits-width)/5, (traits-height)/5)); topView-getCamera()-setGraphicsContext(gc.get()); topView-getCamera()-setClearColor(osg::Vec4(0.4f, 0.4f, 0.4f, 1.0f)); topView-getCamera()-setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); topView-setSceneData(setPosition(scene, bsh)); return topView; } why does it happen so? In the NPS Tutorials, in the 10th tutorial, there was some code which helped manually place a camera. In that tutorial, the guy has taken the inverse of the view matrix. Why? Am I missing something?? :( ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Placing camera manually
do you have an active motion model, ? Yes, the motion model overwrite each frame the view's position, may writting a own motion model helps. 2007/11/6, Sashidhar Guntury [EMAIL PROTECTED]: Hi! I want to manually place the camera at a point. For that I have written the following two functions. The second function returns a view which is added to the viewer. But the problem is that whatever values I fill in the osg::Matrix::translate(osg::Vec3(...)), nothing seems to be happening. The view remains the same... osg::MatrixTransform* setPosition(osg::Node* scene, osg::BoundingSphere* bs){ osg::MatrixTransform* mTop = new osg::MatrixTransform; mTop-setName(Top View); mTop-setMatrix(osg::Matrix::rotate(osg::inDegrees(90.0 ),osg::Vec3(1.0,0.0,0.0)) * osg::Matrix::translate(osg::Vec3(100.0, 600.0, 0.0))); /*All changes done here*/ mTop-setMatrix(n); mTop-addChild(scene); return mTop; } osgViewer::View* createTopView(osg::Node* scene){ osgViewer::View* topView = new osgViewer::View; osg::BoundingSphere bsh = scene-getBound(); cout bsh.radius() endl; topView-getCamera()-setProjectionMatrixAsPerspective(60.0f, (double)traits-width/(double)traits-height, 1.0, 1000.0); topView-getCamera()-setViewport(new osg::Viewport(0, 0, (traits-width)/5, (traits-height)/5)); topView-getCamera()-setGraphicsContext(gc.get()); topView-getCamera()-setClearColor(osg::Vec4(0.4f, 0.4f, 0.4f, 1.0f)); topView-getCamera()-setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); topView-setSceneData(setPosition(scene, bsh)); return topView; } why does it happen so? In the NPS Tutorials, in the 10th tutorial, there was some code which helped manually place a camera. In that tutorial, the guy has taken the inverse of the view matrix. Why? Am I missing something?? :( ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] databasepageloader and composite viewer
Hi Robert we´re currently using OSG 2.2 under windows compiled with visual studio 2005 Date: Tue, 6 Nov 2007 09:01:07 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] databasepageloader and composite viewer Hi David, Which version of the OSG are you using? Robert. On Nov 5, 2007 9:40 AM, David _ [EMAIL PROTECTED] wrote: Hi We´re dealing with a MDI application with multiple views of the same scene, which is composed by some pagelod islands. we´re using the composite viewer in order to have an independent camera in every child window and it´s working fine. The problem comes when we want to delete one of these windows. For deleting a view we use the removeView method of the composite viewer in order to free the osgViewer, but, sometimes it kills the databasepageloader too which stops all the LOD switching stuff. This is not happening all the viewers, just with some of them. How can we avoid this (killing a view of the composite viewer without killing the LOD stuff)??? How can we check if the databasepageloader is gone and re-start it?? thanks in advance help would be really appreciated Express yourself instantly with MSN Messenger! MSN Messenger ___ 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 _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] databasepageloader and composite viewer
Hi David, I've had a quick check through View.cpp and the destructor doesn't do anything more than unref the Scene object that should be shared between each of your views, and as such shouldn't actually do anything to the DatabasePager directly. The same goes for CompositeViewer::removeView, it shouldn't change anything with the database pager directly. Do each of the View have their own GraphicsWindow? I wonder if this is where the problems stem from. Robert. On Nov 6, 2007 11:12 AM, David _ [EMAIL PROTECTED] wrote: Hi Robert we´re currently using OSG 2.2 under windows compiled with visual studio 2005 Date: Tue, 6 Nov 2007 09:01:07 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] databasepageloader and composite viewer Hi David, Which version of the OSG are you using? Robert. On Nov 5, 2007 9:40 AM, David _ [EMAIL PROTECTED] wrote: Hi We´re dealing with a MDI application with multiple views of the same scene, which is composed by some pagelod islands. we´re using the composite viewer in order to have an independent camera in every child window and it´s working fine. The problem comes when we want to delete one of these windows. For deleting a view we use the removeView method of the composite viewer in order to free the osgViewer, but, sometimes it kills the databasepageloader too which stops all the LOD switching stuff. This is not happening all the viewers, just with some of them. How can we avoid this (killing a view of the composite viewer without killing the LOD stuff)??? How can we check if the databasepageloader is gone and re-start it?? thanks in advance help would be really appreciated Express yourself instantly with MSN Messenger! MSN Messenger ___ 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 Express yourself instantly with MSN Messenger! MSN Messenger ___ 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] databasepageloader and composite viewer
Hi Robert, i´ll explaing the process we´re following and maybe you can see if we´re doing something wrong we´re using wxwidgets to manage the windows system which is composed by a MDI parent frame and many MDI child frames which all share the same parent frame. each MDI child frame (which is itself a new window) has it´s own openGL canvas and it´s own osgViewer. We also have one global compositeViewer for the whole application. the process we follow for creating each MDI Child Window is, create the new frame, create the new openglcanvas inside the new frame, create a new osgviewer, associate the osgviewer with the canvas using osg_viewer-getCamera()-setGraphicsContext(gl_canvas);, call the SetScene method of the viewer to tell him which scene is going to be shown and finally we call the addView method of the compositeViewer passing the new * viewer as a parameter for deleting the window we first use the composite_viewer-removeView(viewer) and then we delete the wxWidgets stuff, no direct calls to the viewer destructor is used. Does the remoview kills the viewer??? we believe it does because we see no memory leaks when the application closes. we´re not using a ref_ptr in the viewer because we had some problems with the deleting order of the widgets, we´ll try to find a way to use it and maybe it helps a little if you see something which you think is not right, please tell us Date: Tue, 6 Nov 2007 11:20:57 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] databasepageloader and composite viewer Hi David, I've had a quick check through View.cpp and the destructor doesn't do anything more than unref the Scene object that should be shared between each of your views, and as such shouldn't actually do anything to the DatabasePager directly. The same goes for CompositeViewer::removeView, it shouldn't change anything with the database pager directly. Do each of the View have their own GraphicsWindow? I wonder if this is where the problems stem from. Robert. On Nov 6, 2007 11:12 AM, David _ [EMAIL PROTECTED] wrote: Hi Robert we´re currently using OSG 2.2 under windows compiled with visual studio 2005 Date: Tue, 6 Nov 2007 09:01:07 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] databasepageloader and composite viewer Hi David, Which version of the OSG are you using? Robert. On Nov 5, 2007 9:40 AM, David _ [EMAIL PROTECTED] wrote: Hi We´re dealing with a MDI application with multiple views of the same scene, which is composed by some pagelod islands. we´re using the composite viewer in order to have an independent camera in every child window and it´s working fine. The problem comes when we want to delete one of these windows. For deleting a view we use the removeView method of the composite viewer in order to free the osgViewer, but, sometimes it kills the databasepageloader too which stops all the LOD switching stuff. This is not happening all the viewers, just with some of them. How can we avoid this (killing a view of the composite viewer without killing the LOD stuff)??? How can we check if the databasepageloader is gone and re-start it?? thanks in advance help would be really appreciated Express yourself instantly with MSN Messenger! MSN Messenger ___ 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 Express yourself instantly with MSN Messenger! MSN Messenger ___ 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 _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] databasepageloader and composite viewer
Hi David, There a few too many parts in this set up for me to fully understand the ins and outs to it I'm afraid. W.r.t. memory one needs to be careful about ciruclar references i.e. the window owning the viewer vs viewer owning the window. Having the GraphicsWindowWx be handled as a proxy object might be the best way to tackle this, with the WxWidget owning the GraphicsWindowWx and the Viewer's Camera owning GraphicsWindowWx, if the WxWidget goes out of scope then the GraphicsWindowWx wouldn't but would need to be switched off. Robert. On Nov 6, 2007 12:15 PM, David _ [EMAIL PROTECTED] wrote: Hi Robert, i´ll explaing the process we´re following and maybe you can see if we´re doing something wrong we´re using wxwidgets to manage the windows system which is composed by a MDI parent frame and many MDI child frames which all share the same parent frame. each MDI child frame (which is itself a new window) has it´s own openGL canvas and it´s own osgViewer. We also have one global compositeViewer for the whole application. the process we follow for creating each MDI Child Window is, create the new frame, create the new openglcanvas inside the new frame, create a new osgviewer, associate the osgviewer with the canvas using osg_viewer-getCamera()-setGraphicsContext(gl_canvas);, call the SetScene method of the viewer to tell him which scene is going to be shown and finally we call the addView method of the compositeViewer passing the new * viewer as a parameter for deleting the window we first use the composite_viewer-removeView(viewer) and then we delete the wxWidgets stuff, no direct calls to the viewer destructor is used. Does the remoview kills the viewer??? we believe it does because we see no memory leaks when the application closes. we´re not using a ref_ptr in the viewer because we had some problems with the deleting order of the widgets, we´ll try to find a way to use it and maybe it helps a little if you see something which you think is not right, please tell us Date: Tue, 6 Nov 2007 11:20:57 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] databasepageloader and composite viewer Hi David, I've had a quick check through View.cpp and the destructor doesn't do anything more than unref the Scene object that should be shared between each of your views, and as such shouldn't actually do anything to the DatabasePager directly. The same goes for CompositeViewer::removeView, it shouldn't change anything with the database pager directly. Do each of the View have their own GraphicsWindow? I wonder if this is where the problems stem from. Robert. On Nov 6, 2007 11:12 AM, David _ [EMAIL PROTECTED] wrote: Hi Robert we´re currently using OSG 2.2 under windows compiled with visual studio 2005 Date: Tue, 6 Nov 2007 09:01:07 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] databasepageloader and composite viewer Hi David, Which version of the OSG are you using? Robert. On Nov 5, 2007 9:40 AM, David _ [EMAIL PROTECTED] wrote: Hi We´re dealing with a MDI application with multiple views of the same scene, which is composed by some pagelod islands. we´re using the composite viewer in order to have an independent camera in every child window and it´s working fine. The problem comes when we want to delete one of these windows. For deleting a view we use the removeView method of the composite viewer in order to free the osgViewer, but, sometimes it kills the databasepageloader too which stops all the LOD switching stuff. This is not happening all the viewers, just with some of them. How can we avoid this (killing a view of the composite viewer without killing the LOD stuff)??? How can we check if the databasepageloader is gone and re-start it?? thanks in advance help would be really appreciated Express yourself instantly with MSN Messenger! MSN Messenger ___ 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 Express yourself instantly with MSN Messenger! MSN Messenger ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] removeChild not freeing memory
Yeah I verified through the debugger that the reference count reaches 0. However you may be correct about the memory release...all I've been using to check that is the Memory Used column of the task manager that Windows XP provides. The main reason that I thought the memory was not being freed was that in my program whenever I loaded and unloaded you could see small amounts of memory being released from iteration to iteration based off of some other pointers that were getting deleted, which is why I expected to see a memory drop after a removeChild call. I figured if I saw a memory drop after some other pointer deletions there would also be a memory drop after a removeChild. Is that incorrect? Thx a lot for the help. On 11/5/07, Paul Martz [EMAIL PROTECTED] wrote: Are you using a debugger to verify that the reference count reaches zero? If you have another ref_ptr referencing the top-level node, the reference count will not drop to zero and memory won't be freed. How are you inferring that memory isn't freed? Some operating systems only free memory back to the process rather than back to the OS, so the process size remains the same (it includes the size of freed memory, which is available for reallocation). -Paul -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *C C *Sent:* Monday, November 05, 2007 2:17 PM *To:* osg-users@lists.openscenegraph.org *Subject:* [osg-users] removeChild not freeing memory Hi all, This is a total noob question, but I must assume that I'm either doing something incorrectly or misunderstanding how removeChild works. I have a program that is loading/unloading model *.osg files on the fly. When I do a removeChild on the model's node, no memory seems to be released. Thus as I load/unload more models the memory used goes up, which will eventually lead to a crash. Just to try this on a simple scale, I went to the osgshadowtexture example since I knew that a readNodeFile call was made to load cessna.osg, and made some small modifications. In the main loop of the program I wait for about 500 iterations after the readNodeFile call, and then I remove all of the children from the node called model in the program. This obviously succeeds because if I continue running the example the default blue shows with all models removed. Unfortunately, no memory gets freed. Shouldn't the memory used go down after that though? Even if I wait for multiple iterations after the removal the memory used does not go down. Is there something blatantly wrong with what I'm doing? If so could you tell me what I need to do in order to free the memory that was taken up by the loading of the cessna.osg? Thanks in advance. -CC ___ 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] Scaling images truncates data
Hi, I'm trying to send float data beyond the range of [0, 1] to a texture. I set the texture and the image format to float. If the image size is power of two, things seems to be ok, but if the sizes are different it seems the the gluScaleImage command truncate the values in some manner (it's even not clamping everything above 1.0 to 1.0 and everything below 0 to 0, but some truncation that leaes only the fraction of the value). Any ideas how to prevent it from happenning? thanks, Guy ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Scaling images
ok, thanks, but the main question is why gluScaleImage destroy the data in the image and how do I prevent it. thanks, Guy. - Original Message - From: Robert Osfield [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, November 06, 2007 11:12 AM Subject: Re: [osg-users] Scaling images Hi Guy, If you hardware is capable of non power of two textures switch off the hint to resize non power of two textures: texture-setResizeNonPowerOfTwoHint(false); Robert. On Nov 6, 2007 5:48 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to send float data beyond the range of [0, 1] to a texture. I set the texture and the image format to float. If the image size is power of two, things seems to be ok, but if the sizes are different it seems the the gluScaleImage command truncate the values in some manner (it's even not clamping everything above 1.0 to 1.0 and everything below 0 to 0, but some truncation that leaes only the fraction of the value). Any ideas how to prevent it from happenning? thanks, Guy ___ 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] Scaling images truncates data
Please read my message from earlier today. On Nov 6, 2007 3:23 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to send float data beyond the range of [0, 1] to a texture. I set the texture and the image format to float. If the image size is power of two, things seems to be ok, but if the sizes are different it seems the the gluScaleImage command truncate the values in some manner (it's even not clamping everything above 1.0 to 1.0 and everything below 0 to 0, but some truncation that leaes only the fraction of the value). Any ideas how to prevent it from happenning? thanks, Guy ___ 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] CompileContexts problems
Hi Serge, I have no experience of using this feature under Windows so I really can't provide any direction. It could be a bug on the OSG side, it could be a bug in the OpenGL driver, I really couldn't say. Have you tried you app on other OS's other drivers? Robert. On Nov 6, 2007 3:44 PM, Serge Lages [EMAIL PROTECTED] wrote: Hi Robert and all, I am currently having a problem with the DatabasePager and the CompileContexts feature. (First of all I am using the SVN version under WinXP and Visual Express edition, with a 8600GTS graphical card and latest NVidia drivers). When I activate it (calling osg::DisplaySettings::instance()-setCompileContextsHint(true)), it seems that the DatabasePager mix some drawables and I have wrong objects at the wrong place. See the attached picture to better understand the problem. What is very weird is that the nodes I request are composed of transforms and a geode with the terrain geometry, and the request returns the correct transforms but an incorrect geometry. This problem occurs only if I activate the CompileContext, without it I can't reproduce it. I am also having another issue with the CompileContext, my application crash on exit with this error message : R6025 - pure virtual function call Any idea on how to fix these issues ? Thanks in advance. -- Serge Lages http://www.tharsis-software.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] CompileContexts problems
On 11/6/07, Robert Osfield [EMAIL PROTECTED] wrote: Hi Serge, I have no experience of using this feature under Windows so I really can't provide any direction. It could be a bug on the OSG side, it could be a bug in the OpenGL driver, I really couldn't say. Have you tried you app on other OS's other drivers? I have only Windows/NVidia computers to test right now. :/ I will try to look further where it comes from. But if you have any idea on where to investigate I would grantly appreciate. :) -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompileContexts problems
On Nov 6, 2007 4:24 PM, Serge Lages [EMAIL PROTECTED] wrote: I have only Windows/NVidia computers to test right now. :/ I will try to look further where it comes from. But if you have any idea on where to investigate I would grantly appreciate. :) I'm afraid I don't know where to start, this is really an type of problem that requires debugging on the client machine. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] HDR - RGB8 vs RAW
Thanks for your reply David. My results seem unaffected by whether I use an ivec4 or the float version of vec4. I used ivec4 because the author of renderwriterhdr.cpp left commented shader code for the conversion from RGBE to float with the ivec4. Check out readerwriterhdr.cpp line 80 to see what I'm talking about. I am in fact using RGBA8 textures. At first I suspected that no filtering was being applied so I tried using osg::Texture::NEAREST with the RGB8 LDR texture for comparison. Although it became more blocky looking as expected, it still look reasonable. This is in sharp contrast to the RAW texture which shows dramatic artifacts. For quick reference: RGB8: http://img162.imageshack.us/img162/8467/hdrrgb8rn7.jpg RAW: http://img206.imageshack.us/img206/8574/hdrrawza9.jpg Any insight is appreciated, Michael Guerrero ( Delta3D ) From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Spilling Sent: Tuesday, November 06, 2007 1:59 AM To: OpenSceneGraph Users Subject: Re: [osg-users] HDR - RGB8 vs RAW Michael - With the option RGB8 ( osgDB::ReaderWriter::Options( RGB8 ) ) o The image is converted to LDR before being stored in a texture. Doesn't that defy the whole point of being HDR to begin with? Yes, although it allows you to at least read in RGBE / Radiance format files, so that you can use HDR assets in LDR pipelines. That's one thing we fall back to - we generate and ship all our assets in HDR, but depending on the eventual hardware, it may fallback to an LDR load if the card can't handle it. The problem is that my rendering results are different. Firstly, why ivec4 in the textureRGBE code? If you try just vec4 does it get better? I would have thought you wanted floats here... Secondly, could this be an interpolation issue? Is the texture format RGBA8 or 32F (I would have thought that you would be using RGBA8, but you never know). Most of the hardware we support doesn't support LINEAR interpolation on float textures, so we have to do it by hand, as it were. Hope that helps, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGEdit 0.7.0 RC1
El lun, 05-11-2007 a las 12:19 -0500, Jeremy L. Moles escribió: On Mon, 2007-11-05 at 12:33 +0100, Harald A. wrote: HI, great to hear that a new version of osgedit is comming. here my evaluatoin report for the current rc1 Build was not realy easy, I really love the effort that goes into OSGEdit, but I can't help but agree with this. I'm more than competent when it comes to building software and using a development environment, and I just didn't have the energy required to fix the build system to make it work for me... I do not have installed my developmentstuff systemwide, and scons ignored my enviroment vars (LIBRARY_PATH, CPLUS_INCLUDE_PATH C_INCLUDE_PATH and also (in parts) CPATH) The migration from automake/autoconf to SCons have lost a lot of standard things like these that just worked automagically, and I am too used to install things system-wide (making my own debian packages if needed). Could you provide some pointer to documentation on the standard building variables? I will try to support them before the final release. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGEdit 0.7.0 RC1
On Tue, 2007-11-06 at 20:11 +0100, Rubén López wrote: El lun, 05-11-2007 a las 12:19 -0500, Jeremy L. Moles escribió: On Mon, 2007-11-05 at 12:33 +0100, Harald A. wrote: HI, great to hear that a new version of osgedit is comming. here my evaluatoin report for the current rc1 Build was not realy easy, I really love the effort that goes into OSGEdit, but I can't help but agree with this. I'm more than competent when it comes to building software and using a development environment, and I just didn't have the energy required to fix the build system to make it work for me... I do not have installed my developmentstuff systemwide, and scons ignored my enviroment vars (LIBRARY_PATH, CPLUS_INCLUDE_PATH C_INCLUDE_PATH and also (in parts) CPATH) The migration from automake/autoconf to SCons have lost a lot of standard things like these that just worked automagically, and I am too used to install things system-wide (making my own debian packages if needed). Could you provide some pointer to documentation on the standard building variables? I will try to support them before the final release. Thanks. Sure. I'm anxious to get it working with as little effort as possible... however, if my work makes it easier in the long run then I'm more than willing to contribute. I can try my hand at it and submit a patch generated by svn diff--is this acceptable? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG_MAX_TEXTURE_SIZE
Hi Robert -- I'm in the middle of writing an environment variable reference, and I'm a little confused by OSG_MAX_TEXTURE_SIZE -- what its for, when it has an effect, etc. As near as I can tell, it overrides the _maxTextureSize member variable for both Texture and Font, but only if its smaller than the current value (which, I assume, comes from OpenGL). However, _maxTextureSize itself only appears to be referenced if non-power of 2 textures are not available, in which case it's used in the computation to determine the maximum power of 2 dimension for the texture during resize. Am I missing something here? Why would a user ever set this? Thanks. Any additional info will help make this a better document. :-) Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com http://www.skew-matrix.com/ 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DatabasePager -- dead code?
Hi Robert -- DatabasePager has a method getMinimumTimeAvailableForGLCompileAndDeletePerFrame(), which returns the value of the variable _minimumTimeAvailableForGLCompileAndDeletePerFrame. As far as I can tell, neither the function nor the variable are ever referenced in any meaningful way -- they have zero effect on the code. Is this a work in progress, or is it deprecated and can be removed in a future release? Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com http://www.skew-matrix.com/ 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DepthBuffer grid
Hi, To start, I am grabbing the depthBuffer from the video card using the readPixel (0, 0, width, height, GL_DEPTH_COMPONENT, GL_FLOAT) method. First, I will create a camera that will be positioned above the scene's geometry and point straight down. I'd like to take the data from the depth buffer and transfer it into memory. Next, using the data, I'd like to create a grid and translate all the depths to height above geometry. If I have an osg::Image *depth_buffer, I believe that: depth_buffer-data() takes the depthbuffer from the video card into memory. How can I store all the data into an array, iterate through it, and convert the normalized values into meaningful height values? This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information. No one else may read, print, store, copy, forward or act in reliance on it or its attachments. If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DepthBuffer grid
Hi, To start, I am grabbing the depthBuffer from the video card using the readPixel (0, 0, width, height, GL_DEPTH_COMPONENT, GL_FLOAT) method. First, I will create a camera that will be positioned above the scene's geometry and point straight down. I'd like to take the data from the depth buffer and transfer it into memory. Next, using the data, I'd like to create a grid and translate all the depths to height above geometry. If I have an osg::Image *depth_buffer, I believe that: depth_buffer-data() takes the depthbuffer from the video card into memory. How can I store all the data into an array, iterate through it, and convert the normalized values into meaningful height values? You'll need to write code to do this. A simple nested for loop should do the trick. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PickHandler Class on Quick Start Guide
Hi, there, Paul. I have tried to adapt your PickHandler class to solve my specific problem, but I couldn't. Please, help me out. Honestly I haven't completely understand it (when you check for Intersections and stuff like this) but I imagined that all I had to do was to put my own methods after the if (_selectedNode.valid()) condition. Well, let me elaborate a little bit more on my software's current situation. There is a Point class, that is osg::MatrixTransform's daughter. Each Point's instance has a geode child, which carries a sphere with a certain color. What I need to do is change the sphere's color after this shape was selected by mouse picking. I've tried creating a method changeColor, that belonged to the Point class, and I've made the PickHandler a daughter of that class, so that it would have access to the method. Specifics of the method aside, what do I have to do to call that method? Is it simply by writing _selectedNode-changeColor(); in the above mentioned condition's nest? That doesn't seem to work very well Do I have to declare _selectedNode as a global variable before the definition of the class? If yes, what kind o pointer would it be? By answering this, you'll make someone eternally grateful to you! Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PickHandler Class on Quick Start Guide
Hi Renan -- Sounds like maybe you don't have the complete source? You can download it from here: http://www.skew-matrix.com/OSGQSG/index.html You say calling the method in _selectedNode doesn't seem to work very well but you haven't told me how it fails so that's tough to diagnose. Does it compile? If so, does it crash because the pointer is NULL? You said your sphere was a shape. Do you mean a ShapeDrawable? If so, I believe the Intersector classes are limited to picking Geometry classes... not sure, check the code. Hope that helps, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com http://www.skew-matrix.com/ 303 859 9466 _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renan Mendes Sent: Tuesday, November 06, 2007 4:15 PM To: OpenSceneGraph Users Subject: Re: [osg-users] PickHandler Class on Quick Start Guide Hi, there, Paul. I have tried to adapt your PickHandler class to solve my specific problem, but I couldn't. Please, help me out. Honestly I haven't completely understand it (when you check for Intersections and stuff like this) but I imagined that all I had to do was to put my own methods after the if (_selectedNode.valid()) condition. Well, let me elaborate a little bit more on my software's current situation. There is a Point class, that is osg::MatrixTransform's daughter. Each Point's instance has a geode child, which carries a sphere with a certain color. What I need to do is change the sphere's color after this shape was selected by mouse picking. I've tried creating a method changeColor, that belonged to the Point class, and I've made the PickHandler a daughter of that class, so that it would have access to the method. Specifics of the method aside, what do I have to do to call that method? Is it simply by writing _selectedNode-changeColor(); in the above mentioned condition's nest? That doesn't seem to work very well Do I have to declare _selectedNode as a global variable before the definition of the class? If yes, what kind o pointer would it be? By answering this, you'll make someone eternally grateful to you! Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PickHandler Class on Quick Start Guide
Hi, Paul. I do have the complete version. You had already given me the address to download some time ago. Well, I have just made some tests. I've create a simple method (just to print a prompt message) when the node was mouse picked, but it didn't work. Do you think that's because my Point class instances are matrix and not shapes? How can I adapt your code for that objective? Thanks again. Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PickHandler Class on Quick Start Guide
If you're trying to pick a Drawable that isn't a Geometry, unmodified OSG won't pick it. You'll need to derive your own Intersector class to perform picking on custom Drawables. -Paul _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renan Mendes Sent: Tuesday, November 06, 2007 4:52 PM To: OpenSceneGraph Users Subject: Re: [osg-users] PickHandler Class on Quick Start Guide Hi, Paul. I do have the complete version. You had already given me the address to download some time ago. Well, I have just made some tests. I've create a simple method (just to print a prompt message) when the node was mouse picked, but it didn't work. Do you think that's because my Point class instances are matrix and not shapes? How can I adapt your code for that objective? Thanks again. Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Tank Traversing across terrain
Hi, I'm trying to make a tank move across a terrain. The terrain is created by reading the image files of Puget Sound that i downloaded from http://www.cc.gatech.edu/projects/large_models/ps.html as mentioned in the quick step-by-step guide for OsgDem. Then I setElevationLayer and setColorLayer to an instance of osgTerrain::TerrainNode. The terrain seems to display fine. I added a "tank" node and attached it to a PositionAttitudeTransform. To make the "tank" move, it is set to a callback whereby it sets the new position of the tank to make it look like it is moving in a circle. The callback needs to check the elevation of the terrain so that the tanks "moves" according to terrain, so to do this I used the function "computeTerrainIntersection" from the example osgparticleeffects. Problem is, computeTerrainIntersection doesn't seem to be able to detect the elevation. I stepped through this function and it seems that osgUtil::IntersectVisitor doesn't seem to get any "hits". I did notice however that if I build the terrain by setting its elevation using osgHeightField as is used in the example osgparticleeffects, the elevation can be detected just fine. How do I make the function "computeTerrainIntersection" return me the correct elevetion? Thanks in advance for your help. Weng Heng ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Scaling images
ok, thanks. - Original Message - From: Robert Osfield [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, November 06, 2007 6:03 PM Subject: Re: [osg-users] Scaling images On Nov 6, 2007 3:30 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ok, thanks, but the main question is why gluScaleImage destroy the data in the image and how do I prevent it. For info on gluScaleImage supports you'll need to read up on the GLU implementation you have installed. As for preventing, well this is a GLU issue, and not something the OSG community can do anything about. The best I can recommend is to NOT use gluScaleImage by using non power of two texture support as mentioned in my previous email. 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