Re: [osg-users] Enabling notifications from within program?
Hi You can set your own notify handler like this to check if you ever get messages from osg: class NH : public osg::NotifyHandler { public: NH() : m_out(osg_log.txt) { } ~NH() { m_out.close(); } void notify (osg::NotifySeverity severity, const char *message) { m_out message; } private: std::ofstream m_out; }; osg::setNotifyHandler(new NH); Cheers, Sergey. 31.05.2012, 22:25, Preet prismatic.proj...@gmail.com: Hi Robert, That's what I'm currently doing (ie using stack traces to try and figure stuff out), but I was wondering why osg doesn't give me *any* output at all. For instance, I'm apparently able to do a bunch of stuff: Load an *.osg model, setup an animation path, create nodes, etc, pretty much all of the scene setup goes fine up until I try to create the viewer. Doesn't doing any of those things before the viewer provide output when I've set the notify level to debug? I made sure I compiled with OSG_DISABLE_NOTIFY (or whatever the exact wording for that flag was) to allow notifications. On Thu, May 31, 2012 at 4:57 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Preet, The osg::notify system isn't related to handling of std exceptions except where some specific code might catch an exception and report the output to osg::notify. This means that upping the notify level won't effect how exceptions are handled. The best thing to do is run a debugger and the look at the stack trace where the application crashes. Robert. On 31 May 2012 07:57, Preet prismatic.proj...@gmail.com wrote: Hiya, I'm trying to debug a std::bad_alloc() exception from osg that doesn't product any other output. I can't set environment variables, so I tried: osg::setNotifyLevel(osg::DEBUG_INFO); This still doesn't give me any output. The system I'm on dumps stdout and stderr to a log file in a specific directory and since Notify.cpp dumps to both of those it seems like I should be seeing something, but I'm not. However, I do get statements like std::cout Hello std::endl outputted as expected when used in my application (just not from osg). Am I missing something obvious? Preet ___ 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] OSG 3.0.1 crash in glDrawElements() under Windows Remote Desktop
iirc osg can statically link with opengl lib, so you can make 2 binaries: one with mesa statically linked in, and other using whatever opengl32.dll system have. Cheers. 31.05.2012, 23:04, "Simon Hammett" s.d.hamm...@googlemail.com:On 31 May 2012 17:17, Andrew Cunningham andr...@mac.com wrote:When running a Windows OSG 3.0.1 application under Windows Remote Desktop the OpenGL driver defaults to the (ancient) software MS OpenGL GDI renderer v1.1. Unfortunately, I need to make the basics of our app work under RDC. I am finding that glDrawElements ( called from void DrawElementsUInt::draw) crashes every time inside the MS OpenGL driver when given a geometry with say, 3000 elements. With smaller numbers of elements there are no problems. This is code that works perfectly when running under accelerated drivers such as nVidia/ATI etc. I experimented with breaking up the drawing of elements into blocks of size GL_MAX_ELEMENTS_INDICES_WIN with no luck. It seems that repeated calls to glDrawElements in a loop even with a small number of elements cause the same issue. This is almost certainly a bug in the driver, but I am wondering if anyone has a workaround that can be done at the OSG level. ThanksYou can use mesa instead when running under RDC. http://www.mesa3d.org, works well and even supports shaders. If you can create an install specifically for RDC users then you can just put the mesa version of opengl32.dll in with your app and you are done. If you need to dynamically chose between mesa/hardware renderer, you'll need to do some monkeying about though,either loading osg/opengl via LoadLibrary or you'll have to create a little launcher program to modify the current PATH so the mesa dlls are/are not found as appropriate. BTW, don't try and delay load opengl32. I tried that when I wanted to dynamically chose the open gl version and it causes odd problems. -- http://www.ssTk.co.uk___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] [osgOcean] Masked FFTOceanSurface
Hi Kim, I attached the two files to this posting. The usage is simple, just use osgDB::readImageFile(FILEPATH) to get the a mask image that will then be applied to modulate the heights in the computeSea function. The mask is white where no change is needed and black where the ocean should not be visible. Currently it has some drawbacks: -The average height and the height of the lesser LOD's treats the masking height (e.g. -100.0f) like the valid heights -It is not easy to produce a specific height distribution aside from a plain surface thats bounded by a definable shore. A river that flows down some rapids or multiple waterfalls are hard to get correctly. It would be better if the mask is supplied with specific (relative) ground heights so that e.g. 0 means no change and a mask value of e.g. 10 means the surface should on average be 10 units elevated -LOD 0 (1 Quad) currently cannot benefit from the masking, maybe by using a shader/texture that has alpha values set like the mask, this effect can still be conveyed at LOD0 Cheers, Oliver -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47991#47991 Attachments: http://forum.openscenegraph.org//files/fftoceansurface_864.cpp http://forum.openscenegraph.org//files/1719_1338534512._126. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enabling notifications from within program?
Thanks to all for the replies... I wasn't getting any output because of some unrelated linking errors. After fixing them, debugging is working as expected :) On Fri, Jun 1, 2012 at 2:46 AM, Sergey Polischuk pol...@yandex.ru wrote: Hi You can set your own notify handler like this to check if you ever get messages from osg: class NH : public osg::NotifyHandler { public: NH() : m_out(osg_log.txt) { } ~NH() { m_out.close(); } void notify (osg::NotifySeverity severity, const char *message) { m_out message; } private: std::ofstream m_out; }; osg::setNotifyHandler(new NH); Cheers, Sergey. 31.05.2012, 22:25, Preet prismatic.proj...@gmail.com: Hi Robert, That's what I'm currently doing (ie using stack traces to try and figure stuff out), but I was wondering why osg doesn't give me *any* output at all. For instance, I'm apparently able to do a bunch of stuff: Load an *.osg model, setup an animation path, create nodes, etc, pretty much all of the scene setup goes fine up until I try to create the viewer. Doesn't doing any of those things before the viewer provide output when I've set the notify level to debug? I made sure I compiled with OSG_DISABLE_NOTIFY (or whatever the exact wording for that flag was) to allow notifications. On Thu, May 31, 2012 at 4:57 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Preet, The osg::notify system isn't related to handling of std exceptions except where some specific code might catch an exception and report the output to osg::notify. This means that upping the notify level won't effect how exceptions are handled. The best thing to do is run a debugger and the look at the stack trace where the application crashes. Robert. On 31 May 2012 07:57, Preet prismatic.proj...@gmail.com wrote: Hiya, I'm trying to debug a std::bad_alloc() exception from osg that doesn't product any other output. I can't set environment variables, so I tried: osg::setNotifyLevel(osg::DEBUG_INFO); This still doesn't give me any output. The system I'm on dumps stdout and stderr to a log file in a specific directory and since Notify.cpp dumps to both of those it seems like I should be seeing something, but I'm not. However, I do get statements like std::cout Hello std::endl outputted as expected when used in my application (just not from osg). Am I missing something obvious? Preet ___ 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] osgWidget examples dataset
I am having the same issue with the pixel gap. Did you make any progress on it? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47998#47998 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?
Hi Kim, Thanks for your response. I appreciate the paper and will give it a read. ... Thank you! Cheers, Brad -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47999#47999 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 3.0.1 crash in glDrawElements() under Windows Remote Desktop
I have had success with using Mesa. The last Mesa version that apparently supports Windows GDI is 7.8. Later versions will build on Windows ,but crash at runtime. I was able to successfully build Mesa 7.8.2 using Visual Studio 2010. I ended up with a mesa based opengl32.dll that is drop-in replacement for the ancient MS supplied opengl32.dll and works fine for my needs . -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48000#48000 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org