Re: [osg-users] New way to workaround MSVC False Positives
I mean memory leak reports. Check out the previous posts : http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-July/014323.html http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg22588.html Can 2009/3/26 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil Thanks for the info. I'm using XP SP3, MSVC 2008. Perhaps you could elaborate on what you mean by false positives or what the symptoms are that you're seeing... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Can T. Oguz Sent: Thursday, March 26, 2009 10:41 AM To: OpenSceneGraph Users Subject: Re: [osg-users] New way to workaround MSVC False Positives Sorry, forgot to mention : Vista SP1, MSVC 2008. Have you tried it? Can 2009/3/26 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil What version of Visual Studio are you using? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Can T. Oguz Sent: Thursday, March 26, 2009 10:25 AM To: OpenSceneGraph Users Subject: [osg-users] New way to workaround MSVC False Positives Hi OSG Users, I think I've found an easier work around to overcome the MSVC false positives. I had been using the prescription at http://www.vis-sim.com/3dsceneBB/viewtopic.php?t=1027 to avoid the leak false positives for my desktop application and it worked perfectly but now I've packed the source into an MFC ActiveX and I saw that all leaks came back. So I've removed all the additional dependencies and linked the dlls by the directives and all the false positives are gone. I've tested the leak detection and it worked ok. The new workaround is : . Goto project settings. In there, make the following changes for theDebug build. . General-Use of MFC-Use Standard Windows Libraries. . Add _AFXDLL to C/C++-Preprocessor-Preprocessor Definitions. . Add the following pragma directives to stdafx.h right after the MFC includes: #ifdef _DEBUG #pragma comment(lib, OpenThreadsd.lib) #pragma comment(lib, osgd.lib) #pragma comment(lib, osgDBd.lib) #pragma comment(lib, osgUtild.lib) #pragma comment(lib, osgGAd.lib) #pragma comment(lib, osgViewerd.lib) #pragma comment(lib, osgTextd.lib) #pragma comment(lib, osgSimd.lib) #else #pragma comment(lib, OpenThreads.lib) #pragma comment(lib, osg.lib) #pragma comment(lib, osgDB.lib) #pragma comment(lib, osgUtil.lib) #pragma comment(lib, osgGA.lib) #pragma comment(lib, osgViewer.lib) #pragma comment(lib, osgText.lib) #pragma comment(lib, osgSim.lib) #endif #pragma comment(lib, opengl32.lib) #pragma comment(lib, glu32.lib) Regards, Can ___ 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] osgparticle problem
Hi Su Hu, Do you mean the you are using osgParticle::PrecipitationEffect to render the rain and snow, or do you mean you've modified the osgparticle example? The warnings look like graphics context setup issue, do other examples work fine? Robert. 2009/3/27 su hu ttts...@gmail.com Hi all, I use osgpartilce to simulate rain and snow in our scene. I used osg2.2 before and everything was right. Now I use osg2.8. Rain or snow can not be drawn(only some points are drawn) and fps is very very low. I ran osgparticle.exe and get information as attached image1(particle.jpg). After execution of my application or osgparticle.exe , whole system is very slow. Then I open the control panel of ATI, I get a warning as attached image2(warning.jpg). My graphics card is ATI X1600, OS is WinXP professional. Thanks for your help. Su Hu ___ 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] osgWidget memory leak
Hi, I notice that calls like EventInterface::addCallback(new Callback(...)) would cause memory leak. It use a list to manage the callback objects, and the list item is osg::observer_ptrCallback, but not something like osg::ref_ptrCallback. And observer_ptr doesn't do ref/unref to Reference objects like what ref_ptr does. So the callback objects can't be released automaticly. -renliwei___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FLTK2 port of osgviewerFLTK
Hi Michael, Does the code still work under FLTK1.x? Has FLTK2 finally been officially release yet? Robert. 2009/3/27 Michael Bosse' metis...@gmail.com As part of something I am working on in school, I needed to use an osgViwer::Viewer inside of an fltk2 GlWindow. I modified / updated the existing example osgviewerFLTK.cpp to work with the most recent svn version of fltk2. The code is included with this email, hopefully all that you should have to do is change the library dependencies in your build process and it should build without error. For the record, here is the string I needed to make it build: g++ osgviewerFLTK.cpp -losg -losgViewer -losgDB -losgGA -lfltk2 -lfltk2_gl -lX11 -lXi -lXinerama -lXft -lpthread -lm -lXext -I/usr/local/include -o osgviewerFLTK If you want the changes, feel free to use them, they built okay on my machine with the latest svn version of fltk2. Michael A Bosse' - The desire for safety stands against every great and noble enterprise. - Tacitus Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety. - Benjamin Franklin ___ 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] setProjectionMatrix and FOV
Hello osg users, I am trying to set the camera perspective projection to 'near' orthogonal. I achieve desired projection by setting the FOV to some low number (1.0). When the projection matrix is changed in this way, the scene is 'zoomed-in'. This means, that MatrixManipulator::home does also zoom-in and the scene does not fit to the view (using TrackBallManipulator). It is clear what happens, but how can I prevent the 'zooming' in the best way? I could apply some scaling factor to the MatrixManipulator, but this seems to me not a clean solution... many thanks, Tomas ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FLTK2 port of osgviewerFLTK
Robert Osfield wrote: Hi Michael, Does the code still work under FLTK1.x? Has FLTK2 finally been officially release yet? Robert. FLTK 2 has not been officially released. It has been under development for at least 4 years, with no end in sight. Version 1.1.x is stable and the recommended version to use. The FLTK developers are working more on their 1.3.x branch, which adds UTF8 and (at least until recently) a tree browser widget. I would love to have the browser widget for my application because I'm using an unsupported one from a third party at present, so eventually I may move to 1.3.x, but even that is not yet API -stable. Originally I was also using FLTK 2 because of the built-in tree browser widget and the fltk namespace, but it did not ever work well with my application on the Mac, so I started over with FLTK 1.1.x. I do not recommend having any dependency on FLTK 2.x because it is not stable. For a school project FLTK2 is probably fine. -Eric ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] importing shaders
I would recommend reading the following to get I idea of what OSG has to offer, as it has a LOT to offer NEWS.txt in the source root direcotry OSG Quick Start Guide ( pdf version is free ) http://www.osgbooks.com/books/osg_qs.html OSG Reference Manual ( pdf version is free ) http://www.osgbooks.com/books/osg_refman22.html Visiting http://www.openscenegraph.org/projects/osg/wiki/Support and following the links to examples, tutorials, reference guides etc Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Julia Guo Sent: Thursday, March 26, 2009 9:14 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] importing shaders hi, That is encouraging to know OSG supports shaders natively (now I saw the shader examples). I have got the 3DS exporter working now. Out of 133 examples I can only find 6 that use CompositeViewer at all Just 6/133 - I take that criticism back then! Many of the examples I looked at coincidentally supported a composite view. Julia -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9340#9340 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Differences between osgconv at 1.2 and 2.2.0
Hi Paul, Thanks for the reply. I'm using OSGCONV to convert FLT file to IVE. I will try bumping up the notify level and see if that provides any clues. I will also try v2.8. Thanks again, -Tom -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9355#9355 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] setProjectionMatrix and FOV
You can either use a true orthographic projection, or you can set the TrackballManipulator home position so that the viewpoint is further away. If you are really trying to create a near orthographic (but not a true orthographic) projection, then setting the eye distance very far away is the right approach. At my former employer, we used to set the FOV to about 10 degrees to mimic the angle actually subtended by our render window on the screen. (10 degrees is not as extreme as what you're doing, but it's still pretty extreme compared to most 3D apps, and approaches orthographic.) But then we needed to see an entire aircraft in that window, so we had to set the viewpoint quite far away to get the entire aircraft into that 10 degree field. You'll need to do the same. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomas Hnilica Sent: Friday, March 27, 2009 5:19 AM To: OpenSceneGraph Users Subject: [osg-users] setProjectionMatrix and FOV Hello osg users, I am trying to set the camera perspective projection to 'near' orthogonal. I achieve desired projection by setting the FOV to some low number (1.0). When the projection matrix is changed in this way, the scene is 'zoomed-in'. This means, that MatrixManipulator::home does also zoom-in and the scene does not fit to the view (using TrackBallManipulator). It is clear what happens, but how can I prevent the 'zooming' in the best way? I could apply some scaling factor to the MatrixManipulator, but this seems to me not a clean solution... many thanks, Tomas ___ 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] Differences between osgconv at 1.2 and 2.2.0
Then when you said you were using the same models, I guess you meant you were using the same source models, but in your old app you used 1.2 ive files, and in the new app you are using 2.2 ive files. There's an easy way to verify whether osgconv is the source of your problem or not (and I suspect it isn't): Just use the 1.2 ive files with your 2.2 app. I'm not sure it will work, but it's worth a try. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tom Poehlman Sent: Friday, March 27, 2009 7:35 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Differences between osgconv at 1.2 and 2.2.0 Hi Paul, Thanks for the reply. I'm using OSGCONV to convert FLT file to IVE. I will try bumping up the notify level and see if that provides any clues. I will also try v2.8. Thanks again, -Tom -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9355#9355 ___ 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] Windows 7 beta: The binary is not a valid Windows image.
Hi all, I have been running Windows 7 beta for a few weeks now at home (being the eternal early adopter at heart :-) ), and I just tried to compile and run OSG on it. Everything seems fine in debug, but I'm hitting one little snag in release mode. The exact problem is discussed at length on this page: http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/01/24/the-case-of-the-corrupt-pe-binaries.aspx (note that I'm using Visual Studio 2005 SP1, but the problem is exactly the same) The short version is that after linking executables, when mt.exe is called to include the manifest into them, the executables somehow get corrupted (see the link above for the exact explanation) and I get the following error message: mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file executable file name. The binary is not a valid Windows image. This happens for every executable, every time. According to that same link above, there are two ways to work around this apparent bug: 1. Enable /DYNAMICBASE in the linker options (the bug happens when using /DYNAMICBASE:NO, which apparently is the default in our case) 2. Include an empty RC file in each project. I'd like to add /DYNAMICBASE into the CMake config (perhaps only for Windows 7 if that can be detected, and perhaps conditionally so we can remove the workaround when/if the bug gets fixed), but I wanted to get opinions. What do others think would be the best course of action (other than waiting for the official release of Windows 7 ;-) )? Are there any drawbacks to specifically linking with the /DYNAMICBASE option? I'm not familiar with this option, and the MSDN page does not have any recommendations of when to use it and when not to, it just describes it. http://msdn.microsoft.com/en-us/library/bb384887.aspx If I get no opinions I'll just submit a modified CMakeLists.txt that includes /DYNAMICBASE. Thanks in advance, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Animating vertices in a Geode
Hi Laurence, sorry for the delay i tried your example it works perfectly here with the last svn. I guess you have maybe a problem with your library like compiling in debug and linking with release or something like that, on windows it often the problem. Cheers, Cedric Laurence Muller wrote: Hi Cedric, For some reason Outlook webmail wrapped the cpp file into a binary format. I have included a new version of the demo file with the timings fixed. It uses: const osg::FrameStamp* fs = nv-getFrameStamp(); and fs-getSimulationTime(); to calculate the current time. (Just like osgAmimation) Kind Regards, - Laurence Cedric Pinson wrote: div class=moz-text-flowed style=font-family: -moz-fixedHi Laurence, I dont know what the winmail.dat in attachement is, i am not on windows. I will try tomorrow your main.cpp in previous mail and with the svn to be sure osgAnimation works fine with the svn. About time in callback you can read the code of some updatecallback in osgAmimation. It will give you an example how to manage time. Cheers, Cedric Muller, L.Y.L. wrote: Hi Cedric, hmm for some reason the post of Guy wasn't added to the right thread in the maillist ( http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-March/025337.html ) I tried out his suggestion and got something like a self-deleting callback working (Demo file is attached). I just need to figure out how to measure the time between the callback calls. For now it just increments the 'time' value with a fixed number. It would ofcourse be nicer if I could use an exciting class that handles the scheduling/timeline. About your request, I do not know how to create a stacktrace here with Visual Studio 2005, but that would require the debug libraries of OSG right? I could try stepping through the code with the debugger later this week and see where it locks up/crashes. I also noticed that there are some other issues with the (animation?) demos. After building the OSG 2.9.1 package (svn), I tried out a few of the animation demos. Running the demos is not a problem, but if you try to close them, it usually result in a crash. I'm not sure if its the osgAnimation part thats causing it or the viewer. Kind regards, - Laurence P.S.: Sorry about the previous reply, I made a mistake while attaching the file... ;\ -Original Message- From: Cedric Pinson [mailto:morni...@plopbyte.net] Sent: Mon 3/23/2009 4:27 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Animating vertices in a Geode Hi Laurence, Before i dig into can you give the stacktrace to have an idea where it crashes ? Cheers, Cedric Laurence Muller wrote: Hi Cedric, I tried to create a simple project based on the 'osganimationmorph' demo as Robert Osfield suggested. Instead of loading the geometries from a *.osg file, I define two new geometries (both quads but on a different position). These geometries are added as a drawable to the MorphGeometry. However, for some reason OSG doesn't allows me to swap the old geom0 and geom1 geometry objects with the ones I create. The application crashes when you try to run it. Any suggestions? Kind regards, - Laurence Cedric Pinson wrote: div class=moz-text-flowed style=font-family: -moz-fixedHi Laurence, You can easily do it with morphgeometry: - define two geometry with morphgeometry - use an custom update callback that use an ease motion to control the ratio of geometry to use Would be great to make an example with it, it will help others users. Cheers, Cedric Laurence Muller wrote: Hi, In the application I am working on, I am trying to create a smooth (transition) animation on the vertices inside an object. Example: I have included an illustration to make my problem a bit more clear. The current scene contains one geode with a geometry attached. The geometry is filled with 7 quads (4 vertices per quad) and is illustrated as red dots in the picture. (The 'edges' are stored in a separate geode) The application allows users to select a specific layout (radial, force based, etc) for the quads. In the current implementation this change happens immediately. (It updates the vertex array with new values and uses the dirty() call on the vertex array). On the OSG wiki page I found some information about animating objects in the scene graph. http://www.openscenegraph.org/projects/osg/wiki/Community/NodeKits/osgAnimation http://www.robertpenner.com/easing/easing_demo.html However, it seems like this will only work on geode level (by modifying the Matrix or PositionAttitudeTransformation). Another problem with this method is that it seems that you need to create a predefined animation. In my case the new position of a vertex will depend on the current position (and the animation only needs to be used once). Question: - Is there a way to use the osgAnimation functions on the vertex array and is it possible to use it with the transition
Re: [osg-users] VRML Normal Issue
I think we are agreeing with each other. I agree the simplest thing for a user is to specify normals in the file for the best control over shading. And I agree that in order to support the crease angle property, we will have to duplicate vertices. Despite the crease angle being a kludge, I do think that it should be implemented. That is why I submitted the code, in case anyone wanted to implement the crease angle, I think that would be how to do it. Before, you said that duplicating vertices would lead to artifacts. Can you elaborate on this? I don't see how it would when we are in the sharp edge case, and we give it a proper normal, and point the proper face index at the new vertex. Thanks, -Ben -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jan Ciger Sent: Thursday, March 26, 2009 5:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VRML Normal Issue -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben Axelrod wrote: Can normals per primitive and normals per vertex both be used in a single shape? Not that I am aware of. If not, the only way I can imagine having a shape with some smooth and some sharp edges is if there is one normal per vertex per face. Just like the diagram in the VRML spec shows, if a vertex has 2 faces connected to it, it needs 2 normals for a sharp edge, and either 1 or 2 for a smooth edge. That's right, however, if you do not specify the vertex normals explicitly in the model, the vertex normals are calculated from the *face normals* using the crease angle. If the face normals have an angle smaller than the crease angle, the vertex normals will be an average of the two face normals. For sharp edges you will indeed have to duplicate the vertices to accommodate the different face normals (as explained here: http://www.songho.ca/opengl/gl_vertexarray.html) On the other hand, if you want only sharp edges, you can bind normals per face and save yourself this whole escapade. Honestly, it is simpler to export the vertex normals from whatever tool you are using to produce the data than to fidget with the crease angle - it is only a kludge to let the program guess the model author's intentions. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJy+5tn11XseNj94gRAvHGAKCZxOcaPU9FnL73O06533yTtpSalwCg6GFc Kz6Y4w31hZgcHRjbDyna/jY= =dKWV -END PGP SIGNATURE- ___ 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] Problems shutting down Composite Viewer/View/Custom drawables
Hi all, I've been chasing an error in my code for many, many days that I'm hoping that someone can help me track down. I'll try to explain my application as best I can. I'm using a composite viewer to load multiple views. In each view, I'm loading a database scene (generally a TXP database) and overlaying OpenGL nodes that I load dynamically and add as drawables to the scenegraph. I've created classes to encapsulate the composite viewer, view, and scene nodes. For instance, I have a class that contains a composite viewer member variable; this class then creates multiple View classes that each contain an osgViewer::View member variable. Each view then loads scene nodes as specified in a configuration file. These nodes are contained in separate libraries and are loaded as drawables (I've created a class derived from osg::Drawable and overwrite the drawImplementation method for custom drawing). Everything works great when creating the viewer, view, nodes, and even executing. The problem comes when I try to destroy/close the window. My attempted process to close is that I (1) set a flag on a render thread to stop calling viewer-frame (very similar to setDone(true)); (2) destroy the loaded drawables and free their associated libraries; (3) destroy the view, and thus it's associated camera and graphics context; and (4) destroy the composite viewer. I use reference pointers in every case except for the composite viewer (although I've tried a reference pointer for it as well, but still get the same result). When trying to follow the above process, the application crashes in the Node::releaseGLObjects method at line 523, if (_updateCallback.valid()) _updateCallback.releaseGLObjects(state). I also noticed during a debug walkthrough that the drawables drawImplementation method (and thus the custom drawable's own custom drawing methods) are still being called after the render thread has been stopped and destroyed. So, some of my many questions are: (1) Is there a preferred/required means or order for shutting down a composite viewer (and it's child nodes)? (2) Separately, but possibly related ... I create a camera callback function to update the camera position per shared memory variables. I'd like to destroy that callback function appropriately. But, in doing so, how do I reset the camera's callback function such that it's not called once the custom callback function is destroyed? (3) What's the appropriate means of stopping the rendering? I thought that if viewer-frame() wasn't getting called, the drawImplementation method of the drawables would no longer be called, so I could then free those libraries. But, unfortunately, they're still being called even though frame() is no longer called. And thus, the libraries are trying to be freed when the viewer is still trying to draw them. I am running multithreaded. I'm using VS 2008 SP1 on Windows XP and Vista. If anyone has any tips, pointers, something to point me in the right direction before I end up throwing the computer through the window, I'd greatly appreciate it. I hope I've provided enough information. Thanks so much in advance. Chuck ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems shutting down Composite Viewer/View/Custom drawables
Hi all, I forgot to mention in my long-winded post that I'm using OSG 2.8.0. chuck -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Cole, Charles E. (LARC- B702)[RAYTHEON TECHNICAL SERVICES COMPANY] Sent: Friday, March 27, 2009 12:51 PM To: OpenSceneGraph Users Subject: [osg-users] Problems shutting down Composite Viewer/View/Custom drawables Hi all, I've been chasing an error in my code for many, many days that I'm hoping that someone can help me track down. I'll try to explain my application as best I can. I'm using a composite viewer to load multiple views. In each view, I'm loading a database scene (generally a TXP database) and overlaying OpenGL nodes that I load dynamically and add as drawables to the scenegraph. I've created classes to encapsulate the composite viewer, view, and scene nodes. For instance, I have a class that contains a composite viewer member variable; this class then creates multiple View classes that each contain an osgViewer::View member variable. Each view then loads scene nodes as specified in a configuration file. These nodes are contained in separate libraries and are loaded as drawables (I've created a class derived from osg::Drawable and overwrite the drawImplementation method for custom drawing). Everything works great when creating the viewer, view, nodes, and even executing. The problem comes when I try to destroy/close the window. My attempted process to close is that I (1) set a flag on a render thread to stop calling viewer-frame (very similar to setDone(true)); (2) destroy the loaded drawables and free their associated libraries; (3) destroy the view, and thus it's associated camera and graphics context; and (4) destroy the composite viewer. I use reference pointers in every case except for the composite viewer (although I've tried a reference pointer for it as well, but still get the same result). When trying to follow the above process, the application crashes in the Node::releaseGLObjects method at line 523, if (_updateCallback.valid()) _updateCallback.releaseGLObjects(state). I also noticed during a debug walkthrough that the drawables drawImplementation method (and thus the custom drawable's own custom drawing methods) are still being called after the render thread has been stopped and destroyed. So, some of my many questions are: (1) Is there a preferred/required means or order for shutting down a composite viewer (and it's child nodes)? (2) Separately, but possibly related ... I create a camera callback function to update the camera position per shared memory variables. I'd like to destroy that callback function appropriately. But, in doing so, how do I reset the camera's callback function such that it's not called once the custom callback function is destroyed? (3) What's the appropriate means of stopping the rendering? I thought that if viewer-frame() wasn't getting called, the drawImplementation method of the drawables would no longer be called, so I could then free those libraries. But, unfortunately, they're still being called even though frame() is no longer called. And thus, the libraries are trying to be freed when the viewer is still trying to draw them. I am running multithreaded. I'm using VS 2008 SP1 on Windows XP and Vista. If anyone has any tips, pointers, something to point me in the right direction before I end up throwing the computer through the window, I'd greatly appreciate it. I hope I've provided enough information. Thanks so much in advance. Chuck ___ 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] Problems shutting down Composite Viewer/View/Custom drawables
Hi Charles, My attempted process to close is that I (1) set a flag on a render thread to stop calling viewer-frame (very similar to setDone(true)); (2) destroy the loaded drawables and free their associated libraries; (3) destroy the view, and thus it's associated camera and graphics context; and (4) destroy the composite viewer. I use reference pointers in every case except for the composite viewer (although I've tried a reference pointer for it as well, but still get the same result). Just wondering, if you're using ref_ptrs, why don't you just let the CompositeViewer's ref_ptr go out of scope (or delete the object that has the ref_ptrCompositeViewer) and be done with it? That should cascade down, destroying the views, then each view's scene graph. And if your custom drawables do the right thing in their destructors, that should be taken care of too. You shouldn't have to manage destruction order yourself. Perhaps I'm missing something here, but that generally just works. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems shutting down Composite Viewer/View/Custom drawables
Hi J-S, When I referred to destroy, what I'm doing is calling 'delete' on the classes that contain the ref_ptrs. For instance, I call delete on my view class, and in the view class' destructor, I (eventually) call delete on the drawables. So I'm in effect doing what you're saying, with the exception of the class containing the composite viewer. I'll change some code around to reflect that and see how it goes. Thanks. chuck -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Friday, March 27, 2009 1:45 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Problems shutting down Composite Viewer/View/Custom drawables Hi Charles, My attempted process to close is that I (1) set a flag on a render thread to stop calling viewer-frame (very similar to setDone(true)); (2) destroy the loaded drawables and free their associated libraries; (3) destroy the view, and thus it's associated camera and graphics context; and (4) destroy the composite viewer. I use reference pointers in every case except for the composite viewer (although I've tried a reference pointer for it as well, but still get the same result). Just wondering, if you're using ref_ptrs, why don't you just let the CompositeViewer's ref_ptr go out of scope (or delete the object that has the ref_ptrCompositeViewer) and be done with it? That should cascade down, destroying the views, then each view's scene graph. And if your custom drawables do the right thing in their destructors, that should be taken care of too. You shouldn't have to manage destruction order yourself. Perhaps I'm missing something here, but that generally just works. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.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] Problems shutting down Composite Viewer/View/Custom drawables
Hi Charles, When I referred to destroy, what I'm doing is calling 'delete' on the classes that contain the ref_ptrs. For instance, I call delete on my view class, and in the view class' destructor, I (eventually) call delete on the drawables. So I'm in effect doing what you're saying, with the exception of the class containing the composite viewer. I'll change some code around to reflect that and see how it goes. One thing you need to be careful of when deriving classes from OSG base classes which themselves derive from osg::Referenced ... In most cases, the destructors of those classes should be protected. Since they're normally protected already (as in osg::Object, osg::Drawable, etc) you shouldn't expose them in public scope in your derived class, which would allow them to be (erroneously) deleted at any time by the application instead of being deleted automatically when their ref count goes down to 0. I've had a similar problem once, which was being caused by a double-delete. I was manually deleting a custom drawable or node (I can't remember) and then since it was still in the scene graph, it was being deleted when the viewer went out of scope too. In general, trust ref_ptr to manage anything derived from osg::Referenced. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Discovering displays on X11 using Xinerama
Is there any interest in supporting Xinerama calls to determine what the resolutions of monitors are? Right now, if say Twinview is used on X11 for an Nvidia card, and more than one monitor is hooked up, osg applications (such as osgviewer) do not read the resolution correctly. I'm looking at possible solutions, and was wondering if anyone else had comments on the issue. -Eric ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FLTK2 port of osgviewerFLTK
I submitted it mostly in case there was anyone out there who wanted to use that example with fltk2, not really my intent to replace the existing example. FLTK2 is (and probably will be for a long time) in flux. For my purposes fltk2 is working correctly, but I wouldn't recommend it for production purposes. On Fri, Mar 27, 2009 at 8:26 AM, Eric Sokolowsky esok@gmail.com wrote: Robert Osfield wrote: Hi Michael, Does the code still work under FLTK1.x? Has FLTK2 finally been officially release yet? Robert. FLTK 2 has not been officially released. It has been under development for at least 4 years, with no end in sight. Version 1.1.x is stable and the recommended version to use. The FLTK developers are working more on their 1.3.x branch, which adds UTF8 and (at least until recently) a tree browser widget. I would love to have the browser widget for my application because I'm using an unsupported one from a third party at present, so eventually I may move to 1.3.x, but even that is not yet API -stable. Originally I was also using FLTK 2 because of the built-in tree browser widget and the fltk namespace, but it did not ever work well with my application on the Mac, so I started over with FLTK 1.1.x. I do not recommend having any dependency on FLTK 2.x because it is not stable. For a school project FLTK2 is probably fine. -Eric ___ 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] Trackball Functionality - The concept
Hello Forum, Could some one provide more reference to the trackball functionality Is there any connection to the osgGA::TrackballManipulator* tbm = new osgGA::TrackballManipulator(); I did not find enough information on that and its usage. in the osganimationmakepath i have commented that above line but did not make any difference to the entire scene It would be of great help if some provide some link regarding that Sajjad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VRML Normal Issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben Axelrod wrote: I think we are agreeing with each other. Yes, I think so. I agree the simplest thing for a user is to specify normals in the file for the best control over shading. And I agree that in order to support the crease angle property, we will have to duplicate vertices. Despite the crease angle being a kludge, I do think that it should be implemented. That is why I submitted the code, in case anyone wanted to implement the crease angle, I think that would be how to do it. OK, great - I didn't see your submission. Unfortunately I do not have as much time to develop and maintain this code as I would like, so I do appreciate people contributing to it and keeping this code alive. Before, you said that duplicating vertices would lead to artifacts. Can you elaborate on this? I don't see how it would when we are in the sharp edge case, and we give it a proper normal, and point the proper face index at the new vertex. It was off-the-cuff remark, but I can imagine issues with z-fighting for small crease angles. It increases the amount of data needed to be transferred to the GPU as well. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJzT91n11XseNj94gRAq4wAKDCpOcyHBWpqQVsyURuxaM9wJtaDwCg8qmU 2i5zzecjdCNmMe+C6D7r1lQ= =oLOR -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CallBack issue
Hello forum, I am trying to rorate an object continuously through a call back. Before calling the calback i am doing some affine transformation over that object The final rendered the scaled down to a tiny object . In the callback subclass i am overloading the () operator and i am performing the rotation, not any kind of scaling down. **code**' class RotateCB : public osg::NodeCallback { public: RotateCB() : m_angle(0) { } virtual void operator()(osg::Node *node, osg::NodeVisitor *nv) { /* Normally, check to make sure that we have an update visitor, not necessary in this simple example */ osg::MatrixTransform * mtLeft = dynamic_castosg::MatrixTransform*(node); osg::Matrix mR; mR.makeRotate(m_angle, osg::Vec3(0.0f,0.0f,1.0f)); mtLeft-setMatrix(mR); //Increment the angle for the next from m_angle += 0.01; /* Continue traversing so that OSG can process any other nodes with callbacks */ traverse(node,nv); } . osg::ref_ptrosg::MatrixTransform teapotPos = new osg::MatrixTransform; osg::Matrix teapotTransMat; osg::Matrix teapotScaleMat; osg::Vec3f teapotTransVec = osg::Vec3f(5,2,-12); osg::Vec3f teapotScaleVec = osg::Vec3f(20.1f,20.1f,20.1f); teapotTransMat.makeTranslate(teapotTransVec); teapotScaleMat.makeScale(teapotScaleVec); teapotPos-setMatrix(teapotTransMat * teapotScaleMat); //SET THE data variance to dynamic to let OSG know that //we shall modify this node during update traversal teapotPos-setDataVariance(osg::Object::DYNAMIC); //SET THE update callback teapotPos-setUpdateCallback(new RotateCB); ... *' Any hint? Sajjad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Moving osgHud
I am trying to select nodes in a scene with a mouse drawn rectangle. The first step is to draw the selected region. I am trying to use an osgHud but it's not obvious how you can change the drawables - are you supposed to attach the Hud to a PositionAttitudeTransform? Anyone have an example of how to do this? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9372#9372 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Moving osgHud
I'm not sure what an osgHud is, and I'm not sure what you would use a PAT for in this case, so maybe I'm misunderstanding your question. Here's how I'd do it: * Add a Camera Node to your scene graph, configured to post render, and set the Camera's View and Projection to allow screen-space rendering (just as you would for any normal HUD). * Attach a Geode (with a Geometry) as a child of this Camera. * When you get a mouse down event, configure the Geometry to render a 4-vertex line loop, and initialize the 4 vertices to the current mouse position. * As you get mouse drag events, update the vertices/corners of the line loop to reflect the rectangle that the user is defining. * When you get a mouse up event, define a frustum from the 4 vertices, the near/far planes, and your viewpoint, and intersect this with your scene graph. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Beckett Sent: Friday, March 27, 2009 4:35 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Moving osgHud I am trying to select nodes in a scene with a mouse drawn rectangle. The first step is to draw the selected region. I am trying to use an osgHud but it's not obvious how you can change the drawables - are you supposed to attach the Hud to a PositionAttitudeTransform? Anyone have an example of how to do this? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9372#9372 ___ 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] CallBack issue
Hello Ami, On 28/3/09 8:50 AM, ami guru wrote: virtual void operator()(osg::Node *node, osg::NodeVisitor *nv) { osg::Matrix mR; mR.makeRotate(m_angle, osg::Vec3(0.0f,0.0f,1.0f)); mtLeft-setMatrix(mR); ... osg::Vec3f teapotTransVec = osg::Vec3f(5,2,-12); osg::Vec3f teapotScaleVec = osg::Vec3f(20.1f,20.1f,20.1f); teapotTransMat.makeTranslate(teapotTransVec); teapotScaleMat.makeScale(teapotScaleVec); teapotPos-setMatrix(teapotTransMat * teapotScaleMat); You're originally including a scaling transform in the Matrix. The Callback operator replaces this with only a rotation matrix i.e. the scaling part is lost hence the object looks smaller. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] How do I add libraries to all linker commands?
I need to put a -lGL and -lGLU in every linker command, what file do I edit in order to do this automatically? Thanks- Lucas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9376#9376 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems shutting down Composite Viewer/View/Custom drawables
Chuck, I have had similar issues (with crashes in releaseGLObjects when views get destroyed) but can't actually recall what I did to fix them. You could try calling viewer-releaseGLObjects() before you destroy the view. (previous posts seem to suggest that this might be the right thing to do) David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Moving osgHud
Sorry I meant an ordinary Hud as in the osghud sample. * Add a Camera Node to your scene graph, configured to post render, and set the Camera's View and Projection to allow screen-space rendering (just as you would for any normal HUD). That's what I did. * Attach a Geode (with a Geometry) as a child of this Camera. * When you get a mouse down event, configure the Geometry to render a 4-vertex line loop, and initialize the 4 vertices to the current mouse position. Yes - that's what I was doing, based on the keyboardmouse example. * As you get mouse drag events, update the vertices/corners of the line loop to reflect the rectangle that the user is defining. That's the sticking point - the Hud camera is attached to the scene as a geode, how do I change the vertices in a node that's part of the scenegraph? * When you get a mouse up event, define a frustum from the 4 vertices, the near/far planes, and your viewpoint, and intersect this with your scene graph. Shouldn't I use a PolytopeIntersector ? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9378#9378 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fwd: CallBack issue
Thanks Paul and Ulrich It works fine now. I have some issue to discuss about Callbacks With callbacks we dynamically modify the node during the update traversal.So any node that has already gone through some affine transformation will be replaced in the call backs, but not concatenated. On the other hand if we specify any affine trnasformation after calling the callback, the last transformation will be concatenated to the one that have been assigned durng callbacks. And that happens to any type of dynamic transformation , not only with the affine one. Please correct me if i misunderstood the concept. Regards Sajjad -- Forwarded message -- From: Ulrich Hertlein u.hertl...@sandbox.de Date: Sat, Mar 28, 2009 at 12:24 AM Subject: Re: [osg-users] CallBack issue To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Hello Ami, On 28/3/09 8:50 AM, ami guru wrote: virtual void operator()(osg::Node *node, osg::NodeVisitor *nv) { osg::Matrix mR; mR.makeRotate(m_angle, osg::Vec3(0.0f,0.0f,1.0f)); mtLeft-setMatrix(mR); ... osg::Vec3f teapotTransVec = osg::Vec3f(5,2,-12); osg::Vec3f teapotScaleVec = osg::Vec3f(20.1f,20.1f,20.1f); teapotTransMat.makeTranslate(teapotTransVec); teapotScaleMat.makeScale(teapotScaleVec); teapotPos-setMatrix(teapotTransMat * teapotScaleMat); You're originally including a scaling transform in the Matrix. The Callback operator replaces this with only a rotation matrix i.e. the scaling part is lost hence the object looks smaller. Cheers, /ulrich ___ 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] OpenGL 3.1 at GDC
Robert Osfield wrote: Hi Hannes, On Wed, Mar 25, 2009 at 10:30 AM, hanne...@gmx.at hanne...@gmx.at wrote: you just brought to me the insight why the game developers use d3d. because they do not care if it runs in some years, they make the money now. they see how much does the development of the game cost and how many boxes can i sell in short time. so they choose the most widespread platform, which is windows and use d3d which seems easy for development and looks good. I know where you are coming from bit I think it a bit off target, and falls into a common repeat line of reasoning. Direct3D is used under Windows and XBox by games developers. The games market is far bigger than just Windows and XBox. The Windows + XBox while being a big player, it is far from the biggest market in the games industry, but sometimes from online traffic it would seem that it's the only game in town, this is just PR or ignorance though. The biggest recent games platforms have been PlayStation 2 and the more recently the Wii, neither of which have D3D or OpenGL. I believe Wii has a OpenGL style graphis API. it is not about absolute figures, it is about target audience. which one it is, is made by decision makers. as you see it right it is a combination of pr and ignorance. they do not care if it runs in 2 years, better it do not because next year they can sell a new version. what should they sell in the future if the customer buy now their perfect game with no need for improvements. it is about the next quarter figures for the stock market. the lower the cost now, the bigger the win and the higher the stock market and the higher the income of the managers. result are games like crysis and so on. downside is as you said, the different d3d versions do not run on any windows but the newest opengl does. maybe an argument for game developers to bring the best graphics to any windows with opengl and maybe with osg. ;) For the next generation of games I think we have shout. I think to successfully push the OSG to the games market one has to emphasis the portability and the wider market reach that it brings. Getting the message over about a wider market reach is easy to those who've already climbed out of the Windows centric box, but for those who just think Windows == 100% games market it's a harder sell. It's this perception that needs to be cracked first. http://www.engadget.com/2009/03/27/havok-and-amd-show-off-opencl-with-pretty-pretty-dresses/ i think it is important to get the maximum out of the hardware, for example minimum 30 fps and all over 60fps goes into quality. it is about a showcase what osg can do in a game and how does it compare to others. http://www.gametrailers.com/ http://store.steampowered.com/hwsurvey Steam Hardware Survey 24,75% dx10 system, dx10 gpu and vista 27,28% dx10 gpu on xp 27,60% dx9 sm 2b 3.0 7,25 dx9 sm2 gpu 13,12 dx8 gpu and below Self selective survey's can be of use for particular interest groups, but rarely mean much outside the selective group. The above survey basically is 100% of who answer a suvery for a D3D centric game/company had support for some version of D3D... it is not a self survey, the figures are from user data collected via steam. so it is accurate for all the counter strike, half life and so on gamers offered with steam to buy. i think these are the most exact figures about pc gamers and their hardware and os, public available. it shows a very interesting aspect of gaming, not all gamers have the newest hardware, a lot of people have slow one, be it old or mobile. http://www.solidsmack.com/solidworks-opengl-direct3d-gpu-comparison-cad/2008-09-01/ Highlights of Autodesk Inventor OpenGL to DirectX Evolution from “Norbert” - Autodesk Inventor Graphics Team When we use OpenGL, we have found over the past many years (and still today) that we need to invest in a large, significant amount of QA… and use OpenGL almost on the level of 1997 graphics With Direct3D, our QA team can focus on testing our code and finding defects in our graphics code, instead of having to spend all their time just verifying that the graphics HW vendors have done their job correctly to produce an OpenGL graphics driver that actually works. Direct3D works identically on x64 as on x86 In …all defects that we see with the use of Direct3D…the problem is in our Inventor graphics layer code and the way we are using Direct3D in Inventor, not in the graphics HW vendor’s Direct3D graphics driver. when we use OpenGL, we never use the graphics HW for the rendering of any offscreen images…we are using the Direct3D graphics HW for all offscreen rendering. we have decided to focus on supporting Direct3D where we can focus the QA efforts on testing our own code and actually redirect some of the people currently spending all their time testing OpenGL graphics drivers to start testing our own graphics layer code we can add new graphics features and functionality
Re: [osg-users] Moving osgHud
On 28/3/09 11:14 AM, Martin Beckett wrote: * As you get mouse drag events, update the vertices/corners of the line loop to reflect the rectangle that the user is defining. That's the sticking point - the Hud camera is attached to the scene as a geode, how do I change the vertices in a node that's part of the scenegraph? The only thing you have to watch out for is to do it outside the draw traversal. Apart from that you can just modify the geometry vertex array and mark the geometry as dirty to trigger display list re-building. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: CallBack issue
Hi Sajjad, On 28/3/09 12:01 PM, ami guru wrote: With callbacks we dynamically modify the node during the update traversal.So any node that has already gone through some affine transformation will be replaced in the call backs, but not concatenated. On the other hand if we specify any affine trnasformation after calling the callback, the last transformation will be concatenated to the one that have been assigned durng callbacks. And that happens to any type of dynamic transformation , not only with the affine one. I'm not quite sure I follow you. What you're describing has nothing to do with the update traversal as such. You're setting the transformation matrix of a certain node. Naturally this overwrites whatever was set before. If you need a certain transformation (e.g. a scale) to be preserved then either put it in a parent or child MatrixTransform or include it in the calculated matrix. Or decompose the existing matrix and re-assemble it with the modified values. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org