[osg-users] how to make a node fixed in screen position
hi all, I want to draw axes in screen position,the axes can't be scaled or transformed ,but which can be rotated with other scene.I do it like this,but the billboard (texts: 'X','Y','Z') doesn't work,what should I do to make the billboard work well?“axes.osg” is downloaded from the osg homepage. osgViewer::Viewer viewer; class orbit : public osg::NodeCallback { public: orbit() {} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::PositionAttitudeTransform *pat = dynamic_castosg::PositionAttitudeTransform *(node); if( tx != NULL ) { osg::Camera *camera=viewer.getCamera(); osg::Matrixd pMatrix = camera-getViewMatrix(); pat-setAttitude(pMatrix.getRotate()); } } }; osg::Group* fun() { osg::Group *group=new osg::Group(); osg::Node *axis=osgDB::readNodeFile(data\\axes.osg); osg::PositionAttitudeTransform * tran = new osg::PositionAttitudeTransform; tran-addChild(axis); tran-setPosition(osg::Vec3(5,5,0)); tran-setUpdateCallback(new orbit()); osg::MatrixTransform* ModelViewMatrix = new osg::MatrixTransform; ModelViewMatrix-setMatrix(osg::Matrix::identity()); ModelViewMatrix-setReferenceFrame(osg::Transform::ABSOLUTE_RF); ModelViewMatrix-addChild(tran); osg::Projection* ProjectionMatrix = new osg::Projection; ProjectionMatrix-setMatrix(osg::Matrix::ortho2D(0,10,0,10)); ProjectionMatrix-addChild(ModelViewMatrix); group-addChild(ProjectionMatrix); return group; } int _tmain(int argc, _TCHAR* argv[]) { osg::Group *mRoot =fun(); viewer.setSceneData(mRoot); return viewer.run(); } best regards forest ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] GUI - HUD
Hi all, I'm new with OSG and I'm doing my fist project. I would like to make a menu in the interface, someting like http://yag2002.sourceforge..net/pix/screen-11-05-b.jpg or like http://www.openscenegraph.org/projects/osg/attachment/wiki/Screenshots/Archivideo/paris20122.jpg A box, with a textbox, some buttons, etc. Do I need an extra library? I checked HUD tutorial, but I don't know how add other elements appart than text... Could you help me please? Thank in advance. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GUI - HUD
Hi Julen, Have a look at OsgWidget examples, it may help :)Regards, Cg Date: Thu, 11 Sep 2008 08:11:15 +From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [osg-users] GUI - HUD Hi all, I'm new with OSG and I'm doing my fist project.. I would like to make a menu in the interface, someting like http://yag2002.sourceforge.net/pix/screen-11-05-b.jpg or like http://www.openscenegraph.org/projects/osg/attachment/wiki/Screenshots/Archivideo/paris20122.jpgA box, with a textbox, some buttons, etc. Do I need an extra library? I checked HUD tutorial, but I don't know how add other elements appart than textCould you help me please?Thank in advance. _ Manage multiple email accounts with Windows Live Mail effortlessly. http://www.get.live.com/wl/all___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GUI - HUD
Hi Julen, If you want to create more flexible and complex GUI you should look at CEGUI. It may help you creating good HUD panels. Best Regards. Umit Uzun 2008/9/11 CG [EMAIL PROTECTED] Hi Julen, Have a look at OsgWidget examples, it may help :) Regards, Cg -- Date: Thu, 11 Sep 2008 08:11:15 + From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: [osg-users] GUI - HUD Hi all, I'm new with OSG and I'm doing my fist project.. I would like to make a menu in the interface, someting like http://yag2002.sourceforge.net/pix/screen-11-05-b.jpg or like http://www.openscenegraph.org/projects/osg/attachment/wiki/Screenshots/Archivideo/paris20122.jpg A box, with a textbox, some buttons, etc. Do I need an extra library? I checked HUD tutorial, but I don't know how add other elements appart than text Could you help me please? Thank in advance. -- Share your beautiful moments with Photo Gallery. Windows Live Photo Gallery http://get.live.com/photogallery/overview ___ 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] GUI - HUD
On Thu, Sep 11, 2008 at 9:41 AM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi Julen, If you want to create more flexible and complex GUI you should look at CEGUI. It may help you creating good HUD panels. N, CEGUI cause lots of problem in integration with the OSG, it's possible to do but in doing it you have hobble the OSG. From OSG-2.6 onwards osgWidget is integrated into the core OSG, and while still very young, is the route forward for 3D GUI work. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgTerrain::TerrainTile question
Hey Brian, I found the old post you were takling about. I copied it below. But where is the link to the code? Best regards, Nicolas Duval [osg-users] Paged Terrain Question *Brian R Hill* bhill22 at csc.com osg-users%40lists.openscenegraph.org?Subject=%5Bosg-users%5D%20Paged%20Terrain%20QuestionIn-Reply-To=20071219225056.76D7867830%40mail.frii.com *Wed Dec 19 15:19:07 PST 2007* - Previous message: [osg-users] Paged Terrain Question http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/005631.html - Next message: [osg-users] How can I use glHint() in OSG 1.2? http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/005635.html - *Messages sorted by:* [ date ]http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/date.html#5634 [ thread ]http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/thread.html#5634 [ subject ]http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/subject.html#5634 [ author ]http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/author.html#5634 -- Here's some code I hacked together. I tested it some, but . YMMV. Brian -osg-users-bounces at lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org wrote: - To: 'OpenSceneGraph Users' osg-users at lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org From: Paul Martz pmartz at skew-matrix.com http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Sent by: osg-users-bounces at lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Date: 12/19/2007 05:51PM Subject: Re: [osg-users] Paged Terrain Question This is a good solution. Perhaps a possible new feature for the existing OpenFlight importer would be an Option to use PagedLOD nodes for external references (and not load the external model), rather than ProxyNodes (and loading the model). -Paul * The process I use: - copy master.flt to another directory (hopefully the file** references aren't absolute paths)** - use osgDB:readNodeFile to read the copied master.flt. This** places osg::ProxyNodes in place of the actual .flt reference** files (because it can't find the referenced files)** - write a custom NodeVisitor to convert the osg::ProxyNodes** to osg::PagedLODs** - at the same time I convert the referenced .flts to .ives** and use their bounds to set the osg::PagedLODs center and radius.** - save the master.flt as master.ive (or master.osg) Brian -osg-users-bounces at lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org wrote: -** To: osg-users at lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org** From: paul.tanja at internode.on.net http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org** paul.tanja at internode.on.net http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Sent by:** osg-users-bounces at lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org** Date: 12/19/2007 05:00PM** Subject: [osg-users] Paged Terrain Question Hi, Im new to osg and I have an Openflight database, it has a** master.flt and would like to use osg to page it in rather** than loading all in memory at once . I'm not sure if** osgviewer is doing this already? or wether I should use** osgpagedLOD example to load in my database - if so how? Also down the track I would like to know which tiles are** being loaded in and which tiles are being loaded out. Where** would I be able to find the relevant point in the source code?* 2008/9/10, Coco [EMAIL PROTECTED]: 2008/9/10, Brian R Hill [EMAIL PROTECTED]: Nicholas, If the openflight files are already subdivided into a grid of tiles referenced into a single master file, then there's some code I posted to the list a couple months ago that will convert them to use pagelods and also convert them to .ive format for faster loading. Search the archives and you should see how to do it. Brian, Thanks a lot! I'm gonna take a look at this! Nicolas Brian [EMAIL PROTECTED] wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Coco [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 09/10/2008 05:55AM Subject: Re: [osg-users] osgTerrain::TerrainTile question 2008/9/10, Robert Osfield [EMAIL PROTECTED] : Hi Nicolas, I think you have got the wrong end of the stick. I was suggesting TerraPage as an illustration of how cultural data (3d models) can be stored in with the tiles on disk. In vis-sim industry TerraPage is well known so I used it as as a case in point to save
Re: [osg-users] GUI - HUD
Hi Robert, I advice the CEGUI because of Delta3D integrate the OSG and CEGUI in same platform. So I have thought it can be possible to integrate base osg project. Sorry, I made mistake. But if Julen want to take support CEGUI, ODE,OPENAL and etc with coding OSG, you should look at DELTA3D game engine. Best Regards. Umit Uzun 2008/9/11 Robert Osfield [EMAIL PROTECTED] On Thu, Sep 11, 2008 at 9:41 AM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi Julen, If you want to create more flexible and complex GUI you should look at CEGUI. It may help you creating good HUD panels. N, CEGUI cause lots of problem in integration with the OSG, it's possible to do but in doing it you have hobble the OSG. From OSG-2.6 onwards osgWidget is integrated into the core OSG, and while still very young, is the route forward for 3D GUI work. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Strange behavior with multiple screens and ImageStream
Hi all, We've made an ImageStream using FFmpeg to display movies on textures, but I am currently facing some problem when displaying this movie on two different contexts. Here is my setup : WinXP with one GForce 8600GTS and 2 screens, viewer on DrawThreadPerContext mode (OSG SVN head version). When I only have one screen but two windows (with a different context per window), everything works fine, the movie is displayed on the 2 windows without any problem. When I plug a second screen, and I keep the same setup (2 windows rendered into the first screen), I have a huge frame drop (more than 20 fps) when rendering my movie (note that in this configuration, nothing is displayed on the second screen). Same thing happens if I use the 2 screens (with each window in full screen mode on each screen). I really don't understand why adding a new screens make this difference, moreover it's the only thing in my application that suffer like that from the second screen. Does it ring a bell to someone ? Thanks in advance ! -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GUI - HUD
Hi all, Thanks for your help. As I'm beginner, maybe it is better start with osgWidget if CEGUI can cause some problems. But I'm using osg 2..4. Can I use osgWidget, or I have to download the 2.6 version. - Mensaje original De: Ümit Uzun [EMAIL PROTECTED] Para: OpenSceneGraph Users osg-users@lists.openscenegraph.org Enviado: jueves, 11 de septiembre, 2008 11:17:12 Asunto: Re: [osg-users] GUI - HUD Hi Robert, I advice the CEGUI because of Delta3D integrate the OSG and CEGUI in same platform. So I have thought it can be possible to integrate base osg project. Sorry, I made mistake. But if Julen want to take support CEGUI, ODE,OPENAL and etc with coding OSG, you should look at DELTA3D game engine. Best Regards. Umit Uzun 2008/9/11 Robert Osfield [EMAIL PROTECTED] On Thu, Sep 11, 2008 at 9:41 AM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi Julen, If you want to create more flexible and complex GUI you should look at CEGUI. It may help you creating good HUD panels. N, CEGUI cause lots of problem in integration with the OSG, it's possible to do but in doing it you have hobble the OSG. From OSG-2.6 onwards osgWidget is integrated into the core OSG, and while still very young, is the route forward for 3D GUI work. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] painting plane
Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GUI - HUD
Hi Julen, On Thu, Sep 11, 2008 at 11:11 AM, Julen García [EMAIL PROTECTED] wrote: As I'm beginner, maybe it is better start with osgWidget if CEGUI can cause some problems. But I'm using osg 2.4. Can I use osgWidget, or I have to download the 2.6 version. For osgWidget you'll need to use OSG-2.6. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] painting plane
Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ 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] painting plane
Hello, Robert Thanks so much - it really helps Ilia В Чтв, 11/09/2008 в 11:38 +0100, Robert Osfield пишет: Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mac OS X 10.5 crash in osgText
I seen some other threads mentioning FreeType not being thread save. This is OSG 2.6 branch This is replicable with plain osgviewer on OSX on a MBP 2.4 To replicate: export OSG_WINDOW='20 20 800 600' open osgviewer cow.osg press 's' to show the stats with '' and '' go up and down the window resolutions ... it crashes always at the same point ... see below Is there any solution? If so will it be backported to 2.6? Cheers, Hartmut Process: osgviewer [1487] Path:/usr/local/bin/osgviewer Identifier: osgviewer Version: ??? (???) Code Type: X86 (Native) Parent Process: bash [183] Date/Time: 2008-09-11 20:53:13.980 +1200 OS Version: Mac OS X 10.5.4 (9E17) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x19274010 Crashed Thread: 2 Thread 0: 0 libSystem.B.dylib 0x961f84a6 mach_msg_trap + 10 1 libSystem.B.dylib 0x961ffc9c mach_msg + 72 2 com.apple.CoreGraphics0x94deab4d _CGSRemoveSurface + 133 3 com.apple.agl 0x94d1dc56 aglSetDrawable + 448 4 libosgViewer.44.dylib 0x0017a460 osgViewer::GraphicsWindowCarbon::setWindowDecorationImplementation(bool) + 426 5 libosgViewer.44.dylib 0x00176ed0 osgViewer::GraphicsWindow::setWindowDecoration(bool) + 38 6 libosgViewer.44.dylib 0x00174959 osgViewer::WindowSizeHandler::changeWindowedResolution(osgViewer::GraphicsWindow*, bool) + 1039 7 libosgViewer.44.dylib 0x0017500c osgViewer::WindowSizeHandler::handle(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter) + 670 8 libosgViewer.44.dylib 0x00126752 osgGA::GUIEventHandler::handle(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter, osg::Object*, osg::NodeVisitor*) + 38 9 libosgViewer.44.dylib 0x001192d4 osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter, osg::Object*, osg::NodeVisitor*) + 120 10 libosgViewer.44.dylib 0x0016a27c osgViewer::Viewer::eventTraversal() + 4620 11 libosgViewer.44.dylib 0x0016eb21 osgViewer::ViewerBase::frame(double) + 159 12 libosgViewer.44.dylib 0x0016ea65 osgViewer::ViewerBase::run() + 239 13 libosgViewer.44.dylib 0x00161080 osgViewer::Viewer::run() + 182 14 osgviewer 0x865b main + 6241 15 osgviewer 0x6dce start + 54 Thread 1: 0 libSystem.B.dylib 0x961ff68e __semwait_signal + 10 1 libSystem.B.dylib 0x9622a36d pthread_cond_wait$UNIX2003 + 73 2 libGLProgrammability.dylib0x93b92432 glvmDoWork + 162 3 libSystem.B.dylib 0x962296f5 _pthread_start + 321 4 libSystem.B.dylib 0x962295b2 thread_start + 34 Thread 2 Crashed: 0 ??? 0x121ef200 0 + 304017920 1 GLEngine 0x00ed531a gleDrawArraysOrElements_ExecCore + 266 2 GLEngine 0x00ed6278 gleDrawArraysOrElements_IMM_Exec + 1080 3 libGL.dylib 0x96ddd7f1 glDrawArrays + 113 4 libosgText.44.dylib 0x002b4d55 osgText::Text::drawForegroundText(osg::State, osgText::Text::GlyphQuads const, osg::Vec4f const) const + 527 5 libosgText.44.dylib 0x002b5ac0 osgText::Text::renderOnlyForegroundText(osg::State, osg::Vec4f const) const + 118 6 libosgText.44.dylib 0x002b61bb osgText::Text::drawImplementation(osg::State, osg::Vec4f const) const + 1117 7 libosgText.44.dylib 0x002b68f1 osgText::Text::drawImplementation(osg::RenderInfo) const + 107 8 libosgViewer.44.dylib 0x00140e72 osgViewer::TextDrawCallback::drawImplementation(osg::RenderInfo, osg::Drawable const*) const + 548 9 libosgUtil.44.dylib 0x0052082e osg::Drawable::draw(osg::RenderInfo) const + 412 10 libosgUtil.44.dylib 0x00520368 osgUtil::RenderLeaf::render(osg::RenderInfo, osgUtil::RenderLeaf*) + 266 11 libosgUtil.44.dylib 0x00516a62 osgUtil::RenderBin::drawImplementation(osg::RenderInfo, osgUtil::RenderLeaf*) + 386 12 libosgUtil.44.dylib 0x005168dd osgUtil::RenderBin::draw(osg::RenderInfo, osgUtil::RenderLeaf*) + 107 13 libosgUtil.44.dylib 0x00516cbb osgUtil::RenderBin::drawImplementation(osg::RenderInfo, osgUtil::RenderLeaf*) + 987 14 libosgUtil.44.dylib 0x00524179 osgUtil::RenderStage::drawImplementation(osg::RenderInfo, osgUtil::RenderLeaf*) + 1005 15 libosgUtil.44.dylib 0x005168dd osgUtil::RenderBin::draw(osg::RenderInfo, osgUtil::RenderLeaf*) + 107 16 libosgUtil.44.dylib 0x00526b95 osgUtil::RenderStage::drawInner(osg::RenderInfo, osgUtil::RenderLeaf*, bool) + 363 17 libosgUtil.44.dylib 0x00526799
Re: [osg-users] Mac OS X 10.5 crash in osgText
Hi Hartmut, The FreeType plugin usage is guarded to prevent thread problems so while FreeType isn't thread safe, this shouldn't affect OSG-2.6, and almost certainly has no barring on the crash you describe. The crash you looks to be CGL issue, whether this is a threading issue or otherwise I cannot say at this stage. Try chnaging the threading models in osgviewer by pressing 'm', or run the app with the command line option --SingleThreaded etc. Robert. On Thu, Sep 11, 2008 at 12:23 PM, Hartmut Seichter [EMAIL PROTECTED] wrote: I seen some other threads mentioning FreeType not being thread save. This is OSG 2.6 branch This is replicable with plain osgviewer on OSX on a MBP 2.4 To replicate: export OSG_WINDOW='20 20 800 600' open osgviewer cow.osg press 's' to show the stats with '' and '' go up and down the window resolutions ... it crashes always at the same point ... see below Is there any solution? If so will it be backported to 2.6? Cheers, Hartmut Process: osgviewer [1487] Path:/usr/local/bin/osgviewer Identifier: osgviewer Version: ??? (???) Code Type: X86 (Native) Parent Process: bash [183] Date/Time: 2008-09-11 20:53:13.980 +1200 OS Version: Mac OS X 10.5.4 (9E17) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x19274010 Crashed Thread: 2 Thread 0: 0 libSystem.B.dylib 0x961f84a6 mach_msg_trap + 10 1 libSystem.B.dylib 0x961ffc9c mach_msg + 72 2 com.apple.CoreGraphics0x94deab4d _CGSRemoveSurface + 133 3 com.apple.agl 0x94d1dc56 aglSetDrawable + 448 4 libosgViewer.44.dylib 0x0017a460 osgViewer::GraphicsWindowCarbon::setWindowDecorationImplementation(bool) + 426 5 libosgViewer.44.dylib 0x00176ed0 osgViewer::GraphicsWindow::setWindowDecoration(bool) + 38 6 libosgViewer.44.dylib 0x00174959 osgViewer::WindowSizeHandler::changeWindowedResolution(osgViewer::GraphicsWindow*, bool) + 1039 7 libosgViewer.44.dylib 0x0017500c osgViewer::WindowSizeHandler::handle(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter) + 670 8 libosgViewer.44.dylib 0x00126752 osgGA::GUIEventHandler::handle(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter, osg::Object*, osg::NodeVisitor*) + 38 9 libosgViewer.44.dylib 0x001192d4 osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter, osg::Object*, osg::NodeVisitor*) + 120 10 libosgViewer.44.dylib 0x0016a27c osgViewer::Viewer::eventTraversal() + 4620 11 libosgViewer.44.dylib 0x0016eb21 osgViewer::ViewerBase::frame(double) + 159 12 libosgViewer.44.dylib 0x0016ea65 osgViewer::ViewerBase::run() + 239 13 libosgViewer.44.dylib 0x00161080 osgViewer::Viewer::run() + 182 14 osgviewer 0x865b main + 6241 15 osgviewer 0x6dce start + 54 Thread 1: 0 libSystem.B.dylib 0x961ff68e __semwait_signal + 10 1 libSystem.B.dylib 0x9622a36d pthread_cond_wait$UNIX2003 + 73 2 libGLProgrammability.dylib0x93b92432 glvmDoWork + 162 3 libSystem.B.dylib 0x962296f5 _pthread_start + 321 4 libSystem.B.dylib 0x962295b2 thread_start + 34 Thread 2 Crashed: 0 ??? 0x121ef200 0 + 304017920 1 GLEngine 0x00ed531a gleDrawArraysOrElements_ExecCore + 266 2 GLEngine 0x00ed6278 gleDrawArraysOrElements_IMM_Exec + 1080 3 libGL.dylib 0x96ddd7f1 glDrawArrays + 113 4 libosgText.44.dylib 0x002b4d55 osgText::Text::drawForegroundText(osg::State, osgText::Text::GlyphQuads const, osg::Vec4f const) const + 527 5 libosgText.44.dylib 0x002b5ac0 osgText::Text::renderOnlyForegroundText(osg::State, osg::Vec4f const) const + 118 6 libosgText.44.dylib 0x002b61bb osgText::Text::drawImplementation(osg::State, osg::Vec4f const) const + 1117 7 libosgText.44.dylib 0x002b68f1 osgText::Text::drawImplementation(osg::RenderInfo) const + 107 8 libosgViewer.44.dylib 0x00140e72 osgViewer::TextDrawCallback::drawImplementation(osg::RenderInfo, osg::Drawable const*) const + 548 9 libosgUtil.44.dylib 0x0052082e osg::Drawable::draw(osg::RenderInfo) const + 412 10 libosgUtil.44.dylib 0x00520368 osgUtil::RenderLeaf::render(osg::RenderInfo, osgUtil::RenderLeaf*) + 266 11 libosgUtil.44.dylib 0x00516a62 osgUtil::RenderBin::drawImplementation(osg::RenderInfo, osgUtil::RenderLeaf*) + 386 12 libosgUtil.44.dylib 0x005168dd osgUtil::RenderBin::draw(osg::RenderInfo, osgUtil::RenderLeaf*) +
[osg-users] fish eye projection
Hi, I need to output to a single channel fish eye projection lens . (Elumenati system) Is there a simple way to achieve this? Basically I believe there are 3 paths to chose from: 1. doing the fisheye projection yourself (similar to osgdistortion) 2. using the elumentai api, omnimap (only windows so I'm not to keen on this) 3. configuring osgViewer in some way? 1 and 2 is obvious but requires some work. I am hoping for 3 since I found files called *.view in the {$OSG_FILE_PATH}/Configuration folder. I have not found documentation on how to create or use those files so if someone has a pointer for me to start reading it would be great :) /Filip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] fish eye projection
Ok, I searched and tested a little bit more. Using -c congfigfile.view should have been the first thing to try out. Sorry about that. But anyway, Is there some documentation of how the rendering is set up etc? Complications etc? Would be nice to understand and be able to change depending on the needs that occurs. /Filip On Thu, Sep 11, 2008 at 1:46 PM, Filip Wänström [EMAIL PROTECTED]wrote: Hi, I need to output to a single channel fish eye projection lens . (Elumenati system) Is there a simple way to achieve this? Basically I believe there are 3 paths to chose from: 1. doing the fisheye projection yourself (similar to osgdistortion) 2. using the elumentai api, omnimap (only windows so I'm not to keen on this) 3. configuring osgViewer in some way? 1 and 2 is obvious but requires some work. I am hoping for 3 since I found files called *.view in the {$OSG_FILE_PATH}/Configuration folder. I have not found documentation on how to create or use those files so if someone has a pointer for me to start reading it would be great :) /Filip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] fish eye projection
Robert, thanks for clearing that out. I'll experiment and see what I come up with. I would also prefer not to use/integrate 3rd party libs. /Filip On Thu, Sep 11, 2008 at 2:02 PM, Robert Osfield [EMAIL PROTECTED]wrote: Hi Flilip, The .view format is still in a very early stage of development, so only supports a select range of convenience methods that are provided in the osgViewer::View::setUpView*() methods. The OSG also has Producer .cfg plugin which allows you to use Producer configuration files, these are more feature rich that the present .view in terms of controlling windows, viewports, projections and view matrices and their offsets, but doesn't support any distortion correction so won't be of use to you. The dome distortion correction that is provided .view and VIew::setUpView*() methods are just for full spherical projection. If you need another type of dome correction then you'll need to roll you own setup. The View::setUp*() methods and the distortion examples should provide a useful guide. Diving into 3rd party libs for setting up the rendering I'd personally avoid as they'll just complicate your application, and will limit the threading options you have in your viewer. Robert. On Thu, Sep 11, 2008 at 12:46 PM, Filip Wänström [EMAIL PROTECTED] wrote: Hi, I need to output to a single channel fish eye projection lens . (Elumenati system) Is there a simple way to achieve this? Basically I believe there are 3 paths to chose from: 1. doing the fisheye projection yourself (similar to osgdistortion) 2. using the elumentai api, omnimap (only windows so I'm not to keen on this) 3. configuring osgViewer in some way? 1 and 2 is obvious but requires some work. I am hoping for 3 since I found files called *.view in the {$OSG_FILE_PATH}/Configuration folder. I have not found documentation on how to create or use those files so if someone has a pointer for me to start reading it would be great :) /Filip ___ 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] fish eye projection
Hi Flilip, The .view format is still in a very early stage of development, so only supports a select range of convenience methods that are provided in the osgViewer::View::setUpView*() methods. The OSG also has Producer .cfg plugin which allows you to use Producer configuration files, these are more feature rich that the present .view in terms of controlling windows, viewports, projections and view matrices and their offsets, but doesn't support any distortion correction so won't be of use to you. The dome distortion correction that is provided .view and VIew::setUpView*() methods are just for full spherical projection. If you need another type of dome correction then you'll need to roll you own setup. The View::setUp*() methods and the distortion examples should provide a useful guide. Diving into 3rd party libs for setting up the rendering I'd personally avoid as they'll just complicate your application, and will limit the threading options you have in your viewer. Robert. On Thu, Sep 11, 2008 at 12:46 PM, Filip Wänström [EMAIL PROTECTED] wrote: Hi, I need to output to a single channel fish eye projection lens . (Elumenati system) Is there a simple way to achieve this? Basically I believe there are 3 paths to chose from: 1. doing the fisheye projection yourself (similar to osgdistortion) 2. using the elumentai api, omnimap (only windows so I'm not to keen on this) 3. configuring osgViewer in some way? 1 and 2 is obvious but requires some work. I am hoping for 3 since I found files called *.view in the {$OSG_FILE_PATH}/Configuration folder. I have not found documentation on how to create or use those files so if someone has a pointer for me to start reading it would be great :) /Filip ___ 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] fish eye projection
Hi Filip, If you system is a relatively common configuration then we might be able to add a View::setView*() and associated support into .view format, this way others will benefit and will be able to test the functionality. The way I developed the spherical display support was by creating experimental code in the osgdisortion example, then when it was ready I moved the code into osgViewer::View, then further evolve the code from there. Perhaps the same approach might work for you. Robert. On Thu, Sep 11, 2008 at 1:07 PM, Filip Wänström [EMAIL PROTECTED] wrote: Robert, thanks for clearing that out. I'll experiment and see what I come up with. I would also prefer not to use/integrate 3rd party libs. /Filip On Thu, Sep 11, 2008 at 2:02 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Flilip, The .view format is still in a very early stage of development, so only supports a select range of convenience methods that are provided in the osgViewer::View::setUpView*() methods. The OSG also has Producer .cfg plugin which allows you to use Producer configuration files, these are more feature rich that the present .view in terms of controlling windows, viewports, projections and view matrices and their offsets, but doesn't support any distortion correction so won't be of use to you. The dome distortion correction that is provided .view and VIew::setUpView*() methods are just for full spherical projection. If you need another type of dome correction then you'll need to roll you own setup. The View::setUp*() methods and the distortion examples should provide a useful guide. Diving into 3rd party libs for setting up the rendering I'd personally avoid as they'll just complicate your application, and will limit the threading options you have in your viewer. Robert. On Thu, Sep 11, 2008 at 12:46 PM, Filip Wänström [EMAIL PROTECTED] wrote: Hi, I need to output to a single channel fish eye projection lens . (Elumenati system) Is there a simple way to achieve this? Basically I believe there are 3 paths to chose from: 1. doing the fisheye projection yourself (similar to osgdistortion) 2. using the elumentai api, omnimap (only windows so I'm not to keen on this) 3. configuring osgViewer in some way? 1 and 2 is obvious but requires some work. I am hoping for 3 since I found files called *.view in the {$OSG_FILE_PATH}/Configuration folder. I have not found documentation on how to create or use those files so if someone has a pointer for me to start reading it would be great :) /Filip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] painting plane
Hello This technic working fine for poligons, but is it possible to make this trick to lines? I need exactly two lines, not three as in triangle. I trying in such way group-addChild( geode_with_poligons ); group-addChild( geode_with_lines ); group-getOrCreateStateSet()-setMode( GL_CULL_FACE, GL_BACK | osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON ); Thanks Ilia В Чтв, 11/09/2008 в 14:46 +0400, Korolyov Ilia пишет: Hello, Robert Thanks so much - it really helps Ilia В Чтв, 11/09/2008 в 11:38 +0100, Robert Osfield пишет: Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open/Close the window on win32
Hello, This is something I'd like to make available as well. I have tried to implement a function that restores the previous graphic context one the window as been closed. Nothing has been successful. Is such a thing possible with osg? Thanks On Tue, Sep 9, 2008 at 3:00 PM, Lucas Lallement [EMAIL PROTECTED]wrote: Hey all, My software receives orders such as play, pause but also close and open window. I was wondering what was the best way to close (or hide) the osgViewer window on win32 to later on reopen it without having lost what is going on (video being played on a node). Everything I have tried so far makes me loose the context when I reopen the window. I am using osg 2.4.0 on Windows 2000 with a Nvidia GeForce 7800GS Regards, Lucas Lallement ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Christophe Loustaunau. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GUI - HUD
On Thu, 2008-09-11 at 11:35 +0100, Robert Osfield wrote: Hi Julen, On Thu, Sep 11, 2008 at 11:11 AM, Julen García [EMAIL PROTECTED] wrote: As I'm beginner, maybe it is better start with osgWidget if CEGUI can cause some problems. But I'm using osg 2.4. Can I use osgWidget, or I have to download the 2.6 version. For osgWidget you'll need to use OSG-2.6. There are, of course, still many things missing in osgWidget, but I'm working on those as fast as I can. :) The two biggest things are a good Input widget (osgText changes needed, or be willing to use the osgPango nodekit I'm writing) and to finish the styling interfaces, so folk don't have to call the same -set* functions on every widget 9 billion times. However, everything I've seen in the screenshots you've provided thus far (minus the input box) is absolutely possible w/ osgWidget right now, although you might have to use my osgWidget branch for it. :) 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] Returning ref_ptr vs. ref_ptr::get()
Hi Paul Martz, The example in the middle of page 37, above the one Cliff cited, looks like it won't compile. Did you really mean to return *grp? I know it's meant to show bad programming practice but the book reads like it should compile. osg::Group* CreateGroup() { osg::ref_ptrosg::Group grp = new osg::Group; return *grp; } -Original Message- From: Cliff Taylor [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 1:23 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Returning ref_ptr vs. ref_ptr::get() osg::ref_ptrosg::Group createGroup() { osg::ref_ptrosg::Group grp = new osg::Group; //comments return grp.get() } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange behavior with multiple screens and ImageStream
I am not an expert in this area, but our application seems to suffer from this as well. I don't think this has to do with OSG. I believe it to be more driver related. Do you have VSync turned on? If you do, force VSync to be always off and retest. Ryan H. Kawicki The Boeing Company Training Systems Services Software Engineer From: Serge Lages [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2008 4:53 AM To: OpenSceneGraph Users Subject: [osg-users] Strange behavior with multiple screens and ImageStream Hi all, We've made an ImageStream using FFmpeg to display movies on textures, but I am currently facing some problem when displaying this movie on two different contexts. Here is my setup : WinXP with one GForce 8600GTS and 2 screens, viewer on DrawThreadPerContext mode (OSG SVN head version). When I only have one screen but two windows (with a different context per window), everything works fine, the movie is displayed on the 2 windows without any problem. When I plug a second screen, and I keep the same setup (2 windows rendered into the first screen), I have a huge frame drop (more than 20 fps) when rendering my movie (note that in this configuration, nothing is displayed on the second screen). Same thing happens if I use the 2 screens (with each window in full screen mode on each screen). I really don't understand why adding a new screens make this difference, moreover it's the only thing in my application that suffer like that from the second screen. Does it ring a bell to someone ? Thanks in advance ! -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgTerrain::TerrainTile question
If you go here: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-December/005634.html The link is near the bottom: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071219/eaa1ef2c/attachment.obj Brian Date: Thu, 11 Sep 2008 11:13:20 +0200 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgTerrain::TerrainTile question Hey Brian, I found the old post you were takling about. I copied it below. But where is the link to the code? Best regards, Nicolas Duval [osg-users] Paged Terrain QuestionBrian R Hill bhill22 at csc.com Wed Dec 19 15:19:07 PST 2007 Previous message: [osg-users] Paged Terrain Question Next message: [osg-users] How can I use glHint() in OSG 1.2? Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Here's some code I hacked together. I tested it some, but . YMMV. Brian -osg-users-bounces at lists.openscenegraph.org wrote: - To: 'OpenSceneGraph Users' osg-users at lists.openscenegraph.org From: Paul Martz pmartz at skew-matrix.com Sent by: osg-users-bounces at lists.openscenegraph.org Date: 12/19/2007 05:51PM Subject: Re: [osg-users] Paged Terrain Question This is a good solution. Perhaps a possible new feature for the existing OpenFlight importer would be an Option to use PagedLOD nodes for external references (and not load the external model), rather than ProxyNodes (and loading the model). -Paul The process I use: - copy master.flt to another directory (hopefully the file references aren't absolute paths) - use osgDB:readNodeFile to read the copied master.flt. This places osg::ProxyNodes in place of the actual .flt reference files (because it can't find the referenced files) - write a custom NodeVisitor to convert the osg::ProxyNodes to osg::PagedLODs - at the same time I convert the referenced .flts to .ives and use their bounds to set the osg::PagedLODs center and radius. - save the master.flt as master.ive (or master.osg) Brian -osg-users-bounces at lists.openscenegraph.org wrote: - To: osg-users at lists.openscenegraph.org From: paul.tanja at internode.on.net paul.tanja at internode.on.net Sent by: osg-users-bounces at lists.openscenegraph.org Date: 12/19/2007 05:00PM Subject: [osg-users] Paged Terrain Question Hi, Im new to osg and I have an Openflight database, it has a master.flt and would like to use osg to page it in rather than loading all in memory at once . I'm not sure if osgviewer is doing this already? or wether I should use osgpagedLOD example to load in my database - if so how? Also down the track I would like to know which tiles are being loaded in and which tiles are being loaded out. Where would I be able to find the relevant point in the source code? 2008/9/10, Coco [EMAIL PROTECTED]: 2008/9/10, Brian R Hill [EMAIL PROTECTED]: Nicholas, If the openflight files are already subdivided into a grid of tiles referenced into a single master file, then there's some code I posted to the list a couple months ago that will convert them to use pagelods and also convert them to .ive format for faster loading. Search the archives and you should see how to do it. Brian, Thanks a lot! I'm gonna take a look at this! Nicolas Brian [EMAIL PROTECTED] wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Coco [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 09/10/2008 05:55AM Subject: Re: [osg-users] osgTerrain::TerrainTile question 2008/9/10, Robert Osfield [EMAIL PROTECTED] : Hi Nicolas, I think you have got the wrong end of the stick. I was suggesting TerraPage as an illustration of how cultural data (3d models) can be stored in with the tiles on disk. In vis-sim industry TerraPage is well known so I used it as as a case in point to save typing lots... FYI, The OSG's TerraPage plugin uses the PagedLOD and the DatabasePager under the hood to provide it's paging functionality. In your case the problem is about creating databases not actually rendering them - as the OSG will do all the paging, and threading for you thanks the DatabasePager and other related classes. The DatabasePage doesn't help you create databases, it's tools like VirtualPlanetBuilder that do this, but... right now VPB doesn't support insertion of cultural data into the tiles, so you'll need post process the database to insert this data. Robert. I think there is a missunderstanding. My problem is to load a big database, not to create it. I already have my database, fragmented in FLT files like I said. So I was suggesting to use DatabasePager to load flt nodes when I need it to. In this case I think I don't have to process any data... I hope I haven't got the wrong end of the stick (again!). Nicolas On Wed, Sep 10, 2008 at 9:49 AM, Coco [EMAIL PROTECTED] wrote: Thank you very much for your ideas! I found out the osgDB::DatabasePager
Re: [osg-users] OverlayNode bug
Hi Robert, 2008/9/10 Robert Osfield [EMAIL PROTECTED] Hi Mathieu, I don't know the cause/or a solution to the problem, but in the case of VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY a GLSL vertex and fragment program is used to generate the results, so I'd guess that the shader simply doesn't know about the texture blending required. Have a look into the implementation to see if you can get things work. Some updates : The fragment shader correctly uses the overlay alpha color value to mix between the original texture and the overlayed texture. So it is not the shader that is the problem but the RTT camera that produces something wrong. By tweaking the fragment shader to use the alpha channel on the color channels it appears that the background of the overlay texture is transparent and the projected objects are opaque (where they should be transparent). Still loooking... -- Mathieu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] painting plane
Doubtful really as lines don't have back faces.. Gordon __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Korolyov Ilia Sent: Thursday, September 11, 2008 9:20 AM To: OpenSceneGraph Users Subject: Re: [osg-users] painting plane Hello This technic working fine for poligons, but is it possible to make this trick to lines? I need exactly two lines, not three as in triangle. I trying in such way group-addChild( geode_with_poligons ); group-addChild( geode_with_lines ); group-getOrCreateStateSet()-setMode( GL_CULL_FACE, GL_BACK | osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON ); Thanks Ilia В Чтв, 11/09/2008 в 14:46 +0400, Korolyov Ilia пишет: Hello, Robert Thanks so much - it really helps Ilia В Чтв, 11/09/2008 в 11:38 +0100, Robert Osfield пишет: Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegr aph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap h.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open/Close the window on win32
Hi, Recycling context id's is something that seems fixed in 2.6.0. I'm not sure if you can keep a graphics context around without a window however you can keep the scene graph around. Just hold onto a ref ptr to the root node of your scene graph. You should be able to open a new window and create a new viewer and pass in the root node of the SG you've kept around. (I'm not sure if video's/ animations will still be played though. Try it out.) Thanks, Brett christophe loustaunau wrote: Hello, This is something I'd like to make available as well. I have tried to implement a function that restores the previous graphic context one the window as been closed. Nothing has been successful. Is such a thing possible with osg? Thanks On Tue, Sep 9, 2008 at 3:00 PM, Lucas Lallement [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hey all, My software receives orders such as play, pause but also close and open window. I was wondering what was the best way to close (or hide) the osgViewer window on win32 to later on reopen it without having lost what is going on (video being played on a node). Everything I have tried so far makes me loose the context when I reopen the window. I am using osg 2.4.0 on Windows 2000 with a Nvidia GeForce 7800GS Regards, Lucas Lallement ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Christophe Loustaunau. ___ 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] fish eye projection
Nice to hear! I don't have access to the actual inflatable dome at this time but I am trying to do a quick-and-dirty app to help me display media and models for testing purposes. By using 3DSphericalDisplayTopProjector.view with the projector matrix set to identity I think I have something close to what I need. At least it's a great starting point:) /F On Thu, Sep 11, 2008 at 3:40 PM, Jean-Sébastien Guay [EMAIL PROTECTED] wrote: Hi Filip, Robert, Diving into 3rd party libs for setting up the rendering I'd personally avoid as they'll just complicate your application, and will limit the threading options you have in your viewer. Personally I have integrated our rendering backend here at work with both OmniMap and EasyBlend (still based on OSG 2.2, but moving to 2.6 soon). * OmniMap does only fisheye correction * EasyBlend does correction for a variety of display geometries (dome, cylinder, etc) and edge blending for any number of projectors. Though the initial integration needed some care, we now have a setup that is not limited in terms of threading. We can use any threading mode that OSG supports with both integrations. And in both cases the actual integration needed just a simple class of about 150-200 lines, nothing really complicated. Yes, they are Win32 only though. But they were pretty straightforward to integrate, and the automatic calibration done by EasyBlend (it uses a digital camera and analyzes the resulting images to calibrate itself) saves us a lot of time in the field. Just sharing my experiences. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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] painting plane
Ok. Coming back to first letter - what is right way to do such painting? As I understand, proper way to change scene - is using UpdateCallback. But in UpdateCallback there is no camera information. So I can't define suitable color for lines. In CullCallback there is camera information, but it's forbidden to change scene in CullCallback. It's possible to save reference to camera object in UpdateCallback descendant. Is it correct way? Thanks Ilia В Чтв, 11/09/2008 в 09:28 -0400, Tomlinson, Gordon пишет: Doubtful really as lines don't have back faces.. Gordon __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Korolyov Ilia Sent: Thursday, September 11, 2008 9:20 AM To: OpenSceneGraph Users Subject: Re: [osg-users] painting plane Hello This technic working fine for poligons, but is it possible to make this trick to lines? I need exactly two lines, not three as in triangle. I trying in such way group-addChild( geode_with_poligons ); group-addChild( geode_with_lines ); group-getOrCreateStateSet()-setMode( GL_CULL_FACE, GL_BACK | osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON ); Thanks Ilia В Чтв, 11/09/2008 в 14:46 +0400, Korolyov Ilia пишет: Hello, Robert Thanks so much - it really helps Ilia В Чтв, 11/09/2008 в 11:38 +0100, Robert Osfield пишет: Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegr aph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap h.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] painting plane
Hi Ilia, The way I'd do it be to use a cull callback that decides between two subgraphs to traverse, one for the front face, one for the back, this would mean that your scene graph doesn't change with the viewport, and it'll scale nicely on multi-threaded and multi-camera setups. The other approach would be to use a vertex shader to change the light, or to use two sided lighting, which if you orientate the normals on the light correctly will work for you. Robert. On Thu, Sep 11, 2008 at 4:35 PM, Korolyov Ilia [EMAIL PROTECTED] wrote: Ok. Coming back to first letter - what is right way to do such painting? As I understand, proper way to change scene - is using UpdateCallback. But in UpdateCallback there is no camera information. So I can't define suitable color for lines. In CullCallback there is camera information, but it's forbidden to change scene in CullCallback. It's possible to save reference to camera object in UpdateCallback descendant. Is it correct way? Thanks Ilia В Чтв, 11/09/2008 в 09:28 -0400, Tomlinson, Gordon пишет: Doubtful really as lines don't have back faces.. Gordon __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Korolyov Ilia Sent: Thursday, September 11, 2008 9:20 AM To: OpenSceneGraph Users Subject: Re: [osg-users] painting plane Hello This technic working fine for poligons, but is it possible to make this trick to lines? I need exactly two lines, not three as in triangle. I trying in such way group-addChild( geode_with_poligons ); group-addChild( geode_with_lines ); group-getOrCreateStateSet()-setMode( GL_CULL_FACE, GL_BACK | osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON ); Thanks Ilia В Чтв, 11/09/2008 в 14:46 +0400, Korolyov Ilia пишет: Hello, Robert Thanks so much - it really helps Ilia В Чтв, 11/09/2008 в 11:38 +0100, Robert Osfield пишет: Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegr aph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap h.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Lightning strike effect
Anyone have tips or other thoughts on implementing a lightning strike effect? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] painting plane
Hi, Robert I'll try first one. Thanks Ilia В Чтв, 11/09/2008 в 16:40 +0100, Robert Osfield пишет: Hi Ilia, The way I'd do it be to use a cull callback that decides between two subgraphs to traverse, one for the front face, one for the back, this would mean that your scene graph doesn't change with the viewport, and it'll scale nicely on multi-threaded and multi-camera setups. The other approach would be to use a vertex shader to change the light, or to use two sided lighting, which if you orientate the normals on the light correctly will work for you. Robert. On Thu, Sep 11, 2008 at 4:35 PM, Korolyov Ilia [EMAIL PROTECTED] wrote: Ok. Coming back to first letter - what is right way to do such painting? As I understand, proper way to change scene - is using UpdateCallback. But in UpdateCallback there is no camera information. So I can't define suitable color for lines. In CullCallback there is camera information, but it's forbidden to change scene in CullCallback. It's possible to save reference to camera object in UpdateCallback descendant. Is it correct way? Thanks Ilia В Чтв, 11/09/2008 в 09:28 -0400, Tomlinson, Gordon пишет: Doubtful really as lines don't have back faces.. Gordon __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Korolyov Ilia Sent: Thursday, September 11, 2008 9:20 AM To: OpenSceneGraph Users Subject: Re: [osg-users] painting plane Hello This technic working fine for poligons, but is it possible to make this trick to lines? I need exactly two lines, not three as in triangle. I trying in such way group-addChild( geode_with_poligons ); group-addChild( geode_with_lines ); group-getOrCreateStateSet()-setMode( GL_CULL_FACE, GL_BACK | osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON ); Thanks Ilia В Чтв, 11/09/2008 в 14:46 +0400, Korolyov Ilia пишет: Hello, Robert Thanks so much - it really helps Ilia В Чтв, 11/09/2008 в 11:38 +0100, Robert Osfield пишет: Hi Ilia, If one side of the plane should be red, and the other blue then you could render two polygons for the plane, each with opposite winding and colour, then use glCullFace(osg::CullFace) to cull the faces to give the illusion of changing colour. The other technique you could use of two sided colour in the OpenGL lighting/material model, not all hardware/drivers supports two side lighting though. Robert. On Thu, Sep 11, 2008 at 11:22 AM, Korolyov Ilia [EMAIL PROTECTED] wrote: Hello I need to draw a plane (more exactly two lines by three points). Problem is in plane color. It must depends on camera position relative plane side - red or blue. I did it with CullCallback, because it's only one way to get access to camera, which I can find. What is right way to do it? Thanks Ilia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegr aph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap h.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ 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] Returning ref_ptr vs. ref_ptr::get()
The example in the middle of page 37, above the one Cliff cited, looks like it won't compile. Did you really mean to return *grp? I know it's meant to show bad programming practice but the book reads like it should compile. You are correct, that code is wrong. I meant to return grp.get() as an example of returning a dangling pointer. I've added this to the errata at http://www.skew-matrix.com/osgqsg/. Thanks for catching this. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange behavior with multiple screens and ImageStream
Hi Ryan, Thanks for the tip but it doesn't change anything for me... :/ The solution will be to not display the video in full resolution on the 2 screens for the moment. On Thu, Sep 11, 2008 at 4:18 PM, Kawicki, Ryan H [EMAIL PROTECTED]wrote: I am not an expert in this area, but our application seems to suffer from this as well. I don't think this has to do with OSG. I believe it to be more driver related. Do you have VSync turned on? If you do, force VSync to be always off and retest. *Ryan H. Kawicki* The Boeing Company Training Systems Services Software Engineer -- *From:* Serge Lages [mailto:[EMAIL PROTECTED] *Sent:* Thursday, September 11, 2008 4:53 AM *To:* OpenSceneGraph Users *Subject:* [osg-users] Strange behavior with multiple screens and ImageStream Hi all, We've made an ImageStream using FFmpeg to display movies on textures, but I am currently facing some problem when displaying this movie on two different contexts. Here is my setup : WinXP with one GForce 8600GTS and 2 screens, viewer on DrawThreadPerContext mode (OSG SVN head version). When I only have one screen but two windows (with a different context per window), everything works fine, the movie is displayed on the 2 windows without any problem. When I plug a second screen, and I keep the same setup (2 windows rendered into the first screen), I have a huge frame drop (more than 20 fps) when rendering my movie (note that in this configuration, nothing is displayed on the second screen). Same thing happens if I use the 2 screens (with each window in full screen mode on each screen). I really don't understand why adding a new screens make this difference, moreover it's the only thing in my application that suffer like that from the second screen. Does it ring a bell to someone ? Thanks in advance ! -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- 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] Movie texture on poly
Robert, Thank you, I did not know that movies started paused. Yes, I've got the movies playing via osgmovie, and by using the command osgviewer --movie myanim.gif So that's all working! Hooray! So I guess my big question would be how do you call play on a movie in a .osg file? Thank you for your help, -Patrick - Message: 11 Date: Mon, 8 Sep 2008 09:55:19 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Movie texture on poly To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Patrick, Have you tried loading the images via osgmovie? Movies load paused, you have to call play on them get them to play. Robert. On Mon, Sep 8, 2008 at 4:07 AM, Patrick Webb [EMAIL PROTECTED] wrote: Robert, Sorry for not including some important information. Yes to having compiled OSG with qt. The system I'm working on is running Fedora Core 7, and the latest version of xine is installed. I can live without MPEG4, since the animated textures I want to use can be done up as GIF animations. Let me know if you need more information, -Patrick Date: Fri, 5 Sep 2008 09:13:24 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Movie texture on poly To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Patrick, I presume you have quicktime installed and compiled the OSG's qt plugin on on your system, you make may no mention if you've done this or if what system you are working on. Quicktime is requied for Mpeg4 files, but only available under OSX and Windows. Under Linux you'll need to to you the xine-lib plugin, but xine-lib doesn't yet support mpeg4 as far as I'm aware. Robert. On Fri, Sep 5, 2008 at 1:26 AM, Patrick A. Webb [EMAIL PROTECTED] wrote: Hello, I'm trying to use osgviewer to display some models created in Blender, and use animated textures (MPEG4 movies or even animated GIFs) on those models. I've read through the archives and found mention of replacing the texture file name in the .osg file with the name of the movie that's going to be the animated texture, but I've had no luck getting the texture to actually animate. Does anyone have an example .osg file and an associated movie that worktogether to play an animated texture on a polygon? Thanks in advance for any help. -Patrick Webb ___ 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 End of osg-users Digest, Vol 15, Issue 19 * ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OverlayNode : Proble setting render target implementation
Hi All, I am trying to set Render target implementation using function setRenderTargetImplementation() in my application but it is not changing, When i looked in to the code I found out that the init() function is called in constructor, which in turn calls function getOverlayData(); for the first time, where default _renderTargetImpl(FBO) is set. Now if i call the function setRenderTargetImplementation() for changing render target implementation, it again calls getOverlayData(0), function returns without doing anything as OverlayData is already created for cv = 0. I am using OSG 2.6. Am i missing something or this might be a bug. Best regards, Rahul -- Rahul Jain, Member of Technical Staff, Visualization Experts Limited. www.vizexperts.com +91-98109-83697 (M) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Movie texture on poly
On Thu, Sep 11, 2008 at 6:51 PM, Patrick Webb [EMAIL PROTECTED] wrote: So that's all working! Hooray! So I guess my big question would be how do you call play on a movie in a .osg file? You'll need to write a visitor to find the ImageStream and then play them. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OverlayNode : Proble setting render target implementation
Hi Ravi, I submitted a fix for this but it didn't make it into the 2.6 release. Moving to the trunk should fix the problem. I also don't think this made it into the 2.6 maintainence branch either, perhaps it should? Thanks! Jason On Thu, Sep 11, 2008 at 2:19 PM, Rahul Jain [EMAIL PROTECTED] wrote: Hi All, I am trying to set Render target implementation using function setRenderTargetImplementation() in my application but it is not changing, When i looked in to the code I found out that the init() function is called in constructor, which in turn calls function getOverlayData(); for the first time, where default _renderTargetImpl(FBO) is set. Now if i call the function setRenderTargetImplementation() for changing render target implementation, it again calls getOverlayData(0), function returns without doing anything as OverlayData is already created for cv = 0. I am using OSG 2.6. Am i missing something or this might be a bug. Best regards, Rahul -- Rahul Jain, Member of Technical Staff, Visualization Experts Limited. www.vizexperts.com +91-98109-83697 (M) ___ 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] Returning ref_ptr vs. ref_ptr::get()
El Jueves 11 Septiembre 2008ES 18:37:07 Paul Martz escribió: The example in the middle of page 37, above the one Cliff cited, looks like it won't compile. Did you really mean to return *grp? I know it's meant to show bad programming practice but the book reads like it should compile. You are correct, that code is wrong. I meant to return grp.get() as an example of returning a dangling pointer. I've added this to the errata at http://www.skew-matrix.com/osgqsg/. Thanks for catching this. Curious. I already had return *grp on my hard copy. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Returning ref_ptr vs. ref_ptr::get()
El Jueves 11 Septiembre 2008ES 18:37:07 Paul Martz escribió: The example in the middle of page 37, above the one Cliff cited, looks like it won't compile. Did you really mean to return *grp? I know it's meant to show bad programming practice but the book reads like it should compile. You are correct, that code is wrong. I meant to return grp.get() as an example of returning a dangling pointer. I've added this to the errata at http://www.skew-matrix.com/osgqsg/. Thanks for catching this. Curious. I already had return *grp on my hard copy. Yes, and that's wrong. return *grp returns and instance of a Group, but the function is declared to return a pointer to a Group, so it won't compile. (The example is meant to demonstrate a common coding mistake, but it should at least compile. :-) The example should be changed to read return grp.get(). This is the correct way to demonstrate returning a dangling pointer (something you should never do). -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X 10.5 crash in osgText
Well, sorry I forgot to mention it certainly works with singlethreaded mode. I could try to reproduce it with a simpler example but I think osgviewer is as lean as it gets. If I don't switch on the HUD in osgviewer the problem does not occur - or lets say I can't reproduce it. We have some other applications which could benefit from multi threading but show exactly the same behaviour when using a HUD i.e osgText. H Robert Osfield wrote: Hi Hartmut, The FreeType plugin usage is guarded to prevent thread problems so while FreeType isn't thread safe, this shouldn't affect OSG-2.6, and almost certainly has no barring on the crash you describe. The crash you looks to be CGL issue, whether this is a threading issue or otherwise I cannot say at this stage. Try chnaging the threading models in osgviewer by pressing 'm', or run the app with the command line option --SingleThreaded etc. Robert. On Thu, Sep 11, 2008 at 12:23 PM, Hartmut Seichter [EMAIL PROTECTED] wrote: I seen some other threads mentioning FreeType not being thread save. This is OSG 2.6 branch This is replicable with plain osgviewer on OSX on a MBP 2.4 To replicate: export OSG_WINDOW='20 20 800 600' open osgviewer cow.osg press 's' to show the stats with '' and '' go up and down the window resolutions ... it crashes always at the same point ... see below Is there any solution? If so will it be backported to 2.6? Cheers, Hartmut Process: osgviewer [1487] Path:/usr/local/bin/osgviewer Identifier: osgviewer Version: ??? (???) Code Type: X86 (Native) Parent Process: bash [183] Date/Time: 2008-09-11 20:53:13.980 +1200 OS Version: Mac OS X 10.5.4 (9E17) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x19274010 Crashed Thread: 2 Thread 0: 0 libSystem.B.dylib 0x961f84a6 mach_msg_trap + 10 1 libSystem.B.dylib 0x961ffc9c mach_msg + 72 2 com.apple.CoreGraphics0x94deab4d _CGSRemoveSurface + 133 3 com.apple.agl 0x94d1dc56 aglSetDrawable + 448 4 libosgViewer.44.dylib 0x0017a460 osgViewer::GraphicsWindowCarbon::setWindowDecorationImplementation(bool) + 426 5 libosgViewer.44.dylib 0x00176ed0 osgViewer::GraphicsWindow::setWindowDecoration(bool) + 38 6 libosgViewer.44.dylib 0x00174959 osgViewer::WindowSizeHandler::changeWindowedResolution(osgViewer::GraphicsWindow*, bool) + 1039 7 libosgViewer.44.dylib 0x0017500c osgViewer::WindowSizeHandler::handle(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter) + 670 8 libosgViewer.44.dylib 0x00126752 osgGA::GUIEventHandler::handle(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter, osg::Object*, osg::NodeVisitor*) + 38 9 libosgViewer.44.dylib 0x001192d4 osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask(osgGA::GUIEventAdapter const, osgGA::GUIActionAdapter, osg::Object*, osg::NodeVisitor*) + 120 10 libosgViewer.44.dylib 0x0016a27c osgViewer::Viewer::eventTraversal() + 4620 11 libosgViewer.44.dylib 0x0016eb21 osgViewer::ViewerBase::frame(double) + 159 12 libosgViewer.44.dylib 0x0016ea65 osgViewer::ViewerBase::run() + 239 13 libosgViewer.44.dylib 0x00161080 osgViewer::Viewer::run() + 182 14 osgviewer 0x865b main + 6241 15 osgviewer 0x6dce start + 54 Thread 1: 0 libSystem.B.dylib 0x961ff68e __semwait_signal + 10 1 libSystem.B.dylib 0x9622a36d pthread_cond_wait$UNIX2003 + 73 2 libGLProgrammability.dylib0x93b92432 glvmDoWork + 162 3 libSystem.B.dylib 0x962296f5 _pthread_start + 321 4 libSystem.B.dylib 0x962295b2 thread_start + 34 Thread 2 Crashed: 0 ??? 0x121ef200 0 + 304017920 1 GLEngine 0x00ed531a gleDrawArraysOrElements_ExecCore + 266 2 GLEngine 0x00ed6278 gleDrawArraysOrElements_IMM_Exec + 1080 3 libGL.dylib 0x96ddd7f1 glDrawArrays + 113 4 libosgText.44.dylib 0x002b4d55 osgText::Text::drawForegroundText(osg::State, osgText::Text::GlyphQuads const, osg::Vec4f const) const + 527 5 libosgText.44.dylib 0x002b5ac0 osgText::Text::renderOnlyForegroundText(osg::State, osg::Vec4f const) const + 118 6 libosgText.44.dylib 0x002b61bb osgText::Text::drawImplementation(osg::State, osg::Vec4f const) const + 1117 7 libosgText.44.dylib 0x002b68f1 osgText::Text::drawImplementation(osg::RenderInfo) const + 107 8 libosgViewer.44.dylib 0x00140e72 osgViewer::TextDrawCallback::drawImplementation(osg::RenderInfo, osg::Drawable const*) const + 548 9 libosgUtil.44.dylib 0x0052082e osg::Drawable::draw(osg::RenderInfo) const + 412 10