[osg-users] Question about train simulation
Hi, I am a new to OSG Now I am woking in a project for train simulation game , using the osgAnimation library , but for now just some problems trouble me : for example , when the train turns left or right , the cabin need rotate for a angle , and I have tried for creating osgAnimation::Bone , but finally the output does not look the same to the real situation. so I guess that the Bone does not fit for train's turning , anyone who could give a better idea? :' Thank you very much! Cheers, shiinaringo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16984#16984 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about train simulation
Hi shiinaringo, You can check the osganimationskinning example to show how to setup a bone chain by hand. Other way could be to use solid animation instead of bone chain. see example osganimationsolid Cheers, Cedric - +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Thu, 2009-09-03 at 07:15 +, Shiina Ringo wrote: Hi, I am a new to OSG Now I am woking in a project for train simulation game , using the osgAnimation library , but for now just some problems trouble me : for example , when the train turns left or right , the cabin need rotate for a angle , and I have tried for creating osgAnimation::Bone , but finally the output does not look the same to the real situation. so I guess that the Bone does not fit for train's turning , anyone who could give a better idea? :' Thank you very much! Cheers, shiinaringo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16984#16984 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] question on osgviewer stereo
HI Wenqin, Stereo rendering doesn't directly make things blurry, the only thing that changes is the eye position, the scene will be rendered in exactly the same way regardless of the stereo settings - you won't accidentally get some pixel blurring from nowhere. Perhaps you are perceiving an issue, or perhaps your display system isn't working perfectly. you make no mention of what stereo display you are using. Robert. On Wed, Sep 2, 2009 at 9:01 PM, Wenqin Wangwenqi...@yahoo.com wrote: Hi, I have a question on osgviewer Quad_buffer stereo. We used to use the default setting for the screen width, height, and distance. But it seems the depth has been exaggerated, and looks uncomfortable if zoom-in very close. So we measure the screen width, height, and distance, and change the setting. It did solve those issues, but have one problem, the image does not look as sharp as before, looks a little bit blur. Any body knows how to solve this problem? Thank you! Cheers, Wenqin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16972#16972 ___ 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] simulation solution
hi~everyone! i am specializing in soluting simulation or OSG problems.any question, just feel free to contact me or go to our site for anwer www.lanmeivr.com i will be happy to serve you with all kinds of detailed information! welcome here! [Image: http://i911.photobucket.com/albums/ac315/lanmeivr/1.jpg ] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16986#16986 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] undertake virtual reality project
Lanmeivr company is superior in solving system simulation problems,specializing system simulation research and development under OSG platform. Lanmeivr’s has owned 30 patents and our simulator and system simulation products has been popular among more than 20 foreign countries such as France, America, Holand, Hinland, Russia, India, Egypt, Saudi Arabia, Malaysia, Indonesia, Costarica, Argentina, Chile,etc. Lanmeivr Company undertake the following virtual reality projects: 1. training system VR for cars, racing cars, special vehicles, aircraft (multi-DOF) 2.system simulation for industrial production units (single / multipeople ) 3.system simulation for weapons and equipment 4.3D digital city system development; (Stand alone / Network Version) 5.3D digital factory system development (Stand alone / Network Version) 6.3D science fiction film production services. www.lanmeivr.com [Image: http://i911.photobucket.com/albums/ac315/lanmeivr/1-screen.jpg ][Image: http://i911.photobucket.com/albums/ac315/lanmeivr/portablecarsimulator.jpg ][/img][/url] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16979#16979 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] possible bug in osg reader/writer for PagedLOD nodes
Hi Alex, On Wed, Sep 2, 2009 at 10:03 PM, Alex Pecoraroalexander.n.pecor...@lmco.com wrote: With that being said, I have to say that I was mildly offended by your description of my use of the API as perverse and improper in your responses to what started out as my attempt to be helpful. I don't think that the way I am building databases is perverse or improper, I'm just using the API in a way that apparently was not imagined when it was designed. All of my previous interactions with you and the others on this mailing list can only be described as pleasant and enlightening, but this time it sort of feels like I'm under attack. I'm not attacking you personally, but they technique you are using just sounded a really awkward and inappropriate way to use the OSG classes. From you explanation it looked very much like you exacting defined and consistent results even when you leave the nodes in an undefined state - for this I could never provide a OSG centric solution as there isn't one. I do have a finite level of patience so occasionally I'm not be as diplomatic as I could be. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picky warning about assignment operator
Hi Ansders, Welcome back ;-) My inclination would be to implement an assignment operator and make it protected rather than disable the warning. Could you try this and post the results if successful? Robert. On Thu, Sep 3, 2009 at 5:30 AM, Anders Backmanande...@cs.umu.se wrote: Hi! Compiling the following class in VisualStudio with the highest varning level /W4 results in the warning: OpenSceneGraph\include\OpenThreads/ReadWriteMutex(94) : warning C4512: 'OpenThreads::ScopedReadLock' : assignment operator could not be generated class ScopedReadLock { public: ScopedReadLock(ReadWriteMutex mutex):_mutex(mutex) { _mutex.readLock(); } ~ScopedReadLock() { _mutex.readUnlock(); } protected: ReadWriteMutex _mutex; }; It would be nice if this warning could be avoided. Unfortunately in this case there is basically only one way of doing that: #ifdef _WIN32 // Disable warning about assignment operator could not be generated due to reference members. #pragma warning( disable: 4512 ) #endif /Anders -- ___ 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] Question about train simulation
Hi Cedric, Thank you very much for your advice! Cheers, Shiina Ringo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16992#16992 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] bmp load vertically flipped
Hi, I have been doing some image stuff lately. JPEGs and PNGs load right but BMPs are upside down. Is this a feature or a bug? At the moment I am doing this for remedy: Code: osg::Image* image = osgDB::readImageFile(filename); if(filename.substr(filename.length()-3) == bmp) { image-flipVertical(); } Just thought I share this. Thank you! Cheers, stefan stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16993#16993 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about train simulation
Hi Cedric, for another question to osgAnimation , that is , the function setBindMatrixInBoneSpace() in osgAnimation::Bone , its parameter's matrix , and I just cannot understand this parameter's meaning as well as How to give the correct matrix. Besides , I just have no idea about the BoneSpace , and SkeletonSpace , in other words , the coordinate in the local Bone or Skeleton spaces just trouble me . Could you just explain the meaning of that 2 spaces in a easy-understanding way? Thank you very much! Cheers, Shiina Ringo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16994#16994 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgSim Impostor lag and errors
Hi Vincent, I wouldn't recommend using impostors as they memory overhead is far higher than the saving that they provide in simplifying geometry. When you blow your memory limit then you'll get lots of frame drops. Robert. On Thu, Sep 3, 2009 at 11:39 AM, Vincent Bourdiervincent.bourd...@gmail.com wrote: Hi all, Looking for a way to use less memory with big models based on LOD, I just tried the osgimpostor example. I get some problem I don't understand : First, when the camera goes far from the scene, the LOD makes its job and call the impostor to draw the Quads, but, this action take a lot of time. The application freeze during 5 to 20 seconds (with a little scene : 20 house instead of 25000 in the example) to show the Quads, and on each new need to recompute the textures (each camera movement) its freezes again. The frame rate goes from 170 to 1 ... In this case, you understand that the impostor solution is not a all solution. Do I miss something ? Here are the logs I get during the execution and the lags : bb invalid bb invalid bb invalid bb invalid bb invalid bb invalid bb invalid Warning: detected OpenGL error 'mÚmoire insuffisante' after RenderBin::draw(,) RenderStage::drawInner(,) FBO status= 0x8cd5 Warning: detected OpenGL error 'mÚmoire insuffisante' after RenderBin::draw(,) RenderStage::drawInner(,) FBO status= 0x8cd5 I tried to load a simple model, but this time it never uses impostor ... whatever is the Threshold... Any idea or suggestion will be appreciated. Thanks, Vincent. ___ 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] [3rdparty] osgOcean : Integration into existing Database / Application
Hi all I would like to update this post to know if there is a way to integrate osgOcean material (and shader) to an existing surface like it was mentioned ? Thanks Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16996#16996 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] change ocean height
Hi, I would like to know if there is a way to change the ocean surface height. All the objects of my scene are located at a 100 altitude on the Z axis while the ocean is a 0. Thank you Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16997#16997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgSim Impostor lag and errors
Hi Vincent, On Thu, Sep 3, 2009 at 2:33 PM, Vincent Bourdiervincent.bourd...@gmail.com wrote: I'm not sure to understand you well : Impostors will use more memory than a defaut LOD ? so where is the advantages of them ? I have 3Go of RAM, and the memory is not used at all with less than 10 000 faces ... so memory is not a problem. It's memory on the graphics card that is the problem. If you create a large number of large textures on the GPU then you run out of memory. There is a very limited set of cases where imposters are good, and these deserve very specific implementations. The OSG's osg::Impostor was an interesting experiment, but in the end it was too general purpose and with it unable to avoid the pitfalls of impostors. Assuming impostor are not the good solution, do pagedLod are more what I'm looking for ? I understood that pagedLod are LOD that load from disk the model when its level is required, and free the unused children when the children limit have been reached. Does it really save much memory ? how to use them correctly ? Are you looking for me to teach you all about real-time computer graphics? It's a big topic database paging and LOD's are just one tool and a very powerful one, and one that's more generally useful than impostors. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] change ocean height
Hello Sebastien, I would like to know if there is a way to change the ocean surface height. All the objects of my scene are located at a 100 altitude on the Z axis while the ocean is a 0. I have some local modifications to osgOcean to allow this, but I am on vacation right now so I will not be able to review + check in the changes for another two weeks or so. As soon as I get back to work I'll make sure the changes are checked in and send you an update. 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] OsgSim Impostor lag and errors
HI Robert, 2009/9/3 Robert Osfield robert.osfi...@gmail.com Hi Vincent, On Thu, Sep 3, 2009 at 2:33 PM, Vincent Bourdiervincent.bourd...@gmail.com wrote: I'm not sure to understand you well : Impostors will use more memory than a defaut LOD ? so where is the advantages of them ? I have 3Go of RAM, and the memory is not used at all with less than 10 000 faces ... so memory is not a problem. It's memory on the graphics card that is the problem. If you create a large number of large textures on the GPU then you run out of memory. There is a very limited set of cases where imposters are good, and these deserve very specific implementations. The OSG's osg::Impostor was an interesting experiment, but in the end it was too general purpose and with it unable to avoid the pitfalls of impostors. Assuming impostor are not the good solution, do pagedLod are more what I'm looking for ? I understood that pagedLod are LOD that load from disk the model when its level is required, and free the unused children when the children limit have been reached. Does it really save much memory ? how to use them correctly ? Are you looking for me to teach you all about real-time computer graphics? It's a big topic database paging and LOD's are just one tool and a very powerful one, and one that's more generally useful than impostors. I was just asking for explanation on pagedLod. I just found this implementation in OSG and there are very few comments on the source. I know LOD and how to use them, but PagedLod is something new for me and I didn't found more explanation of how does it work and the best/worst use case and/or advices. Thanks for the precision. Regards, Vincent. 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
Re: [osg-users] [3rdparty] osgOcean : Integration into existing Database / Application
Hello Sebastien, I would like to update this post to know if there is a way to integrate osgOcean material (and shader) to an existing surface like it was mentioned ? I don't know what you're referring to exactly, the post you're replying to contains discussions about making lakes and rivers (which is currently not supported) and then diverged into camera manipulators. What do you want to do exactly? If you want what's under the OceanScene to use the same shaders as the rest of your scene, then osgOcean::OceanScene() has methods setDefaultSceneShader(osg::Program*) and setUseDefaultSceneShader(bool) to let you either specify a shader that the OceanScene should use, or to make the OceanScene not use any shader so that it will use the shader that's specified higher up in your scene graph. You can check out osgOcean/resources/shaders/default_scene.{vert|frag} and take inspiration from those shaders to adapt your own shaders. If you want to change the way the ocean surface itself is shaded, then look at osgOcean/resources/shaders/water.{vert|frag} and modify that Don't forget to either transpose your modifications into FFTOceanSurface.cpp (near the end of the file you'll see the shaders as inline strings) or set USE_LOCAL_SHADERS 0 at the top of that same source file so it will load the shader from the file instead of using the one that's inline in the source file. If what you want to do is not one of those two things, please let us know what it is so we can help you better. 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] [3rdparty] change ocean height
Hi JS bad luck for me ! ^^ anyway thanks for your answer and have nice holidays :) sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17004#17004 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean : Integration into existing Database / Application
Hi, I was talking about rivers and lakes, and I had my answer. Thanks Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17005#17005 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgSim Impostor lag and errors
Hi Vincent, On Thu, Sep 3, 2009 at 3:05 PM, Vincent Bourdiervincent.bourd...@gmail.com wrote: I was just asking for explanation on pagedLod. I just found this implementation in OSG and there are very few comments on the source. I know LOD and how to use them, but PagedLod is something new for me and I didn't found more explanation of how does it work and the best/worst use case and/or advices. I'm afraid I have way too much work on my plate right now to go providing guidance on the topic of paging. The best I can do is provide quick pointers. Perhaps others can provide some recommended reading for you. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] bmp load vertically flipped
hey ulrich, I am not sure I understand. I am loading a bmp and use it as a texture on a quad. I use the same texture coordinates for various image types but only the bmp displays upside down. stefan stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17007#17007 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean : Integration into existing Database / Application
Hi Sebastien, I was talking about rivers and lakes, and I had my answer. Well, if you just want the surface appearance, then you can surely examine the osgOcean source to see how reflection/refraction is done, what the shaders do, etc. and do the same for your river/lake surface. Doing vertex deformation is more difficult though. 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] Quictime Plugin on Windows
Hi all, I would like to know if anyone is using with success the Quicktime plugin on Windows ? Currently when I try to play a video I have this error : MovieData :: NewMovieFromProperties failed with err -43 It seems that the function NewMovieFromProperties is called with the parameter _movie to NULL, but if I read this doc : http://www.monen.nl/DevDoc/documentation/QuickTime/Reference/QTRef_MovieManager/Reference/reference.html#//apple_ref/c/func/NewMovieFromProperties It seems that the Movie parameter needs to be allocated. Am I missing something ? Thanks ! -- 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] NodeCallBack vs accept
Hi All, I would like to be sure to understand the difference between : - Creating a NodeCallback and attach it to a Node - Re-Implementing locally the virtual accept method For example I saw that we can attach a NodeCallback as an UpdateCallback, and testing the other method, I implemented the accept method in a node heriting from osg::Group, and saw that the UpdateVisitor never call it, but the CullVisitor does... is it a correct behavior ? Thank you! Cheers, Eric -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17010#17010 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] bmp load vertically flipped
Hi Stefan, On 3/09/09 5:14 PM, stefan nortd wrote: I am not sure I understand. I am loading a bmp and use it as a texture on a quad. I use the same texture coordinates for various image types but only the bmp displays upside down. Then I would say your BMP is upside down ;-) I have a stack of objects with BMP textures that would definitively look wrong if the loader would always flip the image. It's all down to how it was modelled. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems port OSG 1.0 - 2.8.2; Can't embed viewer in external app
Hello, I am having difficulties upgrading from OSG 1.0 to 2.8.2 (on CentOS) and was hoping to tap into this wealth of knowledge after failing miserably poking around the source code and attempting to retrofit the example applications into my own. Using OSG 1.0, I have an application which used an osgProducer to embed a viewer in another (GTK+ based) application. Using the below approach, I am able to successfully render images in the external application. In my attempt to port to OSG 2.8.2, I am able to embed the viewer in the external application but I can't seem to render any images. (I've tried simply changing the background color and that doesn't work either.) Based on observations in the debugger, it appears that my viewer may not be integrated properly with the gtk redrawing thread of the external application due to the fact that the visible (black) view is overdrawn by the external application at random times, and it is never seen again. Any pointers would be greatly appreciated. Thanks! Natasha westl...@ll.mit.edu _ Initialization of osgProducer viewer using OSG 1.0: _ osgProducer::Viewer viewer (BuildConfig()); viewer.setUpViewer (osgProducer::Viewer::SKY_LIGHT_SOURCE | osgProducer::Viewer::HEAD_LIGHT_SOURCE | osgProducer::Viewer::STATE_MANIPULATOR | osgProducer::Viewer::STATS_MANIPULATOR | osgProducer::Viewer::VIEWER_MANIPULATOR ); gtk_init (argc, argv); // set the xid of the GtkSocket and connect the GtkPlug guint32 xid = wGtkPlug;// gtksocket of external application GtkWidget *plug = gtk_plug_new(xid); gtk_signal_connect(GTK_OBJECT(plug), destroy-event, GTK_SIGNAL_FUNC(destroy_event), viewer); // set the viewer to display in the plug viewer.getCamera(0)-getRenderSurface()-setWindow(gtk_plug_get_id(GTK_PLUG(plug))); // create a new thread to handle GTK events pthread_create(gtk_thread, NULL, gtk_thread_loop, NULL); // create the windows and run the threads. viewer.realize(); while( !viewer.done() ) { viewer.sync(); viewer.update(); // fire off the cull and draw traversals of the scene. viewer.frame(); usleep(50); } Producer::CameraConfig* BuildConfig(void) { Producer::RenderSurface *rs1 = new Producer::RenderSurface; rs1-setScreenNum(0); rs1-setWindowName(external-app); rs1-setWindowRectangle (0,0,640,480); Producer::Camera *camera1 = new Producer::Camera; camera1-setRenderSurface(rs1); camera1-setOffset( 0.0, 0.0 ); rs1-setInputRectangle (Producer::RenderSurface::InputRectangle(0.0,1.0,0.0,1.0)); Producer::InputArea *ia = new Producer::InputArea; ia-addRenderSurface(rs1); Producer::CameraConfig *cfg = new Producer::CameraConfig; cfg-addCamera(Camera 1,camera1); cfg-setInputArea(ia); return cfg; } void *gtk_thread_loop(void *arg) { gtk_main(); return NULL; } _ Rendering the images in OSG 1.0 is implemented as follows (same for OSG 2.8.2): _ _loadedModel = osgDB::readNodeFile(sName); if (!_loadedModel) { viewer.setClearColor( osg::Vec4( 0.9f, 0.9f, 0.9f, 1.0) ); return 1; } viewer.setClearColor( osg::Vec4( 0.701961f, 0.862745f, 0.949020f, 1.0) ); // optimize the scene graph, remove rendundent nodes and state etc. osgUtil::Optimizer optimizer; optimizer.optimize(_loadedModel.get()); //add the model to the transform. _modelTransform.get()-addChild(_loadedModel.get()); // set the scene to render viewer.setSceneData(_rootNode.get()); _ Initialization in OSG 2.8.2 is below: HELP - what am I doing wrong? _ osgViewer::Viewer viewer; osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; traits-screenNum = 0; traits-x = 0; traits-y = 0; traits-width = 640; traits-height = 480; traits-red = 8; traits-blue = 8; traits-green = 8; traits-alpha = 0; traits-windowDecoration = false; traits-pbuffer = false; traits-doubleBuffer = true; traits-sharedContext = 0; traits-windowName = external-app; gtk_init (argc, argv); // set the xid of the GtkSocket and connect the GtkPlug guint32 xid = wGtkPlug; GtkWidget *plug = gtk_plug_new(xid); gtk_signal_connect(GTK_OBJECT(plug), destroy-event, GTK_SIGNAL_FUNC(destroy_event), viewer); // Hike logging up osg::setNotifyLevel (osg::NOTICE); // set the viewer to display in the plug traits-inheritedWindowData = new osgViewer::GraphicsWindowX11::WindowData(gtk_plug_get_id(GTK_PLUG(plug))); viewer.getCamera()-setGraphicsContext (osg::GraphicsContext::createGraphicsContext(traits.get())); viewer.getCamera()-setViewport (new
Re: [osg-users] Quictime Plugin on Windows
Hi Serge, I would like to know if anyone is using with success the Quicktime plugin on Windows ? I had compiled it a while back, and wrote a note about it on this page: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPlugins but it's pretty trivial so my guess is that you're probably using a newer version of the QuickTime SDK and running into a new problem. I haven't used it for a long while so I can't really help more, you'd probably need to go into the code with the SDK documentation and see what's wrong or what could have changed. Alternatively you could try to download the version of the SDK I referenced in that page and see if that works. If so then at least you have something that works while you (or someone else) tries to find out what's wrong with the new version. All that's assuming that it's the version of the SDK that's changed and causing problems, it could well be something else. Hope that 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
Re: [osg-users] [osgPlugins] bmp load vertically flipped
Bitmaps are stored upside down internally. If the loader is not flipping your image, then flip the image yourself. From http://en.wikipedia.org/wiki/BMP_file_format; Bitmap data This block of bytes describes the image, pixel by pixel. Pixels are stored upside-down with respect to normal image raster scan order, starting in the lower left corner, going from left to right, and then row by row from the bottom to the top of the image.[2] Uncompressed Windows bitmaps can also be stored from the top row to the bottom, if the image height value is negative. Ryan H. Kawicki The Boeing Company Training Systems Services Software Engineer ___ 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
[osg-users] How do I create/update uniform struct?
I want to use a struct in my glsl shader. osg::StateSet::getOrCreateUniform allows for the specification of Uniform::Type, but I don't see an enumeration for struct. How would I create/set the uniform struct? WE ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Quictime Plugin on Windows
Serge Lages schrieb: Hi all, I would like to know if anyone is using with success the Quicktime plugin on Windows ? Currently when I try to play a video I have this error : MovieData :: NewMovieFromProperties failed with err -43 It seems that the function NewMovieFromProperties is called with the parameter _movie to NULL, but if I read this doc : http://www.monen.nl/DevDoc/documentation/QuickTime/Reference/QTRef_MovieManager/Reference/reference.html#//apple_ref/c/func/NewMovieFromProperties It seems that the Movie parameter needs to be allocated. Am I missing something ? I am using similar code on windows and it works for me. Note the cited documentation: theMovie A pointer to a variable that receives the new movie. NewMovieFromProperties will create a new movie-object and return it via theMovie. What movie type do you want to play? Have you tried other types? I'll try to test the qt-plugin.. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] bmp load vertically flipped
On 3/09/09 5:47 PM, Kawicki, Ryan H wrote: Bitmaps are stored upside down internally. If the loader is not flipping your image, then flip the image yourself. From http://en.wikipedia.org/wiki/BMP_file_format; Bitmap data This block of bytes describes the image, pixel by pixel. Pixels are stored upside-down with respect to normal image raster scan order, starting in the lower left corner, going from left to right, and then row by row from the bottom to the top of the image.[2] Uncompressed Windows bitmaps can also be stored from the top row to the bottom, if the image height value is negative. Ah, good point. The loader actually checks for negative height values and corrects them. Which means it's flipping the image but not exposing this information. /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] question on osgviewer stereo
Hi, Robert, Thanks for your reply. The projection system is DepthQ single projector system. The difference of sharpness is pretty clear, the only things we have changed are screen width, height, and distance. Thank you! Wenqin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17019#17019 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt Quit menu button vs. OSG, on Mac
Paul Shabash schrieb: We've figured it out. It's due to this code fragment in GraphicsWindowCarbon.cpp, OSXCarbonWindowSystemInterface::OSXCarbonWindowSystemInterface() 356-9: // register application event handler and AppleEventHandler to get quit-events: static const EventTypeSpec menueventSpec = {kEventClassCommand, kEventCommandProcess}; OSErr status = InstallEventHandler(GetApplicationEventTarget(), NewEventHandlerUPP(ApplicationEventHandler), 1, menueventSpec, 0, NULL); status = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP(QuitAppleEventHandler), 0, false); It basically just dumps any Quit handlers that have been installed before. Isn't this a rather dangerous thing to do? The code should check for any pre-existing handlers and chain them if there are any. To my knowledge you can add more than one application-/event-handler, so this should be safe. It might that the event-handler itself behaves badly. But with your setting I thinkt the best way is to add no event handlers at all, because Qt handles all the application-setup. I have no experience with Qt and the carbon-implementation misses some implementation details (e.g. using it in another carbon-app) but feel free to add the missing functionality and submit it back to osg-submission. I don't know if you can mix Cocoa with QT, then perhaps the new Cocoa backend in 2.9.x might be useful, as there is some functionality to bypass the application-setup stuff. Or just create a subclass from osg::GraphicsContext::WindowingInterface which doesn't setup the carbon-app-stuff, and just returns GraphicsWindowCarbon-/PixelBufferCarbon-instances and register this class via osg::GraphicsContext::setWindowingInterface() cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How do I create/update uniform struct?
I want to use a struct in my glsl shader. osg::StateSet:: getOrCreateUniform allows for the specification of Uniform::Type, but I don't see an enumeration for struct. How would I create/set the uniform struct? WE ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgIntrospection / gen_wrapper - How to use ist?
Hi, I'm building an osg based visual system for simulators ( e.g. flight simulators). I want to use the osgLua Nodekit for scripting support and discovered that it is build on osgIntrospection. Now I'd like to know how to enable osgIntrospection for my own classes. I have read that modification of my osg classes are not requiered, because the osgIntrospection framework is able to do it automaticaly via gen_wrapper. Unfortunalety i've only found documantation for an old osg version here: http://www.openscenegraph.org/projects/osg/wiki/GenWrapper . What have I to do to make my osg (2.8.2) classes osgIntrospection ready? Thank you very much! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17022#17022 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How do I create/update uniform struct?
I want to use a struct in my glsl shader. osg::StateSet::getOrCreateUniform allows for the specification of Uniform::Type, but I don't see an enumeration for struct. How would I create/set the uniform struct? WE ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Quictime Plugin on Windows
Hi all, Thanks for your help, I've made it work, but only if I specify a file with its absolute path and not its relative path. Any idea what's the problem ? On Thu, Sep 3, 2009 at 6:29 PM, Stephan Maximilian Huber ratzf...@digitalmind.de wrote: Hi, Stephan Maximilian Huber schrieb: I'll try to test the qt-plugin.. compiled osg 2.8.2, tried osgmovie with a movie, and it worked as expected. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- 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] Quictime Plugin on Windows
To be more precise, if I have my video in the same directory as the binary, calling osgmovie myfile.move works, but if I move my file on ../myfile.mov, it doesn't work anymore... :/ But with the absolute path it always work. On Thu, Sep 3, 2009 at 6:44 PM, Serge Lages serge.la...@gmail.com wrote: Hi all, Thanks for your help, I've made it work, but only if I specify a file with its absolute path and not its relative path. Any idea what's the problem ? On Thu, Sep 3, 2009 at 6:29 PM, Stephan Maximilian Huber ratzf...@digitalmind.de wrote: Hi, Stephan Maximilian Huber schrieb: I'll try to test the qt-plugin.. compiled osg 2.8.2, tried osgmovie with a movie, and it worked as expected. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Serge Lages http://www.tharsis-software.com -- 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] Question regarding rtt
Hi Brett, viewer.run() is just a convenience method, it's very easily to just replace it with the full frame loop. while(!viewer.done()) { viewer.frame(); } Or expanded further: while(!viewer.done()) { viewer.advance(); viewer.eventTraversal(); viewer.updateTraversal(); viewer.renderingTraversals(); } Then set the camera in this frame loop, or... just use run() and a camera update callback, or CameraManipulator as is done in most examples. Robert. On Thu, Sep 3, 2009 at 4:54 PM, Brett Thomas Leebrettle...@hotmail.com wrote: Hi, since im using osg in my own application Theres now viewer.run().So how to update it. Thank you! Cheers, Brett -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17015#17015 ___ 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] Quictime Plugin on Windows
Hi, Stephan Maximilian Huber schrieb: I'll try to test the qt-plugin.. compiled osg 2.8.2, tried osgmovie with a movie, and it worked as expected. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] NodeCallBack vs accept
Yes, this is correct behavior. The UpdateVisitor doesn't waste time traversing the scene graph if there are no registered update callbacks. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 Eric Pouliquen wrote: Hi All, I would like to be sure to understand the difference between : - Creating a NodeCallback and attach it to a Node - Re-Implementing locally the virtual "accept" method For example I saw that we can attach a NodeCallback as an UpdateCallback, and testing the other method, I implemented the "accept" method in a node heriting from osg::Group, and saw that the UpdateVisitor never call it, but the CullVisitor does... is it a correct behavior ? Thank you! Cheers, Eric -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17010#17010 ___ 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] GraphicsContext resizedCallback/resizedImplementation bug
Hi, OSG 2.2 The original issue: I have a graphics context with multiple cameras. Some of which are rendering to an attached image. When I resize the graphics context ALL of the camera's viewports are resized. I did not want this to happen so I defined my own ResizedCallback which will only resize Cameras that I tell it to. Issue with ResizedCallback: I can resize the camera's I want to and leave the others the way they are just fine. But since I defined my own ResizedCallback GraphicsContext no longer updates the following values as it would normally do in GraphicsContext::resizedImplementation(). Code: _traits-x = x; _traits-y = y; _traits-width = width; _traits-height = height; Now when I query these values from GraphicsContext they no longer equate to the values I set by resizing the context. This is because GraphicsContext::resizedImplementation() is not called when a ResizedCallback is set. It is impossible to set the traits values in the ResizedCallback since the values are private. To repair this I would change: Code: void resized(int x, int y, int width, int height) { if (_resizedCallback.valid()) _resizedCallback-resizedImplementation(this, x, y, width, height); else resizedImplementation(x, y, width, height); } to Code: void resized(int x, int y, int width, int height) { if (_resizedCallback.valid()) _resizedCallback-resizedImplementation(this, x, y, width, height); else resizedImplementation(x, y, width, height); _traits-x = x; _traits-y = y; _traits-width = width; _traits-height = height; } Or something similar. Thank you! Cheers, Steven[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17030#17030 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How do I create/update uniform struct?
Sorry for the multiple posts. Wyatt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17029#17029 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] bmp load vertically flipped
Granted that different image types store pixels differently I would still assume that the image loader should nevertheless be consistent across different image format. I guess this is an assumption that depends how low-level one approaches pixel data. So I record it is not a bug in the image loader. correct? Thank you! Cheers, stefan stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17031#17031 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Structs in GLSL shaders with OSG
I posted this via the mailing list, but it seems to never have gone through. I want to use a struct in my glsl shader. osg::StateSet::getOrCreateUniform allows for the specification of Uniform::Type, but I don't see an enumeration for struct. How would I create/set the uniform struct? WE Wyatt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17032#17032 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Structs in GLSL shaders with OSG
Wyatt B. S. Earp wrote on Thursday, September 03, 2009 2:38 PM: I posted this via the mailing list, but it seems to never have gone through. I want to use a struct in my glsl shader. osg::StateSet::getOrCreateUniform allows for the specification of Uniform::Type, but I don't see an enumeration for struct. How would I create/set the uniform struct? You need to specify uniforms for each struct member, so they'd have names like mystruct.firstmember and mystruct.secondmember with appropriate types. -- Bryan Thrall FlightSafety International bryan.thr...@flightsafety.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] bmp load vertically flipped
stefan nortd wrote: Granted that different image types store pixels differently I would still assume that the image loader should nevertheless be consistent across different image format. I guess this is an assumption that depends how low-level one approaches pixel data. Agreed. So I record it is not a bug in the image loader. correct? It could be a bug, or it could be a bug in whatever created the BMP. Do we have sample data that we can look at? I know the BMP format pretty well. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Structs in GLSL shaders with OSG
Hi Wyatt, I posted this via the mailing list, but it seems to never have gone through. Err, yeah, it came through fine (all three times) http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg31649.html 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] Nested transparent objects
I am trying to view transparent objects inside of other transparent objects. My objects are simple ShapeDrawables with some color and alpha transparency. I am seeing strange behavior where the inner object is sometimes completely hidden by the outer object depending on camera angle. Also, some of the object edges that should be visible are not. (Again, depending on camera angle). In the attached images: badalpha.png there is a small red cube partially inside of a larger green cube. they both have some transparency and you should be able to see through both objects. however, some edges of the green cube are completely hidden by the red cube. The desired behavior can be seen in badalphamodbyhand.png in which I modified to show what should be shown. This must be a common problem, but I searched the archives and it did not turn up much. my GL_DEPTH_TEST attribute is on as well as GL_BLEND. I am using OSG 2.6.0 with an NVidia series 7 graphics card. Is there some way to improve the transparency visualization? Thanks, -Ben attachment: badalpha.PNGattachment: badalphamodbyhand.png___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Nested transparent objects
Ben Axelrod wrote on Thursday, September 03, 2009 4:25 PM: I am trying to view transparent objects inside of other transparent objects. My objects are simple ShapeDrawables with some color and alpha transparency. I am seeing strange behavior where the inner object is sometimes completely hidden by the outer object depending on camera angle. Also, some of the object edges that should be visible are not. (Again, depending on camera angle). In the attached images: badalpha.png there is a small red cube partially inside of a larger green cube. they both have some transparency and you should be able to see through both objects. however, some edges of the green cube are completely hidden by the red cube. The desired behavior can be seen in badalphamodbyhand.png in which I modified to show what should be shown. This must be a common problem, but I searched the archives and it did not turn up much. my GL_DEPTH_TEST attribute is on as well as GL_BLEND. I am using OSG 2.6.0 with an NVidia series 7 graphics card. Is there some way to improve the transparency visualization? This is a common problem: OSG sorts at the granularity of Drawables and according to the bounding sphere's center, so it can get the rendering order wrong from certain points of view (for proper blending, distant transparent objects need to be rendered before nearer objects). For intersecting Drawables, there is no correct order, which is what you're seeing. To get correct behavior, you'd have to split your objects into separate Drawables so that they can be sorted, which may require splitting polygons (and for dynamic objects, splitting the polygons every time the objects move or change shape). HTH, -- Bryan Thrall FlightSafety International bryan.thr...@flightsafety.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGConv on VPB PagedLOD database
Hi, Chris 'Xenon' Hanson wrote: I ended up using Windows PowerShell to script a find/xargs foreach solution. I do think perhaps osgconv might benefit from a recursive convert option. has anyone else run into trouble simply converting a VPB database between .osg and .ive or back, as a result of this limitation? I also had to recurse manually. An option in osgconv would be nice. Secondly, I notice that on write, the PagedLOD nodes write a DatabasePath item that wasn't present in the source .osg files. It ends up making the paths hard-coded instead of relative. I hacked around this by temporarily commenting out the line that writes the DatabasePath to the .osg file, but there must be a 'proper' solution. Has anyone experienced what I'm talking about? Yes, I've had the same issue. I got around it by cd'ing to the dir where the file was before I run osgconv. From bottom of: http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/CompressExisting Reason for cd before osgconv For some reason osgconv must be run with only the input file name, i.e. from the directory where the file is located. If it is run by passing not only the filename, but a whole path to the file, the links to files in other directories get corrupted somehow. When the links are broken, one can only open the database properly from a single directory, e.g. cd new_db osgviewer terrain.ive would work, but cd .. osgviewer new_db/terrain.ive or execution from any other path would not. jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picky warning about assignment operator
Hi, Anders Backman wrote: Hi! Compiling the following class in VisualStudio with the highest varning level /W4 results in the warning: OpenSceneGraph\include\OpenThreads/ReadWriteMutex(94) : warning C4512: 'OpenThreads::ScopedReadLock' : assignment operator could not be generated class ScopedReadLock { public: ScopedReadLock(ReadWriteMutex mutex):_mutex(mutex) { _mutex.readLock(); } ~ScopedReadLock() { _mutex.readUnlock(); } protected: ReadWriteMutex _mutex; }; It would be nice if this warning could be avoided. Unfortunately in this case there is basically only one way of doing that: As another option, can one not write one's own assignment operator? jp #ifdef _WIN32 // Disable warning about assignment operator could not be generated due to reference members. #pragma warning( disable: 4512 ) #endif /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question regarding rtt
Hi, you only have to add the camera once. I will be traversed/updated every frame. jp Brett Thomas Lee wrote: Hi, Im using osg in my application.My application consists of init() and run() functions. Im doing all initialization stuff in init(),run() is called every frame and Im updating the contents of texture(rtt) by calling root-addChild(preRenderCamera.get()); in run every frame.But the contents are getting updated but the application slows down after some frames.I think this is due to adding lots of prerendercameras every frame?? What is the way to update the camera in an efficient way?? Thank you! Cheers, Brett -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16977#16977 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Problems building Plugins dicom
Hello everyone. I built DCMTK 3.5.4 successfully but am having problems building Plugins Dicom. I am using Visual Studio 2005 on Windows Vista. Has anybody built Plugins dicom successfully with Visual Studio on Window Vista? I believe the following might(?) be issues in building Plugins dicom *** /MD versus /MT *** When making DCMTK with CMake the CMAKE_CXX_FLAGS have /MD which is the same for OSG. However, when I look at the projects in Visual Studio, the flags are /MT. Is this a problem? If so, why is CMake not setting it correctly and how can I fix it? *** iostream.h versus iostream *** OSG uses iostream. I am not convinced the file ofstream in DCMTK is configured to use iostream correctly. I tried hardcoding the use of iostream without getting plugin dicom to build successfully. *** other library conflicts? I tried the \NoDefaultLib option and tried ignoring some other libraries with no success. *** other problems *** I might be completely missing something. Could there be some other problem? The output is below. Thanks! Jason Error 72 error LNK2005: public: __thiscall std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar ::~basic_stringchar,struct std::char_traitschar,class std::allocatorchar (void) (??1?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@q...@xz) already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib Error 73 error LNK2005: public: __thiscall std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar ::basic_stringchar,struct std::char_traitschar,class std::allocatorchar (char const *) (??0?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@q...@pbd@Z) already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib Error 74 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(class std::basic_ostreamchar,struct std::char_traitschar (__cdecl*)(class std::basic_ostreamchar,struct std::char_traitschar )) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@p6aaav01@AAV01@@z...@z) already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib Error 75 error LNK2005: class std::basic_ostreamchar,struct std::char_traitschar __cdecl std::endl(class std::basic_ostreamchar,struct std::char_traitschar ) (?e...@std@@yaaav?$basic_ostr...@du?$char_traits@d...@std@@@1...@aav21@@Z) already defined in dcmimgle.lib(dcmimage.obj)msvcprtd.lib Error 76 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(double) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@n@Z) already defined in dcmimgle.lib(diimage.obj) msvcprtd.lib Error 77 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(unsigned int) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@i@Z) already defined in dcmdata.lib(dchashdi.obj)msvcprtd.lib Error 78 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(class std::ios_base (__cdecl*)(class std::ios_base )) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@p6aaavios_base@1...@aav21@@z...@z) already defined in dcmdata.lib(dcfilefo.obj) msvcprtd.lib Error 79 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(int) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@h@Z) already defined in dcmimgle.lib(dimoimg.obj) msvcprtd.lib Error 80 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(unsigned short) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@g@Z) already defined in dcmimgle.lib(dimoimg.obj) msvcprtd.lib Error 81 error LNK2005: public: class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator(unsigned long) (??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@k@Z) already defined in dcmimgle.lib(dimoimg.obj) msvcprtd.lib Error 82 error LNK2005: public: char const * __thiscall std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar ::c_str(void)const (?c_...@?$basic_string@du?$char_tra...@d@std@@v?$alloca...@d@2@@std@@QBEPBDXZ) already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib Error 83 error LNK2005: public: __thiscall std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar