[osg-users] Calling setUseVertexAttributeAliasing(true) after a viewer is being "run" causes a crasch
Hi all. Just noticed that it is not possible to toggle the setUseVertexAttributeAliasing after a viewer has been realized and frame/run has been called and any text is involved in the scene. The attached code is a modified osgViewer. If 's' (statistics) is shown after the call to setUseVertexAttributeAliasing, I get a callstack, meaning it is not possible to toggle this feature while an application is being run. Is that intentional? I am running OSG 3.6.4 on Windows 10 > osg160-osg.dll!osg::VertexArrayState::applyDisablingOfVertexAttributes(osg::State & state) Line 294 C++ osg160-osg.dll!osg::Geometry::drawVertexArraysImplementation(osg::RenderInfo & renderInfo) Line 989 C++ osg160-osg.dll!osg::Geometry::drawImplementation(osg::RenderInfo & renderInfo) Line 899 C++ osg160-osg.dll!osg::Drawable::drawInner(osg::RenderInfo & renderInfo) Line 277 C++ osg160-osg.dll!osg::Drawable::draw(osg::RenderInfo & renderInfo) Line 619 C++ osg160-osgUtil.dll!osgUtil::RenderLeaf::render(osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * previous) Line 84 C++ osg160-osgUtil.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * & previous) Line 488 C++ osg160-osgUtil.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * & previous) Line 1408 C++ osg160-osgUtil.dll!osgUtil::RenderBin::draw(osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * & previous) Line 432 C++ osg160-osgUtil.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * & previous, bool & doCopyTexture) Line 934 C++ -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 /* OpenSceneGraph example, osgshape. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include // for the grid data.. osg::Geode* createShapes(osg::ArgumentParser& arguments) { osg::Geode* geode = new osg::Geode(); float radius = 0.8f; float height = 1.0f; osg::TessellationHints* hints = new osg::TessellationHints; hints->setDetailRatio(0.5f); geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), radius), hints)); geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(2.0f, 0.0f, 0.0f), 2 * radius), hints)); geode->addDrawable(new osg::ShapeDrawable(new osg::Cone(osg::Vec3(4.0f, 0.0f, 0.0f), radius, height), hints)); geode->addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(6.0f, 0.0f, 0.0f), radius, height), hints)); geode->addDrawable(new osg::ShapeDrawable(new osg::Capsule(osg::Vec3(8.0f, 0.0f, 0.0f), radius, height), hints)); return geode; } int main(int argc, char** argv) { osg::ArgumentParser arguments(, argv); // construct the viewer. osgViewer::Viewer viewer(arguments); // add model to viewer. viewer.setSceneData(createShapes(arguments)); // add the state manipulator viewer.addEventHandler(new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet())); viewer.addEventHandler(new osgViewer::StatsHandler); viewer.setCameraManipulator(new osgGA::TrackballManipulator()); viewer.realize(); int i = 0; while (!viewer.done()) { i++; if (i == 2000) { osgViewer::Viewer::Windows windows; viewer.getWindows(windows); for (osgViewer::Viewer::Windows::iterator itr = windows.begin(); itr != windows.end(); ++itr) { osg::State* s = (*itr)->getState(); s->setUseModelViewAndProjectionUniforms(true); s->setUseVertexAttributeAliasing(true); } } viewer.frame(); } } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgTerrain and dynamic Heightmaps
Hi all. I was wondering if there is any way of using the osgTerrain library by feeding it with a dynamic (changing over time) heightmap? I was thinking that most of the core features are there, including the DisplacementMappingTechnique for quick tesselation. But perhaps this is completely out of the scope for the Terrain library? Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Unwanted culling in 3.6.4 vs 3.5.1
Good to hear! /Anders On Fri, 10 Jan 2020 at 11:16, Robert Osfield wrote: > Thanks Anders, the description and models really helped pin point the bug > and confirm fix. I have now fixed the handling of when > _autoScaleTransitionWidthRatio<=0.0 > > > https://github.com/openscenegraph/OpenSceneGraph/commit/61c7ee76c5c059f53366f69c27c9fdf69388eced > > This is checked into master and the 3.6 branch so will be part of the up > coming 3.6.5 release. > > Cheers, > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- ______ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Unwanted Culling in 3.6.4 vs 3.5.1
Hi all. Another issue I discovered with 3.6.4 is that we now suddenly get unwanted culling. At first it looks like a small feature culling thing (which we disable at global level with: // Don't do small feature culling osg::CullStack::CullingMode cullingMode = m_viewer->getCamera()->getCullingMode(); cullingMode &= ~(osg::CullStack::SMALL_FEATURE_CULLING); m_viewer->getCamera()->setCullingMode(cullingMode); However, this does not look like a small feature thing to me at all. Actually, it culls even when you get close to the objects. Attached are two osgt-files. One is saved from OSG 3.5.1 (works as intended). Second one is saved from OSG 3.6.4 (where we get the unwanted culling). If you use a later version of OSG (3.6.4) the one from 3.6.4 generates lots of warnings: CullVisitor::apply(Geode&) detected NaN, depth=nan, center=(0 0 7.125), matrix={ -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) 0.187249 -0.470484 -6.20285 1 whereas the one from 3.5.1 does not. Anyone give me a hand on this? I am really stuck. I was first totally into small feature culling, trying to dig up old code where people was trying to disable small feature culling on subgraphs etc. But that is not the issue here. Any suggestion would help. I tried to make the scene as small as possible. -- __________ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Crasch in extension->createShader when using remote desktop (Windows)
Hi all. Using OSG 3.6.4, Windows 10. Not sure what the current state of the world regarding Remote Desktop and OpenGL is. Perhaps someone can share some light onto this. If I run an application that use shaders over remote desktop from one windows machine to another I get: c:\build\VS2017\x64\osg\bin>osgsimpleshaders.exe Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() - wglChoosePixelFormatARB extension not found, trying GDI. Reason: The specified procedure could not be found. Rendering in software: pixelFormatIndex 3 Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile > crash. This does not happen when using fixed functionality only, for example running osgviewer with some standard obj-model works just fine. However, as soon as a shader is requested, OSG crashes: _glShaderHandle = _extensions->glCreateShader( shader->getType() ); Exception thrown at 0x in agxViewer.exe: 0xC005: Access violation executing location 0x. () Unknown > osg160-osg.dll!osg::Shader::PerContextShader::PerContextShader(const osg::Shader * shader, unsigned int contextID) Line 533 C++ osg160-osg.dll!osg::Shader::ShaderObjects::createPerContextShader(const std::basic_string,std::allocator > & defineStr) Line 426 C++ osg160-osg.dll!osg::Shader::getPCS(osg::State & state) Line 470 C++ Anyone with more info on this? Is there any way around this? -- __________ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadows and osgRecipe
Well you are using a custom shader for the shadows and not the one used internally in osg. Sothere might still be an issue with the combination of EffectCompositor and OsgShadow. /Anders On Thursday, 25 February 2016, michael kapelko <korn...@gmail.com> wrote: > Hi. > I have the sample that worked just fine: > https://bitbucket.org/kornerr/osg-deferred-shading > > 2016-02-25 2:00 GMT+07:00 Anders Backman <ande...@cs.umu.se > <javascript:_e(%7B%7D,'cvml','ande...@cs.umu.se');>>: > >> Hi all. >> >> Has anyone tested the EffectCompositor together with osgShadows? >> >> My problem is, that as soon as I add a shadowed scene as a child of an >> EffectCompositor, the shadows becomes all wrong. >> It looks like the shadow light sources follows the camera, sort of. >> >> The attached effect (asd.xml) is just a pass-through effect. >> >> Other than this, is there any other good way of defining post-render >> effects in OSG these days? >> osgPPU seems to have fallen into sleep, and I cannot see any other good >> way of constructing this. >> The EffectCompositor really looks great. But...shadows does not work. >> >> Anyone with insight into this? >> >> >> /A >> -- >> __ >> Anders Backman, HPC2N >> 90187 Umeå University, Sweden >> and...@cs.umu.se <javascript:_e(%7B%7D,'cvml','and...@cs.umu.se');> >> http://www.hpc2n.umu.se >> Cell: +46-70-392 64 67 >> >> >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> <javascript:_e(%7B%7D,'cvml','osg-users@lists.openscenegraph.org');> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] using osgShadow messes ref_ptrs on exit
I believe this has been fixed in the trunk. But there is no official release containing this fix just yet. It happens with just about any osg::Program/Shader. /A On Wed, Feb 24, 2016 at 7:42 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Hi Community, > > I've been fighting with cleaning of ref_ptrs when using osgShadow. It > crashes in deleting the pointer. This is odd but attached is very simple > example, osgviewer just with adding it to a shadowed scene with some > technique. > > Any clue? Sample attached > > > Thanks a bunch as always ! > > Cheers, > Nick > > void Referenced::signalObserversAndDelete(bool signalDelete, bool > doDelete) const > { > #if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) > ObserverSet* observerSet = > static_cast<ObserverSet*>(_observerSet.get()); > #else > ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet); > #endif > > if (observerSet && signalDelete) > { > observerSet->signalObjectDeleted(const_cast<Referenced*>(this)); > } > > if (doDelete) > { > if (_refCount!=0) > OSG_NOTICE<<"Warning Referenced::signalObserversAndDelete(,,) > doing delete with _refCount="<<_refCount<<std::endl; > > if (getDeleteHandler()) deleteUsingDeleteHandler(); > CRASHES HERE -> else delete this; > } > } > > -- > trajce nikolov nick > > _______ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] (no subject)
Yep sorry. I was having some (other) issue where text was not rendered when I had enabled shadows, so I was messing with osgViewer.cpp copying sample code from osgShadow there. The example that reveals the issue at shutdown is plainly osgShadow.cpp Output: osgshadow.exe --window 0 0 1024 768 FOV is 29.1484 Error: OpenGL version test failed, requires valid graphics context. And a crasch. Interestingly only if you first move the camera (left mouse move) in the graphics window. If you do not interact with the scene, it only show the error message. /Anders On Thu, Feb 4, 2016 at 11:57 AM, Robert Osfield <robert.osfi...@gmail.com> wrote: > Hi Anders, > > There is a new mechanism for managing clean up of GL objects, which in > theory should help improve management of lifetimes of GL objects. > > The warning suggests that something is try to do GL call after the > context is cleaned up, I don't know yet if this is a bug in the new > code or whether the new code is just revealling an old bug elsewhere. > > Could you be more specific of how to reproduce the problem as there > isn't an --ssm option supported by the osgviewer example. > > Robert. > > > On 4 February 2016 at 09:05, Anders Backman <ande...@cs.umu.se> wrote: > > Hi all. > > > > Trying OSG 3.5.1 and I have started to get some problems with objects > > (osg::Program/osg::Shaders etc.) being de-allocated after context is > > destroyed: > > > > Error: OpenGL version test failed, requires valid graphics context. > > > > > > Sometime it crasches sometimes it just print the warning. > > > > I can reproduce it with osgViewer --ssm > > > > The only solution so far has been to keep a static reference to the > camera > > in the scene, which feels a lot like a hack. > > The same code worked in 3.4.0. So as you wrote in an earlier post, this > > probably reveals something that was not deallocated before. > > > > As soon as the viewer is destroyed, it takes the camera with it. Hence > the > > Context is also destroyed. > > > > Not sure how to handle this in an general way. > > > > /Anders > > > > > > -- > > __ > > Anders Backman, HPC2N > > 90187 Umeå University, Sweden > > and...@cs.umu.se http://www.hpc2n.umu.se > > Cell: +46-70-392 64 67 > > > > ___ > > 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 > -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] (no subject)
Seems that this actually caused a lot more problem than I first thought... The fact that you need to have a valid reference while tearing down nodes, means that our system with plugins (dll:s loaded etc) now causes problems. The Camera it self, has references to a scene, states, (Renderer) etc, and if I keep a reference of the Camera to last, I get crashes when the camera destructor is called, due to the fact that most of the nodes, shaders, programs where created (allocated) in dll:s that has already been unloaded. So to recap: I need a context when a node is removed (if the node contains for example a shader/program). If I keep a reference to the Camera (hence the context), the camera also keep references to just about everything I put into the scenegraph, meaning that I delay the destruction of objects very late. Right now I do not really see a solution for this. It was working in 3.4.0. /A On Thu, Feb 4, 2016 at 12:25 PM, Anders Backman <ande...@cs.umu.se> wrote: > Yep sorry. I was having some (other) issue where text was not rendered > when I had enabled shadows, so I was messing with osgViewer.cpp copying > sample code from osgShadow there. > > The example that reveals the issue at shutdown is plainly osgShadow.cpp > > > Output: > > osgshadow.exe --window 0 0 1024 768 > FOV is 29.1484 > Error: OpenGL version test failed, requires valid graphics context. > > And a crasch. Interestingly only if you first move the camera (left mouse > move) in the graphics window. > If you do not interact with the scene, it only show the error message. > > /Anders > > > > On Thu, Feb 4, 2016 at 11:57 AM, Robert Osfield <robert.osfi...@gmail.com> > wrote: > >> Hi Anders, >> >> There is a new mechanism for managing clean up of GL objects, which in >> theory should help improve management of lifetimes of GL objects. >> >> The warning suggests that something is try to do GL call after the >> context is cleaned up, I don't know yet if this is a bug in the new >> code or whether the new code is just revealling an old bug elsewhere. >> >> Could you be more specific of how to reproduce the problem as there >> isn't an --ssm option supported by the osgviewer example. >> >> Robert. >> >> >> On 4 February 2016 at 09:05, Anders Backman <ande...@cs.umu.se> wrote: >> > Hi all. >> > >> > Trying OSG 3.5.1 and I have started to get some problems with objects >> > (osg::Program/osg::Shaders etc.) being de-allocated after context is >> > destroyed: >> > >> > Error: OpenGL version test failed, requires valid graphics context. >> > >> > >> > Sometime it crasches sometimes it just print the warning. >> > >> > I can reproduce it with osgViewer --ssm >> > >> > The only solution so far has been to keep a static reference to the >> camera >> > in the scene, which feels a lot like a hack. >> > The same code worked in 3.4.0. So as you wrote in an earlier post, this >> > probably reveals something that was not deallocated before. >> > >> > As soon as the viewer is destroyed, it takes the camera with it. Hence >> the >> > Context is also destroyed. >> > >> > Not sure how to handle this in an general way. >> > >> > /Anders >> > >> > >> > -- >> > __ >> > Anders Backman, HPC2N >> > 90187 Umeå University, Sweden >> > and...@cs.umu.se http://www.hpc2n.umu.se >> > Cell: +46-70-392 64 67 >> > >> > ___ >> > 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 >> > > > > -- > __ > Anders Backman, HPC2N > 90187 Umeå University, Sweden > and...@cs.umu.se http://www.hpc2n.umu.se > Cell: +46-70-392 64 67 > -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] (no subject)
Hi all. Trying OSG 3.5.1 and I have started to get some problems with objects (osg::Program/osg::Shaders etc.) being de-allocated after context is destroyed: Error: OpenGL version test failed, requires valid graphics context. Sometime it crasches sometimes it just print the warning. I can reproduce it with osgViewer --ssm The only solution so far has been to keep a static reference to the camera in the scene, which feels a lot like a hack. The same code worked in 3.4.0. So as you wrote in an earlier post, this probably reveals something that was not deallocated before. As soon as the viewer is destroyed, it takes the camera with it. Hence the Context is also destroyed. Not sure how to handle this in an general way. /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intercepting Windows messages
No one experienced that OSG consumes 3DConnexion messages until you move the window with the mouse, then auddenly messages related to the 3DConnexion Space Navigator starts coming in...? On Friday, 13 November 2015, Anders Backman <ande...@cs.umu.se> wrote: > It seems to me that OSG eats the 3DConnexion messages, until you move the > window explicitly with the mouse. > The code below show that a console window works just fine, all messages > are intercepted by the "message window". > However, when a osgViewer run loop is being used, the messages seem to be > filtered. > > I only get a Spaceball event when I move the window(!). > > > #include > #include > > #include > > > #pragma comment(lib, "siapp.lib") > > #include"windows.h" > #include > > #include "spwmacro.h" /* Common macros used by SpaceWare functions. */ > #include "si.h"/* Required for any SpaceWare support within an > app.*/ > #include "siapp.h" /* Required for siapp.lib symbols */ > > #pragma warning(disable:4700) > > SiHdl devHdl; /* Handle to 3D Mouse Device */ > SiOpenData oData; > WNDPROC wndProcOrig; > > void ClearScreen() { > for (unsigned i = 0; i<100; ++i) std::cout << std::endl; > } > > int SbInit(HWND hwndC); > void SbMotionEvent(SiSpwEvent *pEvent); > void SbZeroEvent(); > void SbButtonPressEvent(int buttonnumber); > void SbButtonReleaseEvent(int buttonnumber); > void HandleDeviceChangeEvent(SiSpwEvent *pEvent); > > > LRESULT CALLBACK MyWndCBProc( > HWND hwnd, UINT wm, WPARAM wParam, LPARAM lParam) > { > SiSpwEvent Event;/* SpaceWare Event */ > SiGetEventData EData;/* SpaceWare Event Data */ > > /* initialize Window platform specific data for a call to SiGetEvent */ > SiGetEventWinInit(, wm, wParam, lParam); > > /* check whether wm was a 3D mouse event and process it */ > //if (SiGetEvent (devHdl, SI_AVERAGE_EVENTS, , ) == > SI_IS_EVENT) > SpwRetVal retval = SiGetEvent(devHdl, 0, , ); > > if (retval == SI_IS_EVENT) > { > if (Event.type == SI_MOTION_EVENT) > { > SbMotionEvent();/* process 3D mouse motion event */ > } > else if (Event.type == SI_ZERO_EVENT) > { > SbZeroEvent();/* process 3D mouse zero event */ > } > else if (Event.type == SI_BUTTON_PRESS_EVENT) > { > SbButtonPressEvent(Event.u.hwButtonEvent.buttonNumber); /* process > button press event */ > } > else if (Event.type == SI_BUTTON_RELEASE_EVENT) > { > SbButtonReleaseEvent(Event.u.hwButtonEvent.buttonNumber); /* process > button release event */ > } > else if (Event.type == SI_DEVICE_CHANGE_EVENT) > { > //SbHandleDeviceChangeEvent(); /* process 3D mouse device > change event */ > } > } > > return DefWindowProc(hwnd, wm, wParam, lParam); > } > > void mainx(void) { > > > /* Implement message loop */ > int bRet; > MSG msg; /* incoming message to be evaluated */ > while (bRet = GetMessage(, NULL, 0, 0)) > { > if (bRet == -1){ > /* handle the error and possibly exit */ > return; > } > else{ > TranslateMessage(); > DispatchMessage(); > } > } > } > > > int SbInit(HWND hwndC) > { > int res; /* result of SiOpen, to be returned > */ > > /*init the SpaceWare input library */ > if (SiInitialize() == SPW_DLL_LOAD_ERROR) { > std::cout << "Error: Could not load SiAppDll dll files" << std::endl; > } > else { > //std::cout << "SiInitialize() done " << std::endl; > } > > SiOpenWinInit(, hwndC);/* init Win. platform specific data */ > > /* open data, which will check for device type and return the device > handle to be used by this function */ > if ((devHdl = SiOpen("AppSpaceMouse.exe", SI_ANY_DEVICE, SI_NO_MASK, > SI_EVENT, )) == NULL) { > std::cout << "SiOpen error:" << std::endl; > SiTerminate(); /* called to shut down the SpaceWare input library */ > std::cout << "SiTerminate()" << std::endl; > res = 0;/* could not open device */ > return res; > } > > SiDeviceName pname; > SiGetDeviceName(devHdl, ); > //std::cout << "devicename = " << pname.name << std::endl; > > SiSetUiMode(devHdl, SI_UI_ALL_CONTROLS); /* Config SoftButton Win > Display */ > SiGrabDevice(devHdl, SPW_TRUE); /* PREVENTS OTHER APPLICATIONS FROM > RECEIVING 3D
Re: [osg-users] Intercepting Windows messages
d HandleDeviceChangeEvent(SiSpwEvent *pEvent) { std::cout << "HandleDeviceChangeEvent : " << std::endl; } int main(int argc, char** argv) { osg::ArgumentParser arguments(, argv); #if 1 osgViewer::Viewer viewer(arguments); #else osgViewer::CompositeViewer viewer(arguments); osgViewer::View* view = new osgViewer::View; view->setName("View one"); viewer.addView(view); view->setSceneData(scene.get()); view->getCamera()->setName("Cam one"); view->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width / 2, traits->height / 2)); view->getCamera()->setGraphicsContext(gc.get()); #endif viewer.realize(); osgViewer::Viewer::Windows windows; viewer.getWindows(windows); osgViewer::GraphicsWindow* window = windows[0]; window->setWindowRectangle(40, 40,1024,768); window->setWindowDecoration(true); /* Retrieve console application main window using GetConsoleWindow() */ //HWND windowHandle = GetConsoleWindow(); /* Great!! This function cleverly "retrieves the window handle used by the console associated with the calling process", as msdn says */ /* Register a custom window class */ WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = MyWndCBProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = GetModuleHandle(NULL); wcex.hIcon = NULL; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wcex.lpszMenuName = NULL; wcex.lpszClassName = "MyWindowClassName"; wcex.hIconSm = NULL; RegisterClassEx(); /* Create a hidden window owned by our process and parented to the console window */ HWND hWndChild = CreateWindow(wcex.lpszClassName, "MyWindowTitle", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, wcex.hInstance, NULL); /* Initialise 3DxWare access / call to SbInit() */ SbInit(hWndChild); #if 0 /* Implement message loop */ int bRet; MSG msg; /* incoming message to be evaluated */ while (bRet = GetMessage(, NULL, 0, 0)) { if (bRet == -1){ /* handle the error and possibly exit */ return 1; } else{ TranslateMessage(); DispatchMessage(); } } return 0; #else return viewer.run(); #endif } On Fri, Nov 13, 2015 at 3:50 PM, Anders Backman <ande...@cs.umu.se> wrote: > Ah thats great. A good step forward. > However, two minor questions: > > 1. Do you need the instance to the main osg window? > 2. If not, how do you manage to get events from the device when you apply > force on it? > > I get it to read data (in my message callback) but only if a move/modify > the osg window (Im using osgViewer::Viewer with just one window). > > /A > > On Thu, Nov 12, 2015 at 10:53 PM, Farshid Lashkari <fla...@gmail.com> > wrote: > >> Hi Anders, >> >> You can create a separate "message-only" window to receive windows >> messages from the SpaceMouse. See the following MSDN page: >> >> >> https://msdn.microsoft.com/en-us/library/windows/desktop/ms632599(v=vs.85).aspx#message_only >> >> I've integrated the 3DConnexion SpaceNavigator into our application using >> this method, along with other 3rd party APIs that require a window handle. >> >> Cheers, >> Farshid >> >> On Thu, Nov 12, 2015 at 11:01 AM, Anders Backman <ande...@cs.umu.se> >> wrote: >> >>> So there seem to be only a very few alternatives for integrating such a >>> windows oriented toolkit as the 3DConnexion SpaceMouse... >>> >>> My idea of being able to create a custom implementation of a >>> GraphicsWindowWin32 would really open up for a better integration, albeit >>> not a portable one... >>> >>> Right now, using VRPN feels a bit strange in a native application (as it >>> requires a server). >>> >>> As far as I know there is no polling API for the 3DConnexion devices, no? >>> >>> I see older emails about accessing it through Direct3D, and native >>> USB...whereas listening to windows messages would be the "correct" way of >>> integrating it. >>> I would have to hack into the context classes to do this... >>> >>> Hm >>> >>> /Anders >>> >>> >>> On Thu, Nov 12, 2015 at 3:54 PM, Anders Backman <ande...@cs.umu.se> >>> wrote: >>> >>>> That is certainly an important call yes. >>>> >>>> I guess my problem is that these two calls are not interchangeable: >>>> >>>> #if 1
Re: [osg-users] Intercepting Windows messages
Ah thats great. A good step forward. However, two minor questions: 1. Do you need the instance to the main osg window? 2. If not, how do you manage to get events from the device when you apply force on it? I get it to read data (in my message callback) but only if a move/modify the osg window (Im using osgViewer::Viewer with just one window). /A On Thu, Nov 12, 2015 at 10:53 PM, Farshid Lashkari <fla...@gmail.com> wrote: > Hi Anders, > > You can create a separate "message-only" window to receive windows > messages from the SpaceMouse. See the following MSDN page: > > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms632599(v=vs.85).aspx#message_only > > I've integrated the 3DConnexion SpaceNavigator into our application using > this method, along with other 3rd party APIs that require a window handle. > > Cheers, > Farshid > > On Thu, Nov 12, 2015 at 11:01 AM, Anders Backman <ande...@cs.umu.se> > wrote: > >> So there seem to be only a very few alternatives for integrating such a >> windows oriented toolkit as the 3DConnexion SpaceMouse... >> >> My idea of being able to create a custom implementation of a >> GraphicsWindowWin32 would really open up for a better integration, albeit >> not a portable one... >> >> Right now, using VRPN feels a bit strange in a native application (as it >> requires a server). >> >> As far as I know there is no polling API for the 3DConnexion devices, no? >> >> I see older emails about accessing it through Direct3D, and native >> USB...whereas listening to windows messages would be the "correct" way of >> integrating it. >> I would have to hack into the context classes to do this... >> >> Hm >> >> /Anders >> >> >> On Thu, Nov 12, 2015 at 3:54 PM, Anders Backman <ande...@cs.umu.se> >> wrote: >> >>> That is certainly an important call yes. >>> >>> I guess my problem is that these two calls are not interchangeable: >>> >>> #if 1 >>> osg::ref_ptr gc = >>> osg::GraphicsContext::createGraphicsContext(traits.get()); >>> #else >>> osg::ref_ptr window = new >>> osgViewer::GraphicsWindowWin32(traits); >>> gc = window.get(); >>> #endif >>> >>> createGraphicsContext() will do a few more things which the creation of >>> a osgViewer::GraphicsWindowWin32 does not. The question is really, is it >>> possible to even consider this? >>> Is there a mechanism for creating a custom GraphicsWindowWin32 or is >>> this path doomed to fail. >>> >>> /Anders >>> >>> >>> >>> On Thu, Nov 12, 2015 at 3:31 PM, Trajce Nikolov NICK < >>> trajce.nikolov.n...@gmail.com> wrote: >>> >>>> Did you tried something like: >>>> >>>> osgViewer::Viewer viewer; >>>> viewer.getCamera()->setGraphicContext(gc); >>>> >>>> ? >>>> >>>> On Thu, Nov 12, 2015 at 2:52 PM, Anders Backman <ande...@cs.umu.se> >>>> wrote: >>>> >>>>> I notice that there is a major difference between osgViewer::Viewer >>>>> and osgViewer::CompositeViewer: >>>>> >>>>> The following code: >>>>> >>>>> osgViewer::CompositeViewer viewer; >>>>> >>>>> osg::ref_ptr traits = new >>>>> osg::GraphicsContext::Traits; >>>>> traits->x = 100; >>>>> traits->y = 100; >>>>> traits->width = 1000; >>>>> traits->height = 800; >>>>> traits->windowDecoration = true; >>>>> traits->doubleBuffer = true; >>>>> traits->sharedContext = 0; >>>>> >>>>> osg::ref_ptr gc = >>>>> osg::GraphicsContext::createGraphicsContext(traits.get()); >>>>> >>>>> osgViewer::View* view = new osgViewer::View; >>>>> view->setName("View one"); >>>>> viewer.addView(view); >>>>> >>>>> view->setSceneData(scene.get()); >>>>> view->getCamera()->setViewport(new osg::Viewport(0, 0, >>>>> traits->width / 2, traits->height / 2)); >>>>> view->getCamera()->setGraphicsContext(gc.get()); >>>>> >>>>> viewer.realize(); // Context already created. No call to >>>>> GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called &g
Re: [osg-users] Intercepting Windows messages
That is quite explicit. I was thinking about some method for intercepting events. I tried fiddling with creating a custom GraphicsWindowWin32 class, but it turns out that this is explicitly created internally in: osg::GraphicsContext* Win32WindowingSystem::createGraphicsContext( osg::GraphicsContext::Traits* traits ) { ... osg::ref_ptr window = new GraphicsWindowWin32(traits); } So this does not seem to be the way to catch windows messages. My idea was that I could register my instance of the GraphicsWindowWin32 to implement the virtual method: LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) Where I could catch all windows events. Turns out that I do not have enough understanding when and where context etc is created. It seems that a GraphicsWindowWIn32 is first created at the call to: osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); And then at the call to: viewer->realize(); will also result in a call to GraphicsContext::createGraphicsContext(Traits* traits), which in turn will create yet another GraphicsWindowWin32. So there lies my problem, my call to viewer->realize() will override my first call to GraphicsContext::createGraphicsContext(traits.get()); Not sure how to get around this though. Ideas? /Anders On Wed, Nov 11, 2015 at 5:05 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Hi Anders, > > here is what I do for this on Windows > > while (!viewer->done()) > { > > #if defined(_WIN32) > MSG msg; > if (::PeekMessage(,NULL,0,0,PM_NOREMOVE)) > { > ::GetMessage(, NULL, 0, 0); > > if (wins.size()) > { > osgViewer::GraphicsHandleWin32 *hdl = > dynamic_cast<osgViewer::GraphicsHandleWin32*>(wins.at(0)); > if(hdl) > { > WNDPROC fWndProc = > (WNDPROC)::GetWindowLongPtr(hdl->getHWND(), GWLP_WNDPROC); > if (fWndProc && hdl->getHWND()) > { > ::CallWindowProc(fWndProc,hdl->getHWND(),msg.message, msg.wParam, > msg.lParam); > } > } > } > } > #endif > > On Wed, Nov 11, 2015 at 4:21 PM, Anders Backman <ande...@cs.umu.se> wrote: > >> Hi. >> >> Trying the 3DConnexion SpaceNavigator with OSG. However I would like to >> stay away from VRPN and such dependencies... >> >> I was wondering how to best intercept Windows messages from the >> GraphicsWindowWin32 class. >> >> This class has a virtual method handleNativeWindowingEvent which I would >> like to override to catch custom messages from my device. >> >> Would it be possible to implement a derived class and have that >> instantiated instead of the standard osgViewer::GraphicsWindowWin32 one? >> >> Or is there a different method to listen to the messages: >> >> ( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) >> >> Thanks, >> Anders >> >> >> >> -- >> __ >> Anders Backman, HPC2N >> 90187 Umeå University, Sweden >> and...@cs.umu.se http://www.hpc2n.umu.se >> Cell: +46-70-392 64 67 >> >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > > > -- > trajce nikolov nick > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intercepting Windows messages
I notice that there is a major difference between osgViewer::Viewer and osgViewer::CompositeViewer: The following code: osgViewer::CompositeViewer viewer; osg::ref_ptr traits = new osg::GraphicsContext::Traits; traits->x = 100; traits->y = 100; traits->width = 1000; traits->height = 800; traits->windowDecoration = true; traits->doubleBuffer = true; traits->sharedContext = 0; osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); osgViewer::View* view = new osgViewer::View; view->setName("View one"); viewer.addView(view); view->setSceneData(scene.get()); view->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width / 2, traits->height / 2)); view->getCamera()->setGraphicsContext(gc.get()); viewer.realize(); // Context already created. No call to GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called If I replace osgViewerCompositeViewer with a osgViewer::Viewer and remove the creation of View, I get: viewer.realize(); // A new context is created. A new call to GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called So it seems that osgViewer::Viewer does not respect? the previously created GraphicsCOntext? /Anders On Thu, Nov 12, 2015 at 2:24 PM, Anders Backman <ande...@cs.umu.se> wrote: > That is quite explicit. I was thinking about some method for intercepting > events. > I tried fiddling with creating a custom GraphicsWindowWin32 class, but it > turns out that this is explicitly created internally in: > > osg::GraphicsContext* Win32WindowingSystem::createGraphicsContext( > osg::GraphicsContext::Traits* traits ) > { > ... > osg::ref_ptr window = new > GraphicsWindowWin32(traits); > > } > > So this does not seem to be the way to catch windows messages. > My idea was that I could register my instance of the GraphicsWindowWin32 > to implement the virtual method: > > LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT > uMsg, WPARAM wParam, LPARAM lParam ) > > > Where I could catch all windows events. > > > Turns out that I do not have enough understanding when and where context > etc is created. > > It seems that a GraphicsWindowWIn32 is first created at the call to: > > osg::ref_ptr gc = > osg::GraphicsContext::createGraphicsContext(traits.get()); > > > And then at the call to: > > viewer->realize(); > > will also result in a call > to GraphicsContext::createGraphicsContext(Traits* traits), which in turn > will create yet another GraphicsWindowWin32. > > So there lies my problem, my call to viewer->realize() will override my > first call to GraphicsContext::createGraphicsContext(traits.get()); > > > Not sure how to get around this though. Ideas? > > /Anders > > > On Wed, Nov 11, 2015 at 5:05 PM, Trajce Nikolov NICK < > trajce.nikolov.n...@gmail.com> wrote: > >> Hi Anders, >> >> here is what I do for this on Windows >> >> while (!viewer->done()) >> { >> >> #if defined(_WIN32) >> MSG msg; >> if (::PeekMessage(,NULL,0,0,PM_NOREMOVE)) >> { >> ::GetMessage(, NULL, 0, 0); >> >> if (wins.size()) >> { >> osgViewer::GraphicsHandleWin32 *hdl = >> dynamic_cast<osgViewer::GraphicsHandleWin32*>(wins.at(0)); >> if(hdl) >> { >> WNDPROC fWndProc = >> (WNDPROC)::GetWindowLongPtr(hdl->getHWND(), GWLP_WNDPROC); >> if (fWndProc && hdl->getHWND()) >> { >> ::CallWindowProc(fWndProc,hdl->getHWND(),msg.message, msg.wParam, >> msg.lParam); >> } >> } >> } >> } >> #endif >> >> On Wed, Nov 11, 2015 at 4:21 PM, Anders Backman <ande...@cs.umu.se> >> wrote: >> >>> Hi. >>> >>> Trying the 3DConnexion SpaceNavigator with OSG. However I would like to >>> stay away from VRPN and such dependencies... >>> >>> I was wondering how to best intercept Windows messages from the >>> GraphicsWindowWin32 class. >>> >>> This class has a virtual method handleNativeWindowingEvent which I would >>> like to override to catch custom messages from my device. >>> >>> Would it be possible to implement a derived class and have that >>> instantiated instead of the standard osgViewer::GraphicsWindowWin32 one? >>> >>> Or is there a different method to listen to the messages: >>> >>> ( HWND hwnd, UINT uMsg,
Re: [osg-users] Intercepting Windows messages
That is certainly an important call yes. I guess my problem is that these two calls are not interchangeable: #if 1 osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); #else osg::ref_ptr window = new osgViewer::GraphicsWindowWin32(traits); gc = window.get(); #endif createGraphicsContext() will do a few more things which the creation of a osgViewer::GraphicsWindowWin32 does not. The question is really, is it possible to even consider this? Is there a mechanism for creating a custom GraphicsWindowWin32 or is this path doomed to fail. /Anders On Thu, Nov 12, 2015 at 3:31 PM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Did you tried something like: > > osgViewer::Viewer viewer; > viewer.getCamera()->setGraphicContext(gc); > > ? > > On Thu, Nov 12, 2015 at 2:52 PM, Anders Backman <ande...@cs.umu.se> wrote: > >> I notice that there is a major difference between osgViewer::Viewer and >> osgViewer::CompositeViewer: >> >> The following code: >> >> osgViewer::CompositeViewer viewer; >> >> osg::ref_ptr traits = new >> osg::GraphicsContext::Traits; >> traits->x = 100; >> traits->y = 100; >> traits->width = 1000; >> traits->height = 800; >> traits->windowDecoration = true; >> traits->doubleBuffer = true; >> traits->sharedContext = 0; >> >> osg::ref_ptr gc = >> osg::GraphicsContext::createGraphicsContext(traits.get()); >> >>osgViewer::View* view = new osgViewer::View; >> view->setName("View one"); >> viewer.addView(view); >> >> view->setSceneData(scene.get()); >> view->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width >> / 2, traits->height / 2)); >> view->getCamera()->setGraphicsContext(gc.get()); >> >> viewer.realize(); // Context already created. No call to >> GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called >> >> >> >> If I replace osgViewerCompositeViewer with a osgViewer::Viewer and remove >> the creation of View, I get: >> >> viewer.realize(); // A new context is created. A new call to >> GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called >> >> >> So it seems that osgViewer::Viewer does not respect? the previously >> created GraphicsCOntext? >> >> /Anders >> >> >> >> On Thu, Nov 12, 2015 at 2:24 PM, Anders Backman <ande...@cs.umu.se> >> wrote: >> >>> That is quite explicit. I was thinking about some method for >>> intercepting events. >>> I tried fiddling with creating a custom GraphicsWindowWin32 class, but >>> it turns out that this is explicitly created internally in: >>> >>> osg::GraphicsContext* Win32WindowingSystem::createGraphicsContext( >>> osg::GraphicsContext::Traits* traits ) >>> { >>> ... >>> osg::ref_ptr window = new >>> GraphicsWindowWin32(traits); >>> >>> } >>> >>> So this does not seem to be the way to catch windows messages. >>> My idea was that I could register my instance of the GraphicsWindowWin32 >>> to implement the virtual method: >>> >>> LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT >>> uMsg, WPARAM wParam, LPARAM lParam ) >>> >>> >>> Where I could catch all windows events. >>> >>> >>> Turns out that I do not have enough understanding when and where context >>> etc is created. >>> >>> It seems that a GraphicsWindowWIn32 is first created at the call to: >>> >>> osg::ref_ptr gc = >>> osg::GraphicsContext::createGraphicsContext(traits.get()); >>> >>> >>> And then at the call to: >>> >>> viewer->realize(); >>> >>> will also result in a call >>> to GraphicsContext::createGraphicsContext(Traits* traits), which in turn >>> will create yet another GraphicsWindowWin32. >>> >>> So there lies my problem, my call to viewer->realize() will override my >>> first call to GraphicsContext::createGraphicsContext(traits.get()); >>> >>> >>> Not sure how to get around this though. Ideas? >>> >>> /Anders >>> >>> >>> On Wed, Nov 11, 2015 at 5:05 PM, Trajce Nikolov NICK < >>> trajce.nikolov.n...@gmail.com> wrote: >>> >>>> Hi Anders, >>>> >>>> here is what I do for this on Windows >>>>
Re: [osg-users] Intercepting Windows messages
So there seem to be only a very few alternatives for integrating such a windows oriented toolkit as the 3DConnexion SpaceMouse... My idea of being able to create a custom implementation of a GraphicsWindowWin32 would really open up for a better integration, albeit not a portable one... Right now, using VRPN feels a bit strange in a native application (as it requires a server). As far as I know there is no polling API for the 3DConnexion devices, no? I see older emails about accessing it through Direct3D, and native USB...whereas listening to windows messages would be the "correct" way of integrating it. I would have to hack into the context classes to do this... Hm /Anders On Thu, Nov 12, 2015 at 3:54 PM, Anders Backman <ande...@cs.umu.se> wrote: > That is certainly an important call yes. > > I guess my problem is that these two calls are not interchangeable: > > #if 1 > osg::ref_ptr gc = > osg::GraphicsContext::createGraphicsContext(traits.get()); > #else > osg::ref_ptr window = new > osgViewer::GraphicsWindowWin32(traits); > gc = window.get(); > #endif > > createGraphicsContext() will do a few more things which the creation of a > osgViewer::GraphicsWindowWin32 does not. The question is really, is it > possible to even consider this? > Is there a mechanism for creating a custom GraphicsWindowWin32 or is this > path doomed to fail. > > /Anders > > > > On Thu, Nov 12, 2015 at 3:31 PM, Trajce Nikolov NICK < > trajce.nikolov.n...@gmail.com> wrote: > >> Did you tried something like: >> >> osgViewer::Viewer viewer; >> viewer.getCamera()->setGraphicContext(gc); >> >> ? >> >> On Thu, Nov 12, 2015 at 2:52 PM, Anders Backman <ande...@cs.umu.se> >> wrote: >> >>> I notice that there is a major difference between osgViewer::Viewer and >>> osgViewer::CompositeViewer: >>> >>> The following code: >>> >>> osgViewer::CompositeViewer viewer; >>> >>> osg::ref_ptr traits = new >>> osg::GraphicsContext::Traits; >>> traits->x = 100; >>> traits->y = 100; >>> traits->width = 1000; >>> traits->height = 800; >>> traits->windowDecoration = true; >>> traits->doubleBuffer = true; >>> traits->sharedContext = 0; >>> >>> osg::ref_ptr gc = >>> osg::GraphicsContext::createGraphicsContext(traits.get()); >>> >>>osgViewer::View* view = new osgViewer::View; >>> view->setName("View one"); >>> viewer.addView(view); >>> >>> view->setSceneData(scene.get()); >>> view->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width >>> / 2, traits->height / 2)); >>> view->getCamera()->setGraphicsContext(gc.get()); >>> >>> viewer.realize(); // Context already created. No call to >>> GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called >>> >>> >>> >>> If I replace osgViewerCompositeViewer with a osgViewer::Viewer and >>> remove the creation of View, I get: >>> >>> viewer.realize(); // A new context is created. A new call to >>> GraphicsWIndowWIn32::GraphicsWIndowWin32 will be called >>> >>> >>> So it seems that osgViewer::Viewer does not respect? the previously >>> created GraphicsCOntext? >>> >>> /Anders >>> >>> >>> >>> On Thu, Nov 12, 2015 at 2:24 PM, Anders Backman <ande...@cs.umu.se> >>> wrote: >>> >>>> That is quite explicit. I was thinking about some method for >>>> intercepting events. >>>> I tried fiddling with creating a custom GraphicsWindowWin32 class, but >>>> it turns out that this is explicitly created internally in: >>>> >>>> osg::GraphicsContext* Win32WindowingSystem::createGraphicsContext( >>>> osg::GraphicsContext::Traits* traits ) >>>> { >>>> ... >>>> osg::ref_ptr window = new >>>> GraphicsWindowWin32(traits); >>>> >>>> } >>>> >>>> So this does not seem to be the way to catch windows messages. >>>> My idea was that I could register my instance of the >>>> GraphicsWindowWin32 to implement the virtual method: >>>> >>>> LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, >>>> UINT uMsg, WPARAM wParam, LPARAM lParam ) >>>> >>>> >>>> Where I could catch all windows ev
[osg-users] Intercepting Windows messages
Hi. Trying the 3DConnexion SpaceNavigator with OSG. However I would like to stay away from VRPN and such dependencies... I was wondering how to best intercept Windows messages from the GraphicsWindowWin32 class. This class has a virtual method handleNativeWindowingEvent which I would like to override to catch custom messages from my device. Would it be possible to implement a derived class and have that instantiated instead of the standard osgViewer::GraphicsWindowWin32 one? Or is there a different method to listen to the messages: ( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) Thanks, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OT: documentation tool
Hi all. A OT question regarding documentation. What tool/pipeline do you use for building your documentation for your software? If you want to maintain documentation which contains pictures, references and you want to be able to create indexed nice printable PDF:s, online/html documentation etc. Support for version control through svn is a bonus (so don't say Microsoft Word!) Grateful for your input! /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Oculus+OSG
It's a Dk2. Windows osg 3.2 64 bit. Oculus sdk 0.4.4 I believe it is generally working. I get tracking, stereo just fine. The difference is in picture stability. The sample apps from oculus are dead stable, with very little latency. The osg oculus viewer with a very tiny model on the other hand demonstrate a clear lag. Might all be lag, or some additional artifact hard to tell. It is certainly not model complexity. Might be some new extrapolation feature not enabled... /Anders On Sunday, February 8, 2015, Jan Ciger jan.ci...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Anders, I haven't touched this in a long while, but perhaps I could help you. Which Rift and SDK version are you using? I am not sure the DK2 is actually supported. I think Bjorn did some work on it later, but no idea about the state of the code. Could you time where is it spending most of the time? I suspect it is going to be either the tracking or there is something wrong with the shaders - are there any messages being printed out? Does it actually display a meaningful scene, apart from the jumping? If you are using a modern/recent SDK which has the binary runtime, you may want to try to turn off your firewall - the runtime is talking to the libOVR using a network socket and perhaps it is interfering. J. -BEGIN PGP SIGNATURE- Version: GnuPG v1 iD8DBQFU1zDcn11XseNj94gRAgoXAKC0mT76ZpWKi2Hyz3vhs5X0+7OnVACfYVXb hRlrM2dfcEcySzEAe47Nch0= =Zsrq -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org javascript:; http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Oculus+OSG
Hi all. I notice that when I use the https://github.com/bjornblissing/osgoculusviewer samples I get really jumpy rendering compared to all the Oculus SDK samples... Seems there is a lot of work to get this working. I'm using the Extend Desktop to HMD display mode with all the samples. But with osg+oculusviewer I get this lag/jump, even for the simplest model. The timing on graphics is extremely fast, 1ms for rendering for each of the render targets... Is there anyone else experiencing this? I tried the world demo, forcing it to OpenGL, and it seems to perform exactly the same as D3D rendering... /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CAD Style rendering
New try, the previous was too big (included an image...) Hi all. A general question about rendering... Does anyone has code? to share for a solid CAD style rendering with OpenSceneGraph? I am deliberately vague because it is a broad concept. A technical rendering style, order independent? transparency. Hidden lines wire frame etc... I am looking for inspiration for implementing this kind of rendering. We do most of our rendering using Shaders today. We have a megashader at the end which does all lighting, shadowing, texturing etc. Below is a shot from GrabCAD which sort of illustrates what I am looking for. http://pbrd.co/1zfevxL Position of light sources, type of lightsources # lightsources etc. Any hints? Tankful for any input. Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Wrong JitterTextureUnit?
Hi all. I notice that you can specify the texture unit for SoftShadowMap: void SoftShadowMap::setJitterTextureUnit(unsigned int jitterTextureUnit) { _jitterTextureUnit=jitterTextureUnit; } However, in the method void SoftShadowMap::createUniforms() I notice the following code: _jitterTextureUnit=_shadowTextureUnit+1; Which obviously overwrites any settings the user previously did... I'm guessing it is a legacy from the 2.6 version where the jitterTextureUnit was hardcoded this way? /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Status of beyond OpenGL 1 materials
Hi all. I was trying to catch up a bit on the newer stuff on OpenGL. What is the status of dropping all gl_material, gl_light stuff in shaders (using uniforms only)? Is that part of any released version of OSG, or is it part of the ShaderComposition work still in trunk? /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Status of beyond OpenGL 1 materials
Yeah, so you would still have to parse the scenegraph and create your own Uniform structure for all possible stuff found in the osg::Material's created by various file readers. Are there any plans for moving this over to uniform too? Regarding Deferred Shading, are there any OpenSource projects based on OpenSceneGraph with a framework for this? /A On Fri, Dec 20, 2013 at 3:11 PM, Sebastian Messerschmidt sebastian.messerschm...@gmx.de wrote: Hi Anders, apart from long term plans I managed to get the appropriate behaviour by writing a FixedFunctionVisitor. It uses a modified ShaderComposition (based on Ubershaders with #defines) and injects the appropriate uniforms for osg::Material. Lights are managed a bit differently but also with a combination of uniforms and callbacks, effectively removing the orignal lights and replacing them with uniforms. The catch here is, that materials are no longer coupled with the existing states. They are transformed once and changing the osg::Material state attributes will no longer affect the scene. P.S. I needed to remove the fixed function light management from the graph anyways to transform the lightsource nodes to geometry in a deferred pipeline. Hi Anders, On 20 December 2013 10:56, Anders Backman ande...@cs.umu.se wrote: I was trying to catch up a bit on the newer stuff on OpenGL. What is the status of dropping all gl_material, gl_light stuff in shaders (using uniforms only)? OpenGL ES 2.0 onwards does not support any of the gl_ built ins. OpenGL 3.0 core profile like ES 2.0 does dot support any of the gl_ builtins. osg::State is able to remap shaders that contain the main gl_ModelViewMatrix etc. builtins and provides osg_ equivilants. However, this doesn't extend to individual bits of the fixed function pipeline like gl_Materail/gl_Light etc, for these you will have to provide your own Uniforms. Is that part of any released version of OSG, or is it part of the ShaderComposition work still in trunk? The ShaderComposer is part of OSG-3.2 and is able to compose shaders that you provide in the appropriate shader composer friendly way, see the osgshadercomposition example. My long term plan is for the fixed function pipeline state like osg::Light etc. to provide the necessary shader components - both the uniforms and the shaders to enable scene graphs with fixed function usage to work on ES 2.0 and GL 3.0 core profiles. Robert. ___ 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 -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Disabling shadows for text
Hi all. Assume I want to add text following an object in the scenegraph, so I create a geode with text below a MatrixTransform in the scene. Now assume I want to disable shadows (when ShadowMap) for the text (obviously). Is the only way to do that, to have a separate graph for the text (without a ShadowedScene node above)? The setReceivesShadowTraversalMask does not apply for ShadowMap (which I noticed after some testing). But is there any other way? /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] viewer-getCameraWithFocus() is gone?
What is the appropriate call for achieving the same thing now with OSG 3.2.0 when the method Viewer::getCameraFocus is gone? /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems with 3.1.5
Quick update. By doing the following: #include GL/glew.h // To fix the incompatible stuff between glew and osg 3.2.0 #undef GL_ARB_gpu_shader_fp64 #include osg/gl2Extensions The problem with include\osg\uniform(454): error C2065: 'GL_DOUBLE_MAT2x3' : undeclared identifier include\osg\uniform(455): error C2065: 'GL_DOUBLE_MAT2x4' : undeclared identifier include\osg\uniform(456): error C2065: 'GL_DOUBLE_MAT3x2' : undeclared identifier include\osg\uniform(457): error C2065: 'GL_DOUBLE_MAT3x4' : undeclared identifier include\osg\uniform(458): error C2065: 'GL_DOUBLE_MAT4x2' : undeclared identifier include\osg\uniform(459): error C2065: 'GL_DOUBLE_MAT4x3' : undeclared identifier is resolved. On Thu, May 2, 2013 at 11:52 AM, Markus Hein mah...@frisurf.no wrote: Hello All, Den 27.04.2013 10:18, skrev Sebastian Messerschmidt: Hello Anders, Hi all. I wanted to start using the latest dev build (3.1.5) with VisualStudio 2012. 64Bit. However, I immediately got a few problems: #1.WARNING: The warning: fstream(41): warning C4250: 'osgDB::fstream' : inherits 'std::basic_ostream_Elem,_Traits::std::basic_ostream_Elem,_Traits::_Add_vtordisp2' via dominance From the class class OSGDB_EXPORT fstream : public std::fstream Is still very much present and give a lot of warnings all over the place. The first warning has been discussed more than once. If you get linker errors somewhere later on, the only workaround I know of is to set the linker to /FORCE: MULTIPLE I tried /FORCE: MULTIPLE , but it couln't solve the linker errors I got, using VS2012 Update2 (v11_xp platform toolset). I was unable to build my app and I was searching for the reason: std::ofstream is used directly somewhere in my app-code, the kode was including osgDB/FileUtils. It compiled, but it didn't link the libs. I have changed the code using #include fstream instead , and outcommented #include osgDB/FileUtils , now everything was linking again and I got my app built this way. Before using Visual Studio 2012, there was a lot of compiler warnings regarding some ofstream issues, but I could build my stuff . In Visual Studio 2012 (Update II, v110_xp) something has changed. regards, Markus ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] viewer-getCameraWithFocus() is gone?
So you cannot find this out through a pointer to the viewer? You need to go through the EventAdapter? /A On Tue, Aug 6, 2013 at 10:20 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, On 6 August 2013 07:57, Anders Backman ande...@cs.umu.se wrote: What is the appropriate call for achieving the same thing now with OSG 3.2.0 when the method Viewer::getCameraFocus is gone? I have added information about which camera the event is over to the osgGA::GUIEventAdapter, it now has a PointerData stack, the topmost entry will be the one with the focus, and it's PointerData.object member variable will store the pointer to the Camera. This new scheme can handle situations where you have distortion correction or other RTT techniques being deployed in the Viewer. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems with 3.1.5
Hi all. I wanted to start using the latest dev build (3.1.5) with VisualStudio 2012. 64Bit. However, I immediately got a few problems: #1.WARNING: The warning: fstream(41): warning C4250: 'osgDB::fstream' : inherits 'std::basic_ostream_Elem,_Traits::std::basic_ostream_Elem,_Traits::_Add_vtordisp2' via dominance From the class class OSGDB_EXPORT fstream : public std::fstream Is still very much present and give a lot of warnings all over the place. #2.WARNING: GL_PATCHES seems to be a new variable, which conflicts with the one in glew.h. warning C4005: 'GL_PATCHES' : macro redefinition gl\glew.h(4685) : see previous definition of 'GL_PATCHES' #3 ERROR: include\osg\uniform(454): error C2065: 'GL_DOUBLE_MAT2x3' : undeclared identifier include\osg\uniform(455): error C2065: 'GL_DOUBLE_MAT2x4' : undeclared identifier include\osg\uniform(456): error C2065: 'GL_DOUBLE_MAT3x2' : undeclared identifier include\osg\uniform(457): error C2065: 'GL_DOUBLE_MAT3x4' : undeclared identifier include\osg\uniform(458): error C2065: 'GL_DOUBLE_MAT4x2' : undeclared identifier include\osg\uniform(459): error C2065: 'GL_DOUBLE_MAT4x3' : undeclared identifier Indicating that glew.h and osg/gl2extensions are very incompatible from 3.1.5 and forward? glew.h is also a nasty one, because it want to be included BEFORE gl.h... More warnings: include\osgtext\font(244): warning C4100: 'descender' : unreferenced formal parameter include\osgtext\font(244): warning C4100: 'ascender' : unreferenced formal parameter /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] wglGetCurrentContext vs osg::GraphicsContext::createGraphicsContext
No one with insight on this? /Anders On Fri, Mar 8, 2013 at 11:27 AM, Anders Backman ande...@cs.umu.se wrote: Hi all. I have a small problem where I use osg::GraphicsContext::createGraphicsContext to create a context for a window-widget (in .NET), but I also use another piece of software that use wglGetCurrentContext to check for context. But wglGetCurrentContext() returns null for the context that OSG creates. My init method: bool GraphicsWindow::initOSG( HWND hwnd) { if (m_viewer.valid()) return true; m_viewer = new osgViewer::Viewer(); m_viewer-setThreadingModel( osgViewer::ViewerBase::SingleThreaded ); m_root = new osg::Group; m_viewer-setSceneData( m_root.get() ); m_traits = new osg::GraphicsContext::Traits(); m_traits-inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( hwnd ); m_traits-setInheritedWindowPixelFormat = true; m_traits-doubleBuffer = true; m_traits-windowDecoration = true; m_traits-sharedContext = NULL; m_traits-supportsResize = true; RECT rect; ::GetWindowRect( hwnd, rect ); m_traits-x = 0; m_traits-y = 0; m_traits-width = rect.right - rect.left; m_traits-height = rect.bottom - rect.top; m_graphicsContext = osg::GraphicsContext::createGraphicsContext( m_traits.get() ); m_viewer-getCamera()-setGraphicsContext( m_graphicsContext.get() ); m_viewer-getCamera()-setViewport( new osg::Viewport( 0, 0, m_traits-width, m_traits-height ) ); m_viewer-getCamera()-setProjectionMatrixAsPerspective(30.0f, static_castdouble(m_traits-width)/static_castdouble(m_traits-height), 1.0f, 1.0f); m_viewer-realize(); m_viewer-frame(); assert(wglGetCurrentContext()); // Fails I have tried m_graphicsContext-makeCurrent(); wglGetCurrentContext STILL returns null... I know that I'm missing something, question is what? /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] wglGetCurrentContext vs osg::GraphicsContext::createGraphicsContext
Hi all. I have a small problem where I use osg::GraphicsContext::createGraphicsContext to create a context for a window-widget (in .NET), but I also use another piece of software that use wglGetCurrentContext to check for context. But wglGetCurrentContext() returns null for the context that OSG creates. My init method: bool GraphicsWindow::initOSG( HWND hwnd) { if (m_viewer.valid()) return true; m_viewer = new osgViewer::Viewer(); m_viewer-setThreadingModel( osgViewer::ViewerBase::SingleThreaded ); m_root = new osg::Group; m_viewer-setSceneData( m_root.get() ); m_traits = new osg::GraphicsContext::Traits(); m_traits-inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( hwnd ); m_traits-setInheritedWindowPixelFormat = true; m_traits-doubleBuffer = true; m_traits-windowDecoration = true; m_traits-sharedContext = NULL; m_traits-supportsResize = true; RECT rect; ::GetWindowRect( hwnd, rect ); m_traits-x = 0; m_traits-y = 0; m_traits-width = rect.right - rect.left; m_traits-height = rect.bottom - rect.top; m_graphicsContext = osg::GraphicsContext::createGraphicsContext( m_traits.get() ); m_viewer-getCamera()-setGraphicsContext( m_graphicsContext.get() ); m_viewer-getCamera()-setViewport( new osg::Viewport( 0, 0, m_traits-width, m_traits-height ) ); m_viewer-getCamera()-setProjectionMatrixAsPerspective(30.0f, static_castdouble(m_traits-width)/static_castdouble(m_traits-height), 1.0f, 1.0f); m_viewer-realize(); m_viewer-frame(); assert(wglGetCurrentContext()); // Fails I have tried m_graphicsContext-makeCurrent(); wglGetCurrentContext STILL returns null... I know that I'm missing something, question is what? /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] OSC plugin, VS2010 64-bit
I would REEEALLLY like a developer release with this fix, otherwise 3.1.4 is not available for anyone with VS2010 (and probably VS2012). Any dates for such release? (3.1.5) /A On Fri, Feb 8, 2013 at 7:45 PM, Jan Ciger jan.ci...@gmail.com wrote: On Wed, Feb 6, 2013 at 10:20 AM, Robert Osfield robert.osfi...@gmail.comwrote: Thanks Stephan for the fix and Paul for the testing. Fix now merged and checked into svn/trunk. The same plugin doesn't compile for Android, it seems that the oscpack library it is using has issues with Android endianness: In file included from C:/R/Dependencies/OpenSceneGraph-ARM/source/src/osgPlugins/osc/osc/OscReceivedElements.cpp:34:0: C:/R/Dependencies/OpenSceneGraph-ARM/source/src/osgPlugins/osc/osc/OscHostEndianness.h:77:10: error: #error please edit OSCHostEndianness.h to configure endianness I suggest disabling the plugin for Android for the time being. Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] OSC plugin, VS2010 64-bit
Grrreat! /Anders On Fri, Mar 8, 2013 at 12:00 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, On 8 March 2013 10:48, Anders Backman ande...@cs.umu.se wrote: I would REEEALLLY like a developer release with this fix, otherwise 3.1.4 is not available for anyone with VS2010 (and probably VS2012). Any dates for such release? (3.1.5) I have a client deadline to meet today, but once this is done I'll have a chance to catch up with submissions and make a dev release. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Creating texture coordinates
Hi all. Does anyone know about sample code for creating texture coordinates for a general triangle mesh? OpenGL can do this when using TexGen, but if I would like to generate this myself given coordinates, indices (and normals), is there a library that someone knows about that does this? Most 3D modelling tools have all of these tools, such as spherical/cylindrical/shrinkwrapped etc... It would be nice to be able to do this in code when creating the Geometry in OSG. Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cullingproblems with double used for BV.
The problem illustrated in this example is most certainly not related to culling. Could it be just that OpenGL handles the vertices as float?, so you enter 6371014 as a value for a float which means that all precision is lost. Rendering something which is a few meters on that scale, will just be rendered incorrectly. So having a transform at the rootnode, bringing transformation back to origo does not help in that case. Small feature culling is disabled. Our main problem, which I havent been able to reduce to an osg-only-app, show the effect of culling artefact in that a cylinder can be rendered at some camera angle, but disappears at others. So its very sensitive to the camera view... In this case, we basically transform the coordinates (6371014) with an inverse matrix (-6371014,0,0) to bring the vertex coordinate down close to origo, and then give that to OSG. But even here, we get this strange artefact of some cylinders (being generated using OSG shapes) sometimes disappears from the view. Backing the camera one inch, and they pop back. Its easy to generate a video, harder to isolate the problem. Because if I save the whole scenegraph down to a osgx file, the problem is gone. Might be a precision problem with the xml based file (as there are just a few decimals there for vertices/transformations). Will try to dump to a binary too. /A On Thu, Oct 11, 2012 at 10:24 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, Even with default settings the culling will be done with doubles, with any floats being cast into doubles before tests against the view frustum planes rather than from doubles down to floats. I'm curious what makes you think the problem is culling. Could it be clipping? Could it be small feature culling? Robert, On 10 October 2012 13:43, Anders Backman ande...@cs.umu.se wrote: Hi all. Using OSG 3.0.1 under windows. A problem that we have experienced now and then without understanding the source of it, is that we get culling problems for scenes where objects are rendered far from origo. By default, OSG use float for representing bounding boxes, spheres etc. I believe I comment on this quite a few years ago related to some other project we were working on. So the support for double representation in BV:s was added. However, we still seem to have problems. Assume you want to do some rendering using ECEF coordinates, where 0,0,0 is at the center of the earth. Then you might end up with values around 6371014 meters. This is obviously not possible to represent in high enough precision for float. What we have been doing to avoid the culling problems is to explicitly use an inverse matrix which brings the coordinates used for rendering down to origo and multiply all transforms with this matrix. This give us problem, where in some specific camera views, some of the rendered (long cylinders) are suddenly culled away, moving closer/away will bring them back. I will try to reduce this to an OSG example... What we would LIKE to do, is to have a MatrixTransform with this inverse matrix. But this was not working before (with float BV:s), and even now with the cmake settings below: //Set to ON to build OpenSceneGraph with float BoundingBox instead // of double. OSG_USE_FLOAT_BOUNDINGBOX:BOOL=OFF //Set to ON to build OpenSceneGraph with float BoundingSphere instead // of double. OSG_USE_FLOAT_BOUNDINGSPHERE:BOOL=OFF //Set to ON to build OpenSceneGraph with float Matrix instead of // double. OSG_USE_FLOAT_MATRIX:BOOL=OFF //Set to ON to build OpenSceneGraph with float Plane instead of // double. OSG_USE_FLOAT_PLANE:BOOL=OFF We still see culling problems. However, I have not been able to break it down to a simple example demonstrating THIS problem. But the example below sure show some problems where for some reason, the coordinates are converted to float somewhere in the pipeline. Im using Vec3D for representing the vertices, the inverse transform is in double precision. Still, I get some weird rendering due to this. Is there anyone else rendering objects far away from origo that have a success-story to share? #define X_VAL 6371014 #include osg/Geode #include osg/Geometry #include osg/Material #include osg/Vec3 #include osg/MatrixTransform #include osg/Texture2D #include osg/PolygonStipple #include osg/TriangleFunctor #include osg/io_utils #include osgDB/ReadFile #include osgDB/WriteFile #include osgGA/TrackballManipulator #include osgViewer/Viewer #include osg/Math #include iostream osg::Node* createScene() { // create the Geode (Geometry Node) to contain all our osg::Geometry objects. osg::Geode* geode = new osg::Geode(); // create LINES { // create Geometry object to store all the vertices and lines primitive. osg::Geometry* linesGeom = new osg::Geometry
[osg-users] Cullingproblems with double used for BV.
to viewer. viewer.setSceneData( root ); return viewer.run(); } Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fixed size
Hi all. Anyone got a reference to code/example illustrating how to get an object being rendered to the screen with a fixed size, no matter the distance to the camera? For example, if I want an icon to be rendered with a fixed size of 100 pixels high, it should rotate and translate with the rest of the scene, but the size should be constant. Cheers, Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Bug in
Hi all. Found a bug in ShapeDrawable.cpp This is verified in 3.0.1 and 2.9.11: Bug in OpenSceneGraph/src/osg/ShapeDrawable.cpp, void DrawShapeVisitor::apply(const Capsule capsule) : If numRows becomes odd, the capsule top and bottom parts created with two calls to drawHalfSphere will not align with the cylinder body created with drawCylinderBody. Easiest seen if with large radius and few rows. Example capsule parameters: height 8.4 radius 5 Set detail ratio hints to 0.35 so numRows becomes 7. Misalign. Change hints to 0.4, numRows becomes 8 and capsule part aligns. Fix: If numRows is odd, add one before calling drawHalfSphere. I don't think the user should be aware of this and have to pick a suitable detailRatio. Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering NURBS
What do you guys out there use for rendering NURBS? glu? Third-party libraries? If so which ones can you recommend? Thanks, Anders. -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Invitation to connect on LinkedIn
Yep, I managed to do the same thing. Sorry. The interface in LinkedIn managed to disguise this quite effectively. I did not realize anything until I started to get a lot of accepts ;-) /A On Fri, Feb 3, 2012 at 3:49 AM, Jean-Sébastien Guay jean_...@videotron.ca wrote: Hi Robert, I think this comes from the fact that LinkedIn can send invites to people in your address book, and users are using this with the osg-users list in their address book. There's probably a way to block these, but user education might be good enough in the short term. I don't think anyone can accept an invitation on behalf of the whole osg-users mailing list anyways. J-S On 02/02/2012 3:44 AM, Robert Osfield wrote: Hi All, Getting invites from LinkedIn is NOT an acceptable use of the osg mailing lists/forum. If it's an automated thing then we need to squish it somehow. Robert. On 2 February 2012 03:33, Ariadie Chandra via LinkedIn mem...@linkedin.com mailto:mem...@linkedin.com wrote: LinkedIn Ariadie Chandra requested to add you as a connection on LinkedIn: mingyue, I'd like to add you to my professional network on LinkedIn. - Ariadie Accept http://www.linkedin.com/e/-qywqtf-gy58ds1r-2o/ki9l5dc0WBU2jCm_-ENl0WSMUV6C2kw9fBND0WJWSkAnjfMIiTR/blk/I179148135_125/6lColZJrmZznQNdhjRQnOpBtn9QfmhBt71BoSd1p65Lr6lOfPkOclYRcP4Ud34VdP59bRBHsjlxiCdAbPAVe3kRdPARdPkLrCBxbOYWrSlI/EML_comm_afe/?hs=falsetok=2OAXrzjyllN541 View invitation from Ariadie Chandra http://www.linkedin.com/e/-qywqtf-gy58ds1r-2o/ki9l5dc0WBU2jCm_-ENl0WSMUV6C2kw9fBND0WJWSkAnjfMIiTR/blk/I179148135_125/dj8NnPkPcjwQcjATckALqnpPbOYWrSlI/S2_svi/?hs=falsetok=2gRoC4rPZlN541 *WHY MIGHT CONNECTING WITH ARIADIE CHANDRA BE A GOOD IDEA?* *Ariadie Chandra's connections could be useful to you* After accepting Ariadie Chandra's invitation, check Ariadie Chandra's connections to see who else you may know and who you might want an introduction to. Building these connections can create opportunities in the future. © 2012, LinkedIn Corporation ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Jean-Sebastien Guay jean_...@videotron.ca http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Invitation to connect on LinkedIn
LinkedIn Anders Backman requested to add you as a connection on LinkedIn: -- mingyue, I'd like to add you to my professional network on LinkedIn. - Anders Accept invitation from Anders Backman http://www.linkedin.com/e/-qywqtf-gxc5g03v-5z/ki9l5dc0WBU2jCm_-ENl0WSMUV6C2kw9fBND0WJWSkAnjfMIiTR/blk/I170977545_125/6lColZJrmZznQNdhjRQnOpBtn9QfmhBt71BoSd1p65Lr6lOfPkOclYRd3kTdPAMdP59bPl5jlhmlP93bPoVdPgMcP0MdjkLrCBxbOYWrSlI/EML_comm_afe/?hs=falsetok=117yAgNYfqkl41 View invitation from Anders Backman http://www.linkedin.com/e/-qywqtf-gxc5g03v-5z/ki9l5dc0WBU2jCm_-ENl0WSMUV6C2kw9fBND0WJWSkAnjfMIiTR/blk/I170977545_125/dj8NnPkQdjsTej0TckALqnpPbOYWrSlI/svi/?hs=falsetok=3cifEx60fqkl41 -- Why might connecting with Anders Backman be a good idea? Anders Backman's connections could be useful to you: After accepting Anders Backman's invitation, check Anders Backman's connections to see who else you may know and who you might want an introduction to. Building these connections can create opportunities in the future. -- (c) 2011, LinkedIn Corporation___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Real-time planet rendering VIII
Some interesting research results on rendering large scale forests. Should'nt be impossible to implement in OSG I guess: http://www.youtube.com/watch?v=4Ghulpp6CPw /A -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Color in ShapeDrawable
Farshid: head on the nail! :-) Hence, it makes no sense storing a color in ShapeDrawable. Actually, Robert, I think you implemented Shape and ShapeDrawable when you were working here at VRlab in Umeå, right? ;-) Cheers, /A On Sat, Dec 3, 2011 at 12:18 AM, Jason Daly jd...@ist.ucf.edu wrote: ** On 12/02/2011 03:18 PM, Farshid Lashkari wrote: Hi Jason, On Fri, Dec 2, 2011 at 11:30 AM, Jason Daly jd...@ist.ucf.edu wrote: I don't understand what you mean here. If you disable lighting, material colors are irrelevant. The ShapeDrawable's colors are the ONLY way to set the color. That's actually not the case with OSG. If you look at the source for osg::Material, you will notice it calls glColor with one of the material colors (depending on the color mode). This means you can use osg::Material to control the color of geometry even when lighting is disabled. My mistake, I didn't realize that. I guess I've never hit that use case before. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Color in ShapeDrawable
Yes, which is what I wrote: What is the idea behind having a color in ShapeDrawable? I cant see any reason why there would be a color associated to a shape? Create a triangle, and by the way, its red. That was my question. So if you WOULD like to control the color by disabling light and use diffuse, it will not work. It will be white (due to the call in ShapeDrawable). Anyway, there are ways around this. I just thought it was very inconsistent to associate a color to a ShapeDrawable. /Anders On Fri, Dec 2, 2011 at 9:53 AM, Filip Arlet fili...@seznam.cz wrote: Hi, in OpenGL if GL_LIGHTING is disabled, the final color of polygon is determined by glColor. If you see ShapeDrawable::drawImplemenation(), there is glColor call. Code: osg::State state = *renderInfo.getState(); GLBeginEndAdapter gl = state.getGLBeginEndAdapter(); if (_shape.valid()) { gl.Color4fv(_color.ptr()); / - DrawShapeVisitor dsv(state,_tessellationHints.get()); _shape-accept(dsv); } Cheers, Filip[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44181#44181 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Color in ShapeDrawable
Hi. What is the idea behind having a color in ShapeDrawable? What this means, is that if you create a ShapeDrawable, and stitch a material in a node above it, you cannot control the color through a material when lighting is disabled. So if I would like to do: material = new osg::Material; stateset-setAttributeAndModes(material,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); stateset-setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF|osg::StateAttribute::PROTECTED); material-setColorMode(osg::Material::OFF); // Diffuse color == glColor(diffuse); Then control the color of this node by changing the diffuse color: material-setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(1.0,0.0f,0.0f,1.0f)); It would render in white, due to that the ShapeDrawable applies a white color! Only way of changing this, would be to call ShapeDrawable::setColor() Is there another way of achieving this? (Except for skipping the use of ShapeDrawables completely). /Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Override override?
Yes,, which means I have to traverse down and protect any StateSet which I found in the subgraph... Ok, thats what I though. /A On Mon, May 9, 2011 at 9:31 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, If you want to protect an child's state from being override from above you use the PROTECTED mode. Robert. On Mon, May 9, 2011 at 3:12 AM, Anders Backman ande...@cs.umu.se wrote: Hi. Guess I been away from OSG a bit too long. I have a pretty simple question. Assume I have a renderstate which I set to a group (lets call it PARENT) far up in the tree close to the root, this state set some default look, with shadows, texture and diffuse color. It has on|override|protected to make everything in the scene to get this look. Now assume I want to read in a file (in this case an obj file) into the same tree (child PARENT). The material in the obj file SHOULD now be used. So I want to override an overridden material. What is the best way of achieving that, assuming I want everything from the parent (shadows, lights) to be used, EXCEPT for any material stuff in the obj file. Do I have to load the file, traverse down until I find a state, see if it has a material attribute, set it to on|protected|override? Or is there any other way of saying, ok, down to this node, we have been using the material set from the root (PARENT), but it will stop here. From this node down, anything specified (even without OVERRIDE,PROTECTED), will be used. Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ 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 -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Override override?
Hi. Guess I been away from OSG a bit too long. I have a pretty simple question. Assume I have a renderstate which I set to a group (lets call it PARENT) far up in the tree close to the root, this state set some default look, with shadows, texture and diffuse color. It has on|override|protected to make everything in the scene to get this look. Now assume I want to read in a file (in this case an obj file) into the same tree (child PARENT). The material in the obj file SHOULD now be used. So I want to override an overridden material. What is the best way of achieving that, assuming I want everything from the parent (shadows, lights) to be used, EXCEPT for any material stuff in the obj file. Do I have to load the file, traverse down until I find a state, see if it has a material attribute, set it to on|protected|override? Or is there any other way of saying, ok, down to this node, we have been using the material set from the root (PARENT), but it will stop here. From this node down, anything specified (even without OVERRIDE,PROTECTED), will be used. Cheers, Anders -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Download details: Microsoft Visual Studio 2010 Service Pack 1 (Installer)
I second the one about performance. I have a 4 Core Machine (8 with HT) with 6GB memory. Since I started using VS2010, I feel kidnapped by Microsoft. The Intellisense is extremely slow for larger projects. VS is an editor, but sometimes it feels like a CAD application, it commonly uses 700-800Mb, and it is locks up now and then. Reloading a solution with 30-some projects takes forever... So its not really a huge leap forward from VS2008, which feels like a Ferrari in comparison. Seems that they have merged the Word team with the VS2010 development team... VS2010, is more like Microsoft Word, but with a compiler. For day to day C++ development (not using .NET), its a pain...waiting for the circle most of the time. But the fonts are nicer :-) The one and only thing that really sticks out as a positive improvement is the performance profiler. Thats really really nice. Although it only works for 32bit apps :-( /A On Thu, Mar 17, 2011 at 6:29 PM, Paul Sherman psher...@drizzle.com wrote: Chris, I have not, as of yet, gotten around to building OSG with VS2010SP1, but in general I would say that if you are using VS2010, get the service pack. It fixes quite a few bugs and there are some drastic improvements in performance. The one woefully horrible piece of functionality is Go To Definition which is still pretty slow even after the one time, murderously slow database rebuild. I use 3rd party tools instead. Other than that, I think it is a good set of fixes. -Paul On 3/17/2011 10:09 AM, Chuck Seberino wrote: Chris, I haven't been impressed at all with VS2010. The IDE tends to crash quite a bit - annoying, but not the end of the world. I did have an issue with 64-bit builds, particularly with Qt-4.7.x. Seems that there were byte-alignment issues (http://support.microsoft.com/kb/2280741). After installing the hotfix everything seems OK, at least no problems that I could blame on the compiler :). I haven't tried SP1 yet. I even tried looking for a list of fixes, but it seems that MS doesn't want to publish them. So my suggestion - if there is nothing wrong with the current development setup, don't upgrade. The IDE is slower and buggier than ever. That being said, it is (finally) generating proper binaries in x64 with the hotfix. The last item I forgot to mention is that there are duplicate symbols between osgDB::fstream and std::fstream that require the /FORCE:MULTIPLE linker option to work around. Only an issue on 2010 builds. HTH Chuck On Mar 16, 2011, at 7:06 PM, Chris 'Xenon' Hanson wrote: VC++2010 SP1 is apparently out now. https://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5 I have one client who really wants to use OSG on 2010 (64-bit even!) and I'm curious about people's experiences with stability. Is 2010 generating good solid binaries from the OSG codebase, or are there still issues that we'll need to see if the SP1 fixes? -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. 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 ___ 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 -- __ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting window id for all platforms
Sure, which is what I did for Win32. But to what should I cast it in other cases? X11? There is only two relevant classes there: GraphicsWindow and GraphicsWindowWin32... I would have expected something like GraphicsWindowX11? /A On Thu, Jan 6, 2011 at 12:24 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, I'm afraid the window handles differ in type across platforms so it's not possible to directly have a single cross platform handle. There are methods in each the GraphicsWindow subclasses for getting the platform specific handles, but you'll need to cast and use the appropriate types/methods for each of these. Robert. On Tue, Jan 4, 2011 at 3:30 PM, Anders Backman ande...@cs.umu.se wrote: Hi all. I would like to get the window reference for all platforms using osgViewer::Viewer. I found the thread: http://www.mail-archive.com/osg-users@openscenegraph.net/msg12957.html Where I used this code for win32: osgViewer::GraphicsWindowWin32* gw = dynamic_castosgViewer::GraphicsWindowWin32* ( application-getViewer()-getCamera()-getGraphicsContext()); HWND hWnd = gw-getHWND(); But I cant find a way to get that under X11, (MacOS, Cocoo or whatever). Is there a portable way of getting this reference? /A ___ 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] Getting window id for all platforms
Ah, ok then. I was not browsing the source, just the built/installed stuff, on a win32 machine, which meant I only had the win32 version. Ok then. Thanks. /A On Thu, Jan 6, 2011 at 10:30 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Anders, Sure, which is what I did for Win32. But to what should I cast it in other cases? X11? There is only two relevant classes there: GraphicsWindow and GraphicsWindowWin32... I would have expected something like GraphicsWindowX11? If you are looking at the include dir of an installed OSG, you will only have the header(s) relevant to the platform it's installed on. In the OSG source tree, in the include/osgViewer directory, you'll see GraphicsWindowWin32, GraphicsWindowX11, GraphicsWindowCarbon, GraphicsWindowCocoa, etc. You'll have to guard inclusion of these headers to make sure you only include them on the right platform. 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Getting window id for all platforms
Hi all. I would like to get the window reference for all platforms using osgViewer::Viewer. I found the thread: http://www.mail-archive.com/osg-users@openscenegraph.net/msg12957.html Where I used this code for win32: http://www.mail-archive.com/osg-users@openscenegraph.net/msg12957.html osgViewer::GraphicsWindowWin32* gw = dynamic_castosgViewer::GraphicsWindowWin32* ( application-getViewer()-getCamera()-getGraphicsContext()); HWND hWnd = gw-getHWND(); But I cant find a way to get that under X11, (MacOS, Cocoo or whatever). Is there a portable way of getting this reference? /A ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Old really nasty OpenThreads bug?
This is a WINDOWS problem only. It works under Linux, MacOSX just fine. Sorry for not pointing it out more clearly. To reply Juan, the problem of using static variables for destruction is that it causes exactly this problem :-) If the static variable is defined in the MAIN-APP, it works just fine. In the same way that atexit() works when it is called from the main-app. It is when the static variable (in your case static Deallocator deallocator) is defined in the .dll file for our library the problem occurs. So I can recreate exactly the same problem by using static deallocators instead of atexit(): 1. If deallocation of the thread occurs in main, it works 2. If deallocation of the thread occurs in dll it hangs. Same code works in Linux/Mac regardless of gcc version. We have deallocators in the form of Singletons, which are handled by a SingletonManager, which is responsible of shutting things down in a specific order. Problem is just, when should the destructors be called? Explicitly: main() { ... shutdown(); // Works fine, thread dies happy. } or implicitly by the scope of static variables? (preferred so that user does not have to call shutdown(); /A On Fri, Dec 3, 2010 at 11:20 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, I have just had a look at your test example and it fails to compile under linux due to the atexit() method. Reviewing the code I'm a bit confused why you are using atexit() method at all. The OSG itself has lots of threads, objects and singleton created in difference places at different times and works fine with a platform specific exit mechanism, so I would have thought it should be possible for your app as well. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Anders Backman, CTO Algoryx Simulation AB Uminova Science Park, Box 7973, SE-907 19 Umeå, Sweden and...@algoryx.se http://www.algoryx.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Old really nasty OpenThreads bug?
Well, I have done some thorough googling on the matter, and it is a general problem in dll-vs-atexit-static variables problem. So it is most probably not a bug in OpenThreads. Lets close that issue. Each dll has its own order of destruction for static variables, combine that with that each dll-has its own order of execution of atexit() it becomes a problem. Smack the condition-locks that windows use internally for loading dll, which by the way are handled as static variables, you have a mess. Lights down, thanks for the attention :-) /A On Fri, Dec 3, 2010 at 12:59 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, I'm pretty sure is not a threading issue / bug in OpenThreads, I believe it's an issue of proper management of the destruction order of objects/implementations. When you use singletons you have to be particularly careful if you are relying upon automatic clean up provided by the static object destruction. One way you could handle the issue of implementations provided by dll's being unloaded prior to your singleton destructing is for the dll to have a static varaible that on the dll's unloaded/destruction will call the singleton to remove/clean up itself and instances of threads it provides correctly. If when the singleton gets destructed and their are still threads there that need destructing it can do so. To do it I think you'll probably need not just the Thread subclasses in the plugin/library but also a statically created CleanUp class that when it destructs it knows about which types of Threads are associated with it and need cleaning up. One way to do this might be have this helper class create and destroy the Threads that are associate with that plugin/library, maintaining a local list of these Threads. The singleton then wouldn't directly have the list of threds, just a list of the help class. 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] Old really nasty OpenThreads bug?
Hi all. Im using OpenSceneGraph 2.8.3 under windows. Visual studio 2008. However, this problem has been around for at least 2 years, so it existed in previous versions too. I have finally after two years? isolated the bug I reported quite a while back: http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2008-May/011360.html I took a deep breath, and after quite a few hours I managed to isolate the problem into one .dll file and one .exe file. The problem: Assume I have an application, it creates a thread. For various reason, I want to register this thread to a function for later destruction (in our lib we give the pointer of the thread to a singleton which later destroys the thread). In this example, its just registers a function in atexit() which will delete the thread. Notice that this call to atexit() is done within ANOTHER DLL (otbugdll.cpp). When the app exits, the atexit() is called and the thread is destroyed. But the problem is that it hangs at the call to m_block.release() in the destructor. If I instead call atexit() from the main app, everything works just fine. This means, that the call to delete for the thread is the same, its just initiated from an atexit() call done from main(). What this does, is that we need to have a call: ThreadPool::instance()-shutdown(); that HAVE to be called BEFORE the end of the scope of main. Really irritating. We cant use atexit() from within the library (because it is done from a separate lib/dll, which regenerates the problem). To build this, you need to set the OSG_DIR path to your OpenSceneGraph install, run cmake on it, and build the project. If SHOULD_HANG is defined it will...hang. http://www8.cs.umu.se/~andersb/otbug.zip I have done just about everything I can come up with to try to resolve this problem, but nothing works. I have tried to use a DllMain() function, which catches the events for attaching and detaching the dll, and doing the delete of the thread there. I have tried every combination of singletons, static variables etc, but it all fails. So the above example is not really exactly my original problem, but it reproduces the problem quite nicely. I cannot really see what the problem is. The flow of code is exactly the same no matter if SHOULD_HANG is defined or not. It might be a bug in how OpenThreads use the win32 threading API. OR it might be a limitation of the Win32 threading API. Thankful for any help on this matter. It has been on my mind now for more two years. /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OT: User GUI toolkit
Old as,... I don't know. But this question pops up now and then. Assume you need a OpenGL based SDK, lean (in terms of dependencies) gui, for In-graphics GUI, multiplatform. With basic support for sliders, buttons, text, windows. What do people use? Is it QT for everything (with their OpenGL based widgets), is it FLTK? wxWidgets? Seems that most of the small, OpenGL based stuff are mostly stalled in development. Some are integrating Java (JOGL)... Really curious to see what people use, perhaps there are some new interesting stuff out there? -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] setupViewer() hijacks thread affinity mask.
Using OSG 2.8.3 under windows 7 64bit. VS2008. Hi, we discovered a problem where OSG hijacks the affinity for threading in void ViewerBase::setUpThreading(): ViewerBase.cpp: // we'll set processor affinity here to help single threaded apps // with multiple processor cores, and using the database pager. int numProcessors = OpenThreads::GetNumberOfProcessors(); bool affinity = numProcessors1; if (affinity) { OpenThreads::SetProcessorAffinityOfCurrentThread(0); This means that, IF osg viewer is initialized before an app want to setup threads, any threads started after that will get affinity(0), that is stick to one core. viewer.setupViewer( osg::Viewer::SingleThreaded ); createMyOwnThreads(); // sticks to CPU0. Just because osg want to run on one thread, does not automatically mean that all other API:s want to stick to that main CPU. Any threads that should run on other CPU:s needs to be created BEFORE osg::viewer is initialized, not always the case. Assume a thread is created from the keypress of a user? What we do now is to reset the threadmask after setupViewer is called. Then we get all the core-usage we want :-) Just wanted to share the experience. Keep up the excellent work! /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] setupViewer() hijacks thread affinity mask.
You are excused Rupert, considering you taught me to like Bowmore :-) (seems like a million years ago now). :-) Anyways, it is certainly possible to reset the threading mask. It was just the fact that setupViewer() set this, and then left it locked to one core. The main thread (where setupViewer) then will have this threading mask until someone sets it to something else. As we was not aware of this in setupViewer() it took some debugging to understand why we did not get an even load balancing over our 4 cores. Everything just stuck to one of them (whichever the os decided to select for the app at startup). This was first discovered under linux but was reproducible under windows too. So it should be clearly documented as a sideeffect, or handled in some other manner. /Anders On Fri, Nov 5, 2010 at 11:11 AM, Robert Osfield robert.osfi...@gmail.comwrote: On Fri, Nov 5, 2010 at 10:10 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Andreas, Ooopsss... I meant to type 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] OT: VS2010 LNK2005 problem related to ostringstream
I don't think MS considers this to be a problem. It is by design. Not being able to derive from ANY stl classes is quite serious if you ask me. Fiddling around with allowing multiple symbols and other hacks does not really present it self as a stable and viable solution. I managed to get around deriving from std::string by making it a pure template implementation, not using any dllimport/dllexport directives. That worked (of course). But as soon as you derive the interface, export it in a dll-file, it does not work. Unless you instantiate all symbols inside the dll. Then it get the correct linkage. Its really the mix between template and non-template code that causes the problem. I don't think we can expect a solution for this any time soon. Unless someone has a brother working as a manager at the vs2010 team? :-) Also, Incredibuild is heavily delayed for vs2010 (~4 months still encounting), seems that they have problems of the port over to vs2010 too. /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream
Ok, I have localized the problem. For example, the class osgDB::fstream: class OSGDB_EXPORT fstream : public std::fstream { }; which just inherits from std:.fstream causes the symbols of std::fstream to be exposed into osgDB.dll This effectively means that It might cause problems for people linking against osgDB.dll later on. Same goes for inheriting from std::string, std::ostringstream etc. This must obviously be a bug, a very serious one in VS2010. We had a class derived from std::ostringstream, which exposed the symbols in the vtable for the class: namespace ns { class Notify : public std::ostringstream { }; } Using depends.exe to analyze the dll-file gives: const ns::Notify::`vftable'{for `std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar '} My issue was reported to the msdn forum. Their first take was: Oh you use CMake, thats not our product :-) But in later threads, they tried to reproduce the problem without luck... So if you manage to reproduce this in a small example, go ahead and post it. We must make them aware of this problem. http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/191de00a-53c9-4bd9-9cb6-e844eb224ca2 /Anders On Mon, Aug 30, 2010 at 4:31 AM, Christiansen, Brad brad.christian...@thalesgroup.com.au wrote: Hi, Unfortunately I can't offer a solution, but I thought I would mention I have come across this exact problem and have also pulled my hair out trying to find a solution. This same problem exists when building virtual planet builder, linking with osgDB causes the multiply defined symbols. I had no other issues building the 3rd party libs and osg with 2010. The only way I could move forward was to allow multiply defined symbols (as has already been mentioned). I agree this seems dangerous and is not a solution but it has allowed me to continue working. So far it hasn’t caused any issues with my vpb build. Given you have used the streams extensively without issue and it seems osgDB is the source of the trouble, have you had a look to see if there is any discernable difference between your code and that in osgDB ? I would love to find a solution to this. Cheers, Brad *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Anders Backman *Sent:* Friday, 27 August 2010 4:00 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream I have verified the build mode for all ingoing libraries. I build all the dependencies myself. Including OSG. The problem I have (which is OSG related), is that if I build without OSG support (no rendering), it all works. And I still use std::ostringstream and std::stringstream quite extensively... We still link against OpenThreads (but no rendering). So only when I link against osg (osg.lib, osgDB.lib, osgText.lib, osgShadow.lib, osgViewer.lib osgGA.lib) I get this problem. I have verified that osg (and OpenThreads) are all built consistently all over the field. Release and /MD (MultiThreadedDLL), which is default from CMake. So I can use/link against OpenThreads.lib, but not OSG... Rather nasty problem, I'm trying to reduce it, but I'm getting nowhere. And once again, same settings, same CMake version, same code all over the place, and it works in VS2008... /A On Thu, Aug 26, 2010 at 8:17 PM, Simon Hammett s.d.hamm...@googlemail.com wrote: Ah ok, then next things to check: Make absolutely sure you aren't mixing up objects libraries from the different builds. For my projects I include a vc version number in the name, so .vc7.lib/vc7.dll .vc9.lib/.vc9.dll and I also use the vc version in the name of output intermediate directory Then check all the code for any use of #pragma comment(lib, libname) and make sure any preprocessor guards that select different versions have been updated to know about vc2010. On 26 August 2010 18:37, Anders Backman ande...@cs.umu.se wrote: Well, I have verified that ALL the dependencies Im using are all built with /MD and NOT debug. Im building all of the dependencies for osg and our lib myself, so I got full control. Also, as I wrote before, I have even tried to build our libs using project files generated from cmake vs2008, build with vs2008 - works ok. Open same project files in vs2010 - problem occurs. Im using buildscripts to build dependencies, and it all works for vs2008... No external libraries, everything is built from code. For VS2010, all the dependencies (including osg 2.8.3) builds/links fine. But for my libs, I get the linking errors. Allowing multiple symbols sounds dangerous, and it did not resolve my problem... /A On Thu, Aug 26, 2010 at 7:26 PM, Simon Hammett s.d.hamm...@googlemail.com wrote: On 26 August 2010 17:35, Anders Backman ande...@cs.umu.se wrote: snip CMake defaults
Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream
I have verified the build mode for all ingoing libraries. I build all the dependencies myself. Including OSG. The problem I have (which is OSG related), is that if I build without OSG support (no rendering), it all works. And I still use std::ostringstream and std::stringstream quite extensively... We still link against OpenThreads (but no rendering). So only when I link against osg (osg.lib, osgDB.lib, osgText.lib, osgShadow.lib, osgViewer.lib osgGA.lib) I get this problem. I have verified that osg (and OpenThreads) are all built consistently all over the field. Release and /MD (MultiThreadedDLL), which is default from CMake. So I can use/link against OpenThreads.lib, but not OSG... Rather nasty problem, I'm trying to reduce it, but I'm getting nowhere. And once again, same settings, same CMake version, same code all over the place, and it works in VS2008... /A On Thu, Aug 26, 2010 at 8:17 PM, Simon Hammett s.d.hamm...@googlemail.comwrote: Ah ok, then next things to check: Make absolutely sure you aren't mixing up objects libraries from the different builds. For my projects I include a vc version number in the name, so .vc7.lib/vc7.dll .vc9.lib/.vc9.dll and I also use the vc version in the name of output intermediate directory Then check all the code for any use of #pragma comment(lib, libname) and make sure any preprocessor guards that select different versions have been updated to know about vc2010. On 26 August 2010 18:37, Anders Backman ande...@cs.umu.se wrote: Well, I have verified that ALL the dependencies Im using are all built with /MD and NOT debug. Im building all of the dependencies for osg and our lib myself, so I got full control. Also, as I wrote before, I have even tried to build our libs using project files generated from cmake vs2008, build with vs2008 - works ok. Open same project files in vs2010 - problem occurs. Im using buildscripts to build dependencies, and it all works for vs2008... No external libraries, everything is built from code. For VS2010, all the dependencies (including osg 2.8.3) builds/links fine. But for my libs, I get the linking errors. Allowing multiple symbols sounds dangerous, and it did not resolve my problem... /A On Thu, Aug 26, 2010 at 7:26 PM, Simon Hammett s.d.hamm...@googlemail.com wrote: On 26 August 2010 17:35, Anders Backman ande...@cs.umu.se wrote: snip CMake defaults to /MD code generation (MultiThreaded). Im using this consistently over all my libraries (just double checked to be sure). Never use that setting unless you know what you are doing. Change every project to Multi-threaded Debug DLL (/MDd) for Debug builds and Multi-threaded DLL (/MD) for Release builds And it will all start working. Those Runtime library settings are the number one 'gotch-ya' for Visual studio, and Cmake defaulting to them is daft. -- http://www.ssTk.co.uk ___ 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 -- http://www.ssTk.co.uk ___ 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] OT: VS2010 LNK2005 problem related to ostringstream
Hi all. This is not related to OSG in any way, but as there so many experts on the list, I thought I should take the opportunity to ask this... I have a problem related to linking in VS2010. Im using VS2010 under Windows 7 (64). Im building a large source package which is divided into two separate libraries (dynamic linking: .lib, .dll). in the first library, a.lib we are using both std::stringstream and std::ostringstream. a.lib depends on other libraries, all built by myself using CMake and VS2010. CMake defaults to /MD code generation (MultiThreaded). Im using this consistently over all my libraries (just double checked to be sure). When I build the next library, b.lib, which depends on a.lib, I get the following linking errors: Linking of b.lib: 1a.lib(a.dll) : error LNK2005: public: void __thiscall std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar ::`vbase destructor'(void) (??_d?$basic_ostringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@QAEXXZ) already defined in ImageCapture.obj 1a.lib(a.dll) : error LNK2005: public: class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar __thiscall std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar ::str(void)const (?...@?$basic_ostringstream@DU ?$char_tra...@d@std@@v?$alloca...@d@2@@std@@qbe?av?$basic_str...@du ?$char_tra...@d@std@@v?$alloca...@d@2@@2...@xz) already defined in ImageCapture.obj 1a.lib(a.dll) : error LNK2005: public: __thiscall std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar ::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar (int) (??0?$basic_ostringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@ @q...@h@Z) already defined in ImageCapture.obj Ok, I go into the sourcecode of ImageCapture.cpp and remove the use of std::ostringstream. And everything builds. Next, I try to use std::ostringstream in some other cpp file of the b.lib, so I just copy the code from ImageCapture.cpp into another .cpp file in b.lib, including the #include directives... It links just fine. One important thing to mention, all of this works just fine in VS2008. Next, I tried to change from std::ostringstream to std::stringstream in both a.lib AND b.lib. Now I get the same error, but instead its std::stringstream mentioned in the error message: 2a.lib(a.dll) : error LNK2005: public: void __thiscall std::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar ::`vbase destructor'(void) (??_d?$basic_stringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@QAEXXZ) already defined in ImageCapture.obj 2a.lib(a.dll) : error LNK2005: public: class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar __thiscall std::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar ::str(void)const (?...@?$basic_stringstream@DU ?$char_tra...@d@std@@v?$alloca...@d@2@@std@@qbe?av?$basic_str...@du ?$char_tra...@d@std@@v?$alloca...@d@2@@2...@xz) already defined in ImageCapture.obj 2a.lib(a.dll) : error LNK2005: public: __thiscall std::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar ::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar (int) (??0?$basic_stringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@q...@h@Z) already defined in ImageCapture.obj So, the situation is exactly the same, its just changed from std::ostringstream to std::stringstream. If I have just the right balance between stringstream and ostringstream, it builds. Then the problem occurs when I want to build a third library, depending on both a.lib AND b.lib... Then it starts all over. The next thing I did was to generate project files for vs2008, build with vs2008 (using dependencies built with vs2010), compiles/links just fine. Except it does not run (incompatible STL, crash in deque). Ok, so it builds in VS2008. Next was to build everything in vs2010 using the same project files. Then I get the above linking error. Im more and more leaning towards a bug in VS2010, but its really hard to verify... Anyone experienced this in VS2010? - ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream
How do you allow multiple symbols in VisualStudio? /A On Thu, Aug 26, 2010 at 6:51 PM, Chuck Seberino seber...@energid.orgwrote: Anders, It is somewhat relevant to OSG too, in that linking against osgDB and other code that uses fstream will cause similar 'multiple-defined' linker errors. This problem seems to be only with MSVC2010, the OS doesn't seem to matter (I use XP). osgDB is affected because of osgDB::fstream, which subclasses from std::fstream. The current workaround is to allow multiple symbols when linking. I would be interested in finding a better solution to this problem... Chuck On Aug 26, 2010, at 9:35 AM, Anders Backman wrote: Hi all. This is not related to OSG in any way, but as there so many experts on the list, I thought I should take the opportunity to ask this... I have a problem related to linking in VS2010. Im using VS2010 under Windows 7 (64). Im building a large source package which is divided into two separate libraries (dynamic linking: .lib, .dll). in the first library, a.lib we are using both std::stringstream and std::ostringstream. a.lib depends on other libraries, all built by myself using CMake and VS2010. CMake defaults to /MD code generation (MultiThreaded). Im using this consistently over all my libraries (just double checked to be sure). When I build the next library, b.lib, which depends on a.lib, I get the following linking errors: Linking of b.lib: 1a.lib(a.dll) : error LNK2005: public: void __thiscall std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar ::`vbase destructor'(void) (??_d?$basic_ostringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@QAEXXZ) already defined in ImageCapture.obj 1a.lib(a.dll) : error LNK2005: public: class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar __thiscall std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar ::str(void)const (?str@ ?$basic_ostringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@ @qbe?av?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@2...@xz) already defined in ImageCapture.obj 1a.lib(a.dll) : error LNK2005: public: __thiscall std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar ::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar (int) (??0?$basic_ostringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@ @q...@h@Z) already defined in ImageCapture.obj Ok, I go into the sourcecode of ImageCapture.cpp and remove the use of std::ostringstream. And everything builds. Next, I try to use std::ostringstream in some other cpp file of the b.lib, so I just copy the code from ImageCapture.cpp into another .cpp file in b.lib, including the #include directives... It links just fine. One important thing to mention, all of this works just fine in VS2008. Next, I tried to change from std::ostringstream to std::stringstream in both a.lib AND b.lib. Now I get the same error, but instead its std::stringstream mentioned in the error message: 2a.lib(a.dll) : error LNK2005: public: void __thiscall std::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar ::`vbase destructor'(void) (??_d?$basic_stringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@QAEXXZ) already defined in ImageCapture.obj 2a.lib(a.dll) : error LNK2005: public: class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar __thiscall std::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar ::str(void)const (?str@ ?$basic_stringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@ @qbe?av?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@2...@xz) already defined in ImageCapture.obj 2a.lib(a.dll) : error LNK2005: public: __thiscall std::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar ::basic_stringstreamchar,struct std::char_traitschar,class std::allocatorchar (int) (??0?$basic_stringstr...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@ @q...@h@Z) already defined in ImageCapture.obj So, the situation is exactly the same, its just changed from std::ostringstream to std::stringstream. If I have just the right balance between stringstream and ostringstream, it builds. Then the problem occurs when I want to build a third library, depending on both a.lib AND b.lib... Then it starts all over. The next thing I did was to generate project files for vs2008, build with vs2008 (using dependencies built with vs2010), compiles/links just fine. Except it does not run (incompatible STL, crash in deque). Ok, so it builds in VS2008. Next was to build everything in vs2010 using the same project files. Then I get the above linking error. Im more and more leaning towards a bug in VS2010, but its really hard to verify... Anyone experienced this in VS2010
Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream
Well, I have verified that ALL the dependencies Im using are all built with /MD and NOT debug. Im building all of the dependencies for osg and our lib myself, so I got full control. Also, as I wrote before, I have even tried to build our libs using project files generated from cmake vs2008, build with vs2008 - works ok. Open same project files in vs2010 - problem occurs. Im using buildscripts to build dependencies, and it all works for vs2008... No external libraries, everything is built from code. For VS2010, all the dependencies (including osg 2.8.3) builds/links fine. But for my libs, I get the linking errors. Allowing multiple symbols sounds dangerous, and it did not resolve my problem... /A On Thu, Aug 26, 2010 at 7:26 PM, Simon Hammett s.d.hamm...@googlemail.comwrote: On 26 August 2010 17:35, Anders Backman ande...@cs.umu.se wrote: snip CMake defaults to /MD code generation (MultiThreaded). Im using this consistently over all my libraries (just double checked to be sure). Never use that setting unless you know what you are doing. Change every project to Multi-threaded Debug DLL (/MDd) for Debug builds and Multi-threaded DLL (/MD) for Release builds And it will all start working. Those Runtime library settings are the number one 'gotch-ya' for Visual studio, and Cmake defaulting to them is daft. -- http://www.ssTk.co.uk ___ 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] Building 2.8.3 in VS2010
Hi again. Ok, this is an old one, but I need to be able to build 2.8.3 using VS2010. Everything builds just fine, except for the final INSTALL (of OpenThreads). This was fixed in later versions, so my question, what was done to make this work? Just looking through the log, and I cant really isolate the solution to this specific problem. So is there anyone which knows how to patch 2.8.3 to make it build under 2010? (Not talking about include headers here, thats trivial). /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building 2.8.3 in VS2010
Thanks, that made the trick! Was going through the changelog, this cut down the time by a lot. /Anders On Wed, Aug 25, 2010 at 9:41 AM, Wang Rui wangra...@gmail.com wrote: Hi Anders, The OsgMacroUtils.cmake was fixed to make INSTALL work under VS2010. You may replace the one in 2.8.3 and see if it works. Wang Rui 2010/8/25 Anders Backman ande...@cs.umu.se: Hi again. Ok, this is an old one, but I need to be able to build 2.8.3 using VS2010. Everything builds just fine, except for the final INSTALL (of OpenThreads). This was fixed in later versions, so my question, what was done to make this work? Just looking through the log, and I cant really isolate the solution to this specific problem. So is there anyone which knows how to patch 2.8.3 to make it build under 2010? (Not talking about include headers here, thats trivial). /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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OpenSceneGraph + NVIDIA Optix == true?
Hi all. Is there anyone on the list that could elaborate on this: http://developer.download.nvidia.com/presentations/2009/SIGGRAPH/Siggraph-SceniX-2009.pdf I get the feeling that it is possible to take an OpenSceneGraph app and use Optix to render the scene to get high-quality Raytraced images... If so, its nothing but a huge leap forward, being able to render hi-quality stuff to get screenshots, movies using the same code/app as in realtime. Sounds a liiittle bit to good to be true if you ask me. I know that RedSDK has this support, but thats inside the same scenegraph. This seems to work through a mechanics named SceniX. So is there anyone that has more info??? /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vertex shader for SoftShadowMap FragmentShader.
Yes, I dropped everything but the thing I experienced problem with, the shader replacement of TexGen. Thanks for the tip to look into StandardShadowMap.cpp, that was the only one I didnt peek into before. Now it works. /Anders On Mon, Jun 7, 2010 at 11:42 PM, Wojciech Lewandowski lewandow...@ai.com.pl wrote: Hi Anders, I see two problems with your shader. First it looks like you swaped shadow and jitter map coords. I suppose you want to generate shadow map coords with texgen. So texgen should produce unit 1 texture coords. But most probably you should use view space (gl_EyePlane) coords for shadow coords. Second it looks like lighting/ color math is completely absent so resulting lighting will be probably random. Please have a look at Vertex shader in osgShadow::StandardShadowMap.cpp. Its quite generic and except jitter part it should contain all what you need for single light scenario. Cheers, Wojtek Lewandowski *From:* Anders Backman ande...@cs.umu.se *Sent:* Monday, June 07, 2010 3:27 PM *To:* OpenSceneGraph Users osg-users@lists.openscenegraph.org *Subject:* [osg-users] vertex shader for SoftShadowMap FragmentShader. Hi all. Im trying to use a VertexShader to drive the SoftShadowMap implementation of the FragmentShader (which is present in the SoftShadowMap.cpp). Problem is as usual, that when vertex shader is enabled, all automatic stuff are disabled, such as texture generation. Now after browsing archive, surfing the net and looking through the GLSL book, I have come to the conclusion that the vertex shader below should be enough to drive the Fragmentshader: void main( void ) { gl_Position = ftransform(); gl_TexCoord[0] = gl_MultiTexCoord0; gl_TexCoord[1] = gl_MultiTexCoord1; // Emulate glTexGen (on unit 2) gl_TexCoord[2].s = dot(gl_Vertex, gl_ObjectPlaneS[2]); gl_TexCoord[2].t = dot(gl_Vertex, gl_ObjectPlaneT[2]); gl_TexCoord[2].p = dot(gl_Vertex, gl_ObjectPlaneR[2]); gl_TexCoord[2].q = dot(gl_Vertex, gl_ObjectPlaneQ[2]); } baseTexture - Texture unit = 0 osgShadow_shadowTexture - Texture unit = 1 osgShadow_jitterTexture - Texture unit = 2 But as soon as I enable this vertex shader, the shadow stops working. I need to write my own vertex shader to calculate vertex pos in eye coordinates etc. Im basically trying to merge the shadows with other texturing, such as parallax mapping etc. Any hints on how to write a vertex shader that will replace the fixed functionality for the SoftShadowMap Fragment shader (with base texture)?? /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 -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] vertex shader for SoftShadowMap FragmentShader.
Hi all. Im trying to use a VertexShader to drive the SoftShadowMap implementation of the FragmentShader (which is present in the SoftShadowMap.cpp). Problem is as usual, that when vertex shader is enabled, all automatic stuff are disabled, such as texture generation. Now after browsing archive, surfing the net and looking through the GLSL book, I have come to the conclusion that the vertex shader below should be enough to drive the Fragmentshader: void main( void ) { gl_Position = ftransform(); gl_TexCoord[0] = gl_MultiTexCoord0; gl_TexCoord[1] = gl_MultiTexCoord1; // Emulate glTexGen (on unit 2) gl_TexCoord[2].s = dot(gl_Vertex, gl_ObjectPlaneS[2]); gl_TexCoord[2].t = dot(gl_Vertex, gl_ObjectPlaneT[2]); gl_TexCoord[2].p = dot(gl_Vertex, gl_ObjectPlaneR[2]); gl_TexCoord[2].q = dot(gl_Vertex, gl_ObjectPlaneQ[2]); } baseTexture - Texture unit = 0 osgShadow_shadowTexture - Texture unit = 1 osgShadow_jitterTexture - Texture unit = 2 But as soon as I enable this vertex shader, the shadow stops working. I need to write my own vertex shader to calculate vertex pos in eye coordinates etc. Im basically trying to merge the shadows with other texturing, such as parallax mapping etc. Any hints on how to write a vertex shader that will replace the fixed functionality for the SoftShadowMap Fragment shader (with base texture)?? /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Viewer::realize() - failed to set up any windows
Hi. I suddenly get a problem on my laptop (DELL xps13, NVIDIA G210M) where I cannot run any OSG-based applications. Using OSG 2.8.2 under Windows Vista 7 64Bit. osgviewer file.obj reports: Viewer::realize() - failed to set up any windows Viewer::realize() - failed to set up any windows and no windows is created. In another app (using OpenSceneGraph) I get: Win32WindowingSystem::getScreenInformation() - The screen identifier on the Win32 platform must always use display number 0. Value received was So I set OSG_NOTIFY_LEVEL=DEBUG and get: Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 00CF0AA0 07FEF3A45358 DriveManipulator::_height set to ==1.5 Setting terrain manipulator _minimumDistance to 0.000674282 Viewer::realize() - failed to set up any windows Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 00CF0AA0 07FEF3A45358 DriveManipulator::_height set to ==1.5 Setting terrain manipulator _minimumDistance to 0.000674282 Viewer::realize() - failed to set up any windows Viewer::~Viewer():: start destructor getThreads = 0 Viewer::~Viewer() end destrcutor getThreads = 0 Destructing osgViewer::View Destructing osg::View Done destructing osg::View GraphicsContext::setWindowingSystemInterface() 07FEF3A45358 Closing DynamicLibrary osgPlugins-2.8.2/osgdb_obj.dll I understand NADA. I have downloaded OpenGL Extensions viewer, and no problems is reported. I have ran other opengl based applications (Fur benchmark for example), and they all work just fine. Any suggestions? -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Openthreads tagging
How often is OpenThreads tagged? I see that the 2.3.0 been there a while now. And there is still a problem with a missing file: OpenThreads/packaging/pkgconfig/openthreads.pc.in Which should contain: cat packaging/pkgconfig/openthreads.pc.in _EOF_ # pkg-config source file pref...@cmake_install_prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/l...@lib_postfix@ includedir=${prefix}/include Name: openthreads Description: Object-Oriented (OO) thread interface for C++ programmers Version: @OPENTHREADS_VERSION@ Requires: Conflicts: Libs: -L${libdir} -lOpenThreads Cflags: -I${includedir} _EOF_ Any chance that someone will fix this and tag a new version? /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VS2010
Mm, there is certainly something in the way CMake generates project files for vs2010. I took the suggestion of creating projectfiles for vs2008, and load them into vs2010. Works like a charm... /A On Wed, Mar 31, 2010 at 7:07 PM, Mattias Helsing helsin...@gmail.comwrote: Hi Anders, All the ..'s are intended and put there with the purpose to avoid the Release, Debug, RelWithDebugInfo and RelMinSize folders that Cmake wants to put binaries (and other stuff like libs) in. You should look in the other end - that is - why your cmake install script doesn't pick up on this. I wasn't there in the beginning of osg cmake history but this scheme has been there since then I think. I haven't got vc2010 myself so can't test. Sorry. 2p /Mattias On Tue, Mar 30, 2010 at 8:00 PM, Anders Backman ande...@cs.umu.se wrote: In the generated file: src\OpenThreads\Win32\cmake_install.cmake I can see that .lib and .dll get the wrong path (cmake install is looking at the wrong place). Header files seems ok: I certainly havent added any '..' in the install path. Its a perfect absolute path. FILE(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/lib TYPE STATIC_LIBRARY OPTIONAL FILES C:/projects/agx_dependencies/build/x86/osg/lib/RelWithDebInfo/../OpenThreads.lib) ENDIF(${CMAKE_INSTALL_CONFIG_NAME} MATCHES ^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$) ENDIF(NOT CMAKE_INSTALL_COMPONENT OR ${CMAKE_INSTALL_COMPONENT} STREQUAL libopenthreads-dev) IF(NOT CMAKE_INSTALL_COMPONENT OR ${CMAKE_INSTALL_COMPONENT} STREQUAL libopenthreads) IF(${CMAKE_INSTALL_CONFIG_NAME} MATCHES ^([Dd][Ee][Bb][Uu][Gg])$) FILE(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/bin TYPE SHARED_LIBRARY FILES C:/projects/agx_dependencies/build/x86/osg/bin/Debug/../../bin/ot11-OpenThreadsd.dll) ENDIF(${CMAKE_INSTALL_CONFIG_NAME} MATCHES ^([Dd][Ee][Bb][Uu][Gg])$) For some reason, .. is added before the .lib and ../../bin is added before the .dll:s In applications/osgviewer/cmake_install.cmake: FILE(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/bin TYPE EXECUTABLE FILES C:/projects/agx_dependencies/build/x86/osg/bin/Release/../osgviewer.exe) '..' added there too. Arguments to cmake: cmake -DCMAKE_INSTALL_PREFIX=C:\projects\agx_dependencies\ -G Visual Studio 10 Has anyone successfully built osg with vs2010? /A 2010/3/30 andersb ande...@cs.umu.se Never write two things in one email :-) In my first post, there was output of the error I get. I have looked around on the web but haven't found anything helpful. It complains that the openthreads dll file is missing, then some cmake/vs jibberish: Problem is really that the path of the dll-files are all wrong... The Cmake install scripts are trying to locate them at: c:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll Instead of c:/projects/agx_dependencies/build/x86/osg/bin/Release/ot11-OpenThreads.dll Have to look into that some more, although Im running the same cmake-command as with vs2008... But with latest CMake (to get vs2010 support)... Unfortunately I need to build it myself to get x64 libs which I need. All libraries have built just fine until osg regarding install. Even collada and boost! Probably some trivial error. Thanks /A -- Build started: Project: INSTALL, Configuration: Release Win32 -- 3 CMake Error at src/OpenThreads/win32/cmake_install.cmake:50 (FILE): 3file INSTALL cannot find 3 C:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll. 3 Call Stack (most recent call first): 3src/OpenThreads/cmake_install.cmake:36 (INCLUDE) 3src/cmake_install.cmake:32 (INCLUDE) 3cmake_install.cmake:36 (INCLUDE) 3 3 3 -- Install configuration: Release 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openscenegraph.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openthreads.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/OpenThreads.lib 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command C:\Program Files (x86)\CMake 2.8\bin\cmake.exe -DBUILD_TYPE=Release -P cmake_install.cmake 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd exited with code 1. == Build: 2 succeeded, 1 failed, 77 up-to-date, 0 skipped == On Tue, Mar 30, 2010 at 7:00 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Anders, What about the install of OpenThreads, anyone seen it before? Nope, I always run the INSTALL target after building (on VS2005 and VS2008 though) and have never seen that. In my case the file it's trying to find exists... Were there any errors when building OpenThreads (maybe buried in the output so you didn't see
Re: [osg-users] VS2010
Mm, ok, not the first time MS ignore the standard What about the install of OpenThreads, anyone seen it before? /A On Sun, Mar 28, 2010 at 12:45 AM, Martin Beckett m...@mgbeckett.com wrote: It's not osg specific VS2008 (erronously) didn't have iterator as a separate header vs2010 obeys the standard - you may as well include it wherever you have std::Vector. http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26230#26230 ___ 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] VS2010
Never write two things in one email :-) In my first post, there was output of the error I get. I have looked around on the web but haven't found anything helpful. It complains that the openthreads dll file is missing, then some cmake/vs jibberish: Problem is really that the path of the dll-files are all wrong... The Cmake install scripts are trying to locate them at: c:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll Instead of c:/projects/agx_dependencies/build/x86/osg/bin/Release/ot11-OpenThreads.dll Have to look into that some more, although Im running the same cmake-command as with vs2008... But with latest CMake (to get vs2010 support)... Unfortunately I need to build it myself to get x64 libs which I need. All libraries have built just fine until osg regarding install. Even collada and boost! Probably some trivial error. Thanks /A -- Build started: Project: INSTALL, Configuration: Release Win32 -- 3 CMake Error at src/OpenThreads/win32/cmake_install.cmake:50 (FILE): 3file INSTALL cannot find 3 C:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll. 3 Call Stack (most recent call first): 3src/OpenThreads/cmake_install.cmake:36 (INCLUDE) 3src/cmake_install.cmake:32 (INCLUDE) 3cmake_install.cmake:36 (INCLUDE) 3 3 3 -- Install configuration: Release 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openscenegraph.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openthreads.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/OpenThreads.lib 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command C:\Program Files (x86)\CMake 2.8\bin\cmake.exe -DBUILD_TYPE=Release -P cmake_install.cmake 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd exited with code 1. == Build: 2 succeeded, 1 failed, 77 up-to-date, 0 skipped == On Tue, Mar 30, 2010 at 7:00 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Anders, What about the install of OpenThreads, anyone seen it before? Nope, I always run the INSTALL target after building (on VS2005 and VS2008 though) and have never seen that. In my case the file it's trying to find exists... Were there any errors when building OpenThreads (maybe buried in the output so you didn't see it)? The only reason why it shouldn't be there is if it wasn't built, and sometimes the INSTALL target runs even if dependent projects failed to build (which doesn't make sense to me, but that's how CMake does it)... J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VS2010
In the generated file: src\OpenThreads\Win32\cmake_install.cmake I can see that .lib and .dll get the wrong path (cmake install is looking at the wrong place). Header files seems ok: I certainly havent added any '..' in the install path. Its a perfect absolute path. FILE(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/lib TYPE STATIC_LIBRARY OPTIONAL FILES C:/projects/agx_dependencies/build/x86/osg/lib/RelWithDebInfo/../OpenThreads.lib) ENDIF(${CMAKE_INSTALL_CONFIG_NAME} MATCHES ^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$) ENDIF(NOT CMAKE_INSTALL_COMPONENT OR ${CMAKE_INSTALL_COMPONENT} STREQUAL libopenthreads-dev) IF(NOT CMAKE_INSTALL_COMPONENT OR ${CMAKE_INSTALL_COMPONENT} STREQUAL libopenthreads) IF(${CMAKE_INSTALL_CONFIG_NAME} MATCHES ^([Dd][Ee][Bb][Uu][Gg])$) FILE(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/bin TYPE SHARED_LIBRARY FILES C:/projects/agx_dependencies/build/x86/osg/bin/Debug/../../bin/ot11-OpenThreadsd.dll) ENDIF(${CMAKE_INSTALL_CONFIG_NAME} MATCHES ^([Dd][Ee][Bb][Uu][Gg])$) For some reason, .. is added before the .lib and ../../bin is added before the .dll:s In applications/osgviewer/cmake_install.cmake: FILE(INSTALL DESTINATION ${CMAKE_INSTALL_PREFIX}/bin TYPE EXECUTABLE FILES C:/projects/agx_dependencies/build/x86/osg/bin/Release/../osgviewer.exe) '..' added there too. Arguments to cmake: cmake -DCMAKE_INSTALL_PREFIX=C:\projects\agx_dependencies\ -G Visual Studio 10 Has anyone successfully built osg with vs2010? /A 2010/3/30 andersb ande...@cs.umu.se Never write two things in one email :-) In my first post, there was output of the error I get. I have looked around on the web but haven't found anything helpful. It complains that the openthreads dll file is missing, then some cmake/vs jibberish: Problem is really that the path of the dll-files are all wrong... The Cmake install scripts are trying to locate them at: c:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll Instead of c:/projects/agx_dependencies/build/x86/osg/bin/Release/ot11-OpenThreads.dll Have to look into that some more, although Im running the same cmake-command as with vs2008... But with latest CMake (to get vs2010 support)... Unfortunately I need to build it myself to get x64 libs which I need. All libraries have built just fine until osg regarding install. Even collada and boost! Probably some trivial error. Thanks /A -- Build started: Project: INSTALL, Configuration: Release Win32 -- 3 CMake Error at src/OpenThreads/win32/cmake_install.cmake:50 (FILE): 3file INSTALL cannot find 3 C:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll. 3 Call Stack (most recent call first): 3src/OpenThreads/cmake_install.cmake:36 (INCLUDE) 3src/cmake_install.cmake:32 (INCLUDE) 3cmake_install.cmake:36 (INCLUDE) 3 3 3 -- Install configuration: Release 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openscenegraph.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openthreads.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/OpenThreads.lib 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command C:\Program Files (x86)\CMake 2.8\bin\cmake.exe -DBUILD_TYPE=Release -P cmake_install.cmake 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd exited with code 1. == Build: 2 succeeded, 1 failed, 77 up-to-date, 0 skipped == On Tue, Mar 30, 2010 at 7:00 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Anders, What about the install of OpenThreads, anyone seen it before? Nope, I always run the INSTALL target after building (on VS2005 and VS2008 though) and have never seen that. In my case the file it's trying to find exists... Were there any errors when building OpenThreads (maybe buried in the output so you didn't see it)? The only reason why it shouldn't be there is if it wasn't built, and sometimes the INSTALL target runs even if dependent projects failed to build (which doesn't make sense to me, but that's how CMake does it)... J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VS2010
Anyone tried to build osg 2.8.2 with visual studio 2010? Seems that there quite some files missing: #include iterator Lots of errors related to: back_insert() not part of std:: These are the files where I had to add #include iterator include/osg/NodeTrackerCallback include/osgGA/NodeTrackerManipulator src/osg/GraphicsContext.cpp src/osgDB/DatabasePager.cpp src/osgPlugins/ive/Text.cpp src/osgPlugins/ive/Text3D.cpp src/osgPlugins/osgText/IO_TextBase.cpp src/osgShadow/ConvexPolyhedron.cpp src/osgText/String.cpp src/osgUtil/DelaunayTriangulator.cpp src/osgUtil/Optimizer.cpp src/osgUtil/SceneView.cpp src/osgUtil/Simplifier.cpp src/osgUtil/TriStripVisitor.cpp src/osgViewer/View.cpp Also, something I havent been able to solve, I get an error when I install OpenThreads, anyone experienced something like this? Im using VS2010 RC. 3-- Build started: Project: INSTALL, Configuration: Release Win32 -- 3 CMake Error at src/OpenThreads/win32/cmake_install.cmake:50 (FILE): 3file INSTALL cannot find 3 C:/projects/agx_dependencies/build/x86/osg/bin/Release/../../bin/ot11-OpenThreads.dll. 3 Call Stack (most recent call first): 3src/OpenThreads/cmake_install.cmake:36 (INCLUDE) 3src/cmake_install.cmake:32 (INCLUDE) 3cmake_install.cmake:36 (INCLUDE) 3 3 3 -- Install configuration: Release 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openscenegraph.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/pkgconfig/openthreads.pc 3 -- Up-to-date: C:/projects/agx_dependencies/lib/OpenThreads.lib 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command C:\Program Files (x86)\CMake 2.8\bin\cmake.exe -DBUILD_TYPE=Release -P cmake_install.cmake 3C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd exited with code 1. == Build: 2 succeeded, 1 failed, 77 up-to-date, 0 skipped == /Anders -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Build Osg with 64Bit (dependency)
Late late late. But here is my prebuilt 64/32bit dependency package. Including the source/cmakelists.txt files for building it. Boost included, however only system and filesystem is built. Same version as required by Collada 2.1. http://www.vrlab.umu.se/public/ http://www.vrlab.umu.se/public/Cheers, Anders On Thu, Feb 25, 2010 at 7:48 PM, D.J. Caldwell dlcaldwel...@gmail.comwrote: Sorry; what I meant was, boost is experimenting using cmake to build boost, as an alternative to their boost build system. Hope this helps... D.J. On Thu, Feb 25, 2010 at 1:46 PM, D.J. Caldwell dlcaldwel...@gmail.com wrote: Maybe slightly off topic, but somewhat related: boost is currently experimenting/working on a cmake build alternative for their system. Perhaps this could help (confirm) your setup(s)? Keep us all posted on the 64bit front... Thanks... D.J. On Thu, Feb 25, 2010 at 4:19 AM, Morné Pistorius mpistorius@googlemail.com wrote: Excellent news! Thank you, that will be really helpful! Regards, Morne On Wed, Feb 24, 2010 at 7:49 PM, Anders Backman ande...@cs.umu.se wrote: I managed to build what I need in 64bit. My take on it was to cmakeify them all. Collada, boost (only libsystem, libfilesystem), (jpeg, png and zlib was alredy cmakified.) There are a few which Im not interested in, including jasper, tiff and a few more. I can certainly pack this into a zip including the bin/lib/include content. I'll see if I get it done tomorrow. Took a while though to get everything to build, which everyone (including the Collada team would open their eyes and spot CMake. /A On Wed, Feb 24, 2010 at 6:41 PM, Luigi Calori l.cal...@cineca.it wrote: Hi, I ' m building a somehow cmaked, static version of the (currently basic) osg dependencies. I' m trying also to make it extensible by keeping patch and compiler options in separate folders. I attach a zip of my current repo: try to build the Assemblies/test2 folder with latest 2.8 cmake. It should work also for win64 i tested with msvc9 32 Hope it helps Luigi Morné Pistorius wrote: Hi Anders, How did you get on with this? Were you able to build the third party dependencies for Win64? A third party package, even with just the basic dependencies to build most of OSG, would really be helpful. I was about to start building my own when I found this thread, and hoped you had beat me to it! :) Cheers, Morne On Wed, Feb 10, 2010 at 8:45 AM, Anders Backman ande...@cs.umu.se wrote: Hi all. Looong time no see. Im currently trying to build OSG on 64bit under windows (VS2009). Getting all the dependencies over to 64bit is apain. I did a quick search through forum/mail, and it seems that not many does this. Is there ANYONE with a prebuilt package including Collada (with boost, pcre, libxml), jpeg, png, zlib for 64bit windows? The Cmake:d versions of jpeg, zlib, png was certainly a big help. But before I dig into this, perhaps someone has a prebuilt package? -- /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 ___ 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 -- __ Anders Backman, CTO Algoryx Simulation AB Uminova Science Park, Box 7973, SE-907 19 Umeå, Sweden and...@algoryx.se http://www.algoryx.se Cell: +46-70-392 64 67 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Build Osg with 64Bit (dependency)
Yes I have not patched any code. However, I have either created OR patched CMakeLists.txt files. png for example was built without some functionality we needed... Collada came with 1_35_0, so I stuck to that version. Do not know if that should matter, most probably not. Boost is the tagget 1_35_0 version yes. /Anders On Mon, Mar 22, 2010 at 2:44 PM, Luigi Calori l.cal...@cineca.it wrote: Hi Anders much better late than never Thanks I' ll look at your solution and try to use your CMakeLists I see you provide the sources as an integrated stuff... does it mean you did not had to patch the original source? If not, I' ll try to extract patches from your sources against original sources to uniform them in my ExternalPackage based cmake packages available at http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib/wt/ I see you have used selected boost 1_35_0 while there is a 1.41 ... Is this a requirement of collada? In that case, is it the unpatched version available at http://sourceforge.net/projects/boost/files/boost/1.35.0/ ? Thanks again Luigi Anders Backman wrote: Late late late. But here is my prebuilt 64/32bit dependency package. Including the source/cmakelists.txt files for building it. Boost included, however only system and filesystem is built. Same version as required by Collada 2.1. http://www.vrlab.umu.se/public/ Cheers, Anders On Thu, Feb 25, 2010 at 7:48 PM, D.J. Caldwell dlcaldwel...@gmail.commailto: dlcaldwel...@gmail.com wrote: Sorry; what I meant was, boost is experimenting using cmake to build boost, as an alternative to their boost build system. Hope this helps... D.J. On Thu, Feb 25, 2010 at 1:46 PM, D.J. Caldwell dlcaldwel...@gmail.com mailto:dlcaldwel...@gmail.com wrote: Maybe slightly off topic, but somewhat related: boost is currently experimenting/working on a cmake build alternative for their system. Perhaps this could help (confirm) your setup(s)? Keep us all posted on the 64bit front... Thanks... D.J. On Thu, Feb 25, 2010 at 4:19 AM, Morné Pistorius mpistorius@googlemail.com mailto:mpistorius@googlemail.com wrote: Excellent news! Thank you, that will be really helpful! Regards, Morne On Wed, Feb 24, 2010 at 7:49 PM, Anders Backman ande...@cs.umu.se mailto:ande...@cs.umu.se wrote: I managed to build what I need in 64bit. My take on it was to cmakeify them all. Collada, boost (only libsystem, libfilesystem), (jpeg, png and zlib was alredy cmakified.) There are a few which Im not interested in, including jasper, tiff and a few more. I can certainly pack this into a zip including the bin/lib/include content. I'll see if I get it done tomorrow. Took a while though to get everything to build, which everyone (including the Collada team would open their eyes and spot CMake. /A On Wed, Feb 24, 2010 at 6:41 PM, Luigi Calori l.cal...@cineca.it mailto:l.cal...@cineca.it wrote: Hi, I ' m building a somehow cmaked, static version of the (currently basic) osg dependencies. I' m trying also to make it extensible by keeping patch and compiler options in separate folders. I attach a zip of my current repo: try to build the Assemblies/test2 folder with latest 2.8 cmake. It should work also for win64 i tested with msvc9 32 Hope it helps Luigi Morné Pistorius wrote: Hi Anders, How did you get on with this? Were you able to build the third party dependencies for Win64? A third party package, even with just the basic dependencies to build most of OSG, would really be helpful. I was about to start building my own when I found this thread, and hoped you had beat me to it! :) Cheers, Morne On Wed, Feb 10, 2010 at 8:45 AM, Anders Backman ande...@cs.umu.se mailto:ande...@cs.umu.se wrote: Hi all. Looong time no see. Im currently trying to build OSG on 64bit under windows (VS2009). Getting all the dependencies over to 64bit is apain. I did a quick search through forum/mail, and it seems that not many does this. Is there ANYONE with a prebuilt package including Collada (with boost, pcre, libxml), jpeg, png, zlib for 64bit windows? The Cmake:d versions of jpeg, zlib, png was certainly a big help. But before I dig into this, perhaps someone has a prebuilt package? -- /Anders ___ 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
Re: [osg-users] Build Osg with 64Bit (dependency)
I managed to build what I need in 64bit. My take on it was to cmakeify them all. Collada, boost (only libsystem, libfilesystem), (jpeg, png and zlib was alredy cmakified.) There are a few which Im not interested in, including jasper, tiff and a few more. I can certainly pack this into a zip including the bin/lib/include content. I'll see if I get it done tomorrow. Took a while though to get everything to build, which everyone (including the Collada team would open their eyes and spot CMake. /A On Wed, Feb 24, 2010 at 6:41 PM, Luigi Calori l.cal...@cineca.it wrote: Hi, I ' m building a somehow cmaked, static version of the (currently basic) osg dependencies. I' m trying also to make it extensible by keeping patch and compiler options in separate folders. I attach a zip of my current repo: try to build the Assemblies/test2 folder with latest 2.8 cmake. It should work also for win64 i tested with msvc9 32 Hope it helps Luigi Morné Pistorius wrote: Hi Anders, How did you get on with this? Were you able to build the third party dependencies for Win64? A third party package, even with just the basic dependencies to build most of OSG, would really be helpful. I was about to start building my own when I found this thread, and hoped you had beat me to it! :) Cheers, Morne On Wed, Feb 10, 2010 at 8:45 AM, Anders Backman ande...@cs.umu.se wrote: Hi all. Looong time no see. Im currently trying to build OSG on 64bit under windows (VS2009). Getting all the dependencies over to 64bit is apain. I did a quick search through forum/mail, and it seems that not many does this. Is there ANYONE with a prebuilt package including Collada (with boost, pcre, libxml), jpeg, png, zlib for 64bit windows? The Cmake:d versions of jpeg, zlib, png was certainly a big help. But before I dig into this, perhaps someone has a prebuilt package? -- /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 ___ 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] Build Osg with 64Bit (dependency)
it has been Collada that has caused most of my grief. Iconv seems to be one of the most introvert gcc projects on this planet. I was happy for a while when I found this: http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ But it turned out, that it does not link with VisualStudio. Collada requires, part of boost, libxml2 and iconv. I found this link: https://collada.org/public_forum/viewtopic.php?f=12t=1221 https://collada.org/public_forum/viewtopic.php?f=12t=1221Where iconv, libxml2, pcre and zlib is built with 64bit. So, that should now make the list just about complete. Building the part I need from boost in 64 bit should not cause problems I hope. jpeg, zlib, png can easily be built from code. I hope this goes for FreeType too, not there yet. This really was more of a mess than I anticipated. I heard that according to steam (which current connects to quite a few window pc:s around the world) that the number of 64bit installations (due to windows7) is increasing exponentially, so this means that we will soon leave the 32bit world of applications. Maybe we will be able to build these things without problem, just when all other platforms has moved over to 128 but ;-) /Anders On Wed, Feb 10, 2010 at 9:27 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Anders, I am also strugling to build OSG in 64 bits under Windows (MSVC9 SP1). For the moment, I have these 3rdParty libs built in 64 bits : - jpeg - png - tiff - jasper - zlib - ffmpeg The first 5 libs can be easily staticly built within the OpenCV project using CMake (http://sourceforge.net/projects/opencvlibrary/), the latter (ffmpeg) can be found here http://ffmpeg.arrozcru.org/autobuilds/ http://ffmpeg.arrozcru.org/autobuilds/ If you don't have these libs yet, let me know, I'll send them to you. If you succeeded in building some others, please let me know. Regards, Mourad On Wed, Feb 10, 2010 at 10:30 AM, Anders Backman ande...@cs.umu.sewrote: I will, in case I succeed :-) /A On Wed, Feb 10, 2010 at 10:27 AM, Torben Dannhauer z...@saguaro-fight-club.de wrote: Hi, I haven't seen this, but it would be great if you post your prebuild package on OSG website. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23896#23896 ___ 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] Build Osg with 64Bit (dependency)
Hi all. Looong time no see. Im currently trying to build OSG on 64bit under windows (VS2009). Getting all the dependencies over to 64bit is apain. I did a quick search through forum/mail, and it seems that not many does this. Is there ANYONE with a prebuilt package including Collada (with boost, pcre, libxml), jpeg, png, zlib for 64bit windows? The Cmake:d versions of jpeg, zlib, png was certainly a big help. But before I dig into this, perhaps someone has a prebuilt package? -- /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Build Osg with 64Bit (dependency)
I will, in case I succeed :-) /A On Wed, Feb 10, 2010 at 10:27 AM, Torben Dannhauer z...@saguaro-fight-club.de wrote: Hi, I haven't seen this, but it would be great if you post your prebuild package on OSG website. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23896#23896 ___ 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] Picky warning about assignment operator
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] osgPPU: ssartest subtle difference
Hi, downloaded latest (svn) osg and osgPPU and ran the ssaotest.I'm not sure my laptop cope with this, but the result is far from what I expected: Left is osgviewer temple.ive and right is osgppu_ssao http://img3.imageshack.us/img3/2299/ssartest.jpg http://img3.imageshack.us/img3/2299/ssartest.jpgOnly difference is the background color :-) and a slight shadow frame around the model. What am I missing here? I have a Nvidia 9300 which usually work just find with most of the GL shaders so far, so Im not expecting anything there. /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Adding resource directory
Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding resource directory
Sorry, found it now, getDataFilePathList()! Thanks (again). /A On Tue, Apr 28, 2009 at 2:05 PM, Anders Backman ande...@cs.umu.se wrote: Yes I saw that one, but what concerned me was the fact that I could only SET, not ADD.So if OSG_FILE_PATH is setting it to something, all I can do is overwrite it? /A On Tue, Apr 28, 2009 at 2:02 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, Welcome back to the fold :-) The OSG_FILE_PATH env var is just an initial setting for DataFilePathList in osgDB::Registry. You can set this programatically using osgDB::setDataFilePathList(...); This function can be found in include/osgDB/FileUtils. Robert. On Tue, Apr 28, 2009 at 12:51 PM, Anders Backman ande...@cs.umu.se wrote: Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /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 -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding resource directory
Yes I saw that one, but what concerned me was the fact that I could only SET, not ADD.So if OSG_FILE_PATH is setting it to something, all I can do is overwrite it? /A On Tue, Apr 28, 2009 at 2:02 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, Welcome back to the fold :-) The OSG_FILE_PATH env var is just an initial setting for DataFilePathList in osgDB::Registry. You can set this programatically using osgDB::setDataFilePathList(...); This function can be found in include/osgDB/FileUtils. Robert. On Tue, Apr 28, 2009 at 12:51 PM, Anders Backman ande...@cs.umu.se wrote: Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /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 -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Image - terrain, Simple question
Simple question from someone that hasn't follow the development in detail for a long while What is the simplest way of generating a terrain mesh from a 2D image with heights? Im not looking for paging textures, terrain etc, just image- mesh. There use to be the osgDem app that did this, but now you have to install and build VirtualPlanetBuilder, right? Is there anyway to do this with osg-only right now? /Anders -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Hang on cooperativeWait in atexit
Long time no see :-) Using Osg 2.2.0. WinXP, VisualStudio 2008. I have a slight problem that I cant seem to get around. We have a thread with a few OpenThread::Block, and in the destructor of the thread we call block.release(). The thing is that the thread is still running when scope of main goes out. So we have a atexit() function that does the deallocation, and tries to delete the threads. The problem is that one of the Blocks (we have two in the thread) causes a hang in the call to: Condition::cooperativeWait(). This was mentioned as a problem here: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-March/009081.html With no result as far as I can see... Its a problem only under win32. I have seen it before, but at that time we found a way around it (by shutting down the threads in main), this time we don't. Callstack: ot9-OpenThreadsd.dll!OpenThreads::Win32ConditionPrivateData::broadcast() Line 71C++ ot9-OpenThreadsd.dll!OpenThreads::Condition::broadcast() Line 100 C++ agxd.dll!OpenThreads::Block::release() Line 69 + 0x13 bytesC++ agxd.dll!agx::Block::release() Line 540C++ agxd.dll!agx::WorkThread::~WorkThread() Line 33C++ agxd.dll!agx::WorkThread::`vector deleting destructor'() + 0x54 bytes C++ agxd.dll!agx::ThreadPool::shutdown() Line 106 + 0x2c bytes C++ So anyone seen this (and solved it) or any ideas of what might be behind this issue? -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Hang on cooperativeWait in atexit
Ok, it looks like the thread sort of dies when we leave the scope of main. When I get to the atexit() callback, The only thread left is Main Thread (running main()). All other threads are not running any more (according to VisualStudio and Task Manager). However, querying the threads for isRunning() returns true. This code works just fine inside the scope of main. Its only if I keep threads alive during leaving main() I get the problems. It seems that I HAVE to kill all threads before end of main. Anyone had this problem before? On Thu, May 15, 2008 at 12:08 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Anders, When managing threads one has to be very careful about destruction order. The key is to make sure the the threads are stopped before any objects they are operating on are deleted. Since you are off in your own code that isn't much specifically that I and others can do to help. Robert. On Thu, May 15, 2008 at 10:11 AM, Anders Backman [EMAIL PROTECTED] wrote: Long time no see :-) Using Osg 2.2.0. WinXP, VisualStudio 2008. I have a slight problem that I cant seem to get around. We have a thread with a few OpenThread::Block, and in the destructor of the thread we call block.release(). The thing is that the thread is still running when scope of main goes out. So we have a atexit() function that does the deallocation, and tries to delete the threads. The problem is that one of the Blocks (we have two in the thread) causes a hang in the call to: Condition::cooperativeWait(). This was mentioned as a problem here: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-March/009081.html With no result as far as I can see... Its a problem only under win32. I have seen it before, but at that time we found a way around it (by shutting down the threads in main), this time we don't. Callstack: ot9-OpenThreadsd.dll!OpenThreads::Win32ConditionPrivateData::broadcast() Line 71C++ ot9-OpenThreadsd.dll!OpenThreads::Condition::broadcast() Line 100 C++ agxd.dll!OpenThreads::Block::release() Line 69 + 0x13 bytesC++ agxd.dll!agx::Block::release() Line 540C++ agxd.dll!agx::WorkThread::~WorkThread() Line 33C++ agxd.dll!agx::WorkThread::`vector deleting destructor'() + 0x54 bytes C++ agxd.dll!agx::ThreadPool::shutdown() Line 106 + 0x2c bytes C++ So anyone seen this (and solved it) or any ideas of what might be behind this issue? -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ 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 -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] faster builds on multiproc systems - Visual Studio 2005 2008
-- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Zero Ballistics - open beta
I got the message, Unable to compiler shader default, when I ran the game on my computer equipped with 8600GT, VISTA 64Bit. But from the screens it looks quite good. /Anders On Thu, Apr 3, 2008 at 10:45 PM, Jason Beverage [EMAIL PROTECTED] wrote: Hi guys, I just downloaded the beta. VERY impressive! Christian, I assume that was you that just said Hi to me:) I was just hosting a game so I could run around and see how you guys were using OSG so I was surprised to see someone join in:) Keep up the good work! Jason On Thu, Apr 3, 2008 at 4:01 PM, Christian Muschick [EMAIL PROTECTED] wrote: Hi! Any ETA on the Linux client? :) Should be up during the next 1-2 days. Don't expect it to work on ATI cards, though, last time we tried it crashed horribly when compiling the GLSL shaders... regards christian ___ 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 -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 2.2 link not working
Works like a charm. Fast respons as always, thanks Robert! /Anders On Thu, Apr 3, 2008 at 4:35 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Anders, On Thu, Apr 3, 2008 at 3:11 PM, Robert Osfield [EMAIL PROTECTED] wrote: I am still a bit of learner when it comes to svn and learnt a bit more with the fallout from what I thought was a minor change. I will need to have to a look to see if I can patch the 2.2 SVN tag so that it uses an OpenThreads tag rather than trunk. I have just done a check out OpenSceneGaph-2.2 and changes the svn::externals to point to the OpenThreads-2.2.0 tag, could you check it out to see if it now works OK? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] 2.2 link not working
Hi, I was trying to checkout osg 2.2 through the svn adress: http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.2.0 as stated on the download page. But under WINDOWS (using tortoise svn) I get the following error: Error: URL 'http://www.openscenegraph.org/svn/osg/OpenThreads/trunk/include/OpenThreads' doesn't exist Is there anyone else experiencing the same problem? /Anders -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using Vec3 == Vec3d
Hi all. Im +working in a project where we are rendering objects on Center of Earth (ECC) so we have a z-coordinate of 6.7E6Meters. So obviously we need to transform objects close to origo to be able to render them. I noticed that I got quite a few anomalies in the rendering, flickering/jumping objects. This probably comes from that I do some custom OpenGL rendering in a Drawable, where I update the bounding box of the drawable. In this update of the bounding box, I have the large translation built in, so the BoundingBox will contain the 6.7E6 coordinates and this obvious affects the resolution of the float used everywhere in BoundingBox calculations... So I wanted to use double for this, but this caused quite a lot of problems during build because its more or less hardcoded that Vec3f is default: To avoid this, I would have to apply this translation above the Drawable, instead of sending the matrix to my custom drawable (where I do glMultMatrix()). Now as this transformation is a result of a Physical simulation (in the ECC coordinate space) its not that trivial to get to the result I want, it would more or less require me to get the transformation for each simulated object and multiply with the inverse before sending it to the rendering. This is of course possible, but I was wondering if it would be possible to switch to Vec3d implementation of Vec3 using for example a flag in CMake? I guess all the Vec3Array etc, is still depending on Vec3f for OpenGL compatibility so in theory it would be possible. But in BoundingBox for example float is used explicitly for getMin()/getMax() etc.. Here is the beginning of the list of compilation errors I got when I tried to change Vec3 to Vec3d (in the Vec3 header file): 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/Array(458) : error C2535: 'void osg::ValueVisitor::apply(osg::Vec3 )' : member function already defined or declared 2 C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/Array(444) : see declaration of 'osg::ValueVisitor::apply' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/Array(492) : error C2535: 'void osg::ConstValueVisitor::apply(const osg::Vec3 )' : member function already defined or declared 2 C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/Array(480) : see declaration of 'osg::ConstValueVisitor::apply' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/BoundingBox(82) : error C2440: 'return' : cannot convert from 'osg::Vec3d::value_type' to 'float ' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/BoundingBox(85) : error C2440: 'return' : cannot convert from 'osg::Vec3d::value_type' to 'float ' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/BoundingBox(88) : error C2440: 'return' : cannot convert from 'osg::Vec3d::value_type' to 'float ' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/BoundingBox(91) : error C2440: 'return' : cannot convert from 'osg::Vec3d::value_type' to 'float ' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/BoundingBox(94) : error C2440: 'return' : cannot convert from 'osg::Vec3d::value_type' to 'float ' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/BoundingBox(97) : error C2440: 'return' : cannot convert from 'osg::Vec3d::value_type' to 'float ' 2C:\projects\algoryx\agx_dependencies\OpenSceneGraph\include\osg/Plane(222) : error C2535: 'int osg::Plane::intersect(const std::vector_Ty ) const' : member function already defined or declared ... -- Anders Backman Email:[EMAIL PROTECTED] HPC2N/VRlab Phone:+46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersbhttp://www.cs.umu.se/%7Eandersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using Vec3 == Vec3d
Yes and no. Unfortunately in general physical simulation you don't have the luxury of culling away things that are not visible. So even for an airplane flying over vast areas, the visual part around the airplane can still be handled using float, and objects further away require less precision, but in simulations over the earth, you need to keep the simulations running in the same world most of the time, especially if there are constraints connected between objects miles and miles apart. You need cm precision over tens of kilometers, that require the use of Double and having objects in the same coordinate system... For example off-shore wires anchoring ships and oil-rigs, they can have kilometers of wires, but on the ship/oil rig there are at the same time detailed simulations that require high detail. But, yes you dont want higher precision than required in the rendering due to memory footprint... In this case, it would have been handy to handle double for bounds though. I did a quick fix by using an inverse inside my custom rendering code to move the system to origo... /Anders On Tue, Mar 11, 2008 at 12:48 PM, Robert Osfield [EMAIL PROTECTED] wrote: HI Anders, It isn't possible just to remap the Vec3 typedef from Vec3f to Vec3d, as you have found the their are many places that explicitly rely on floats. Places like BoundingBox and BoundingSphere could potentially be moved across to use Vec3d rather than Vec3f, and the way to do this would be to use a local vec_type typedef. This type of change is best done locally, as has been done with other similar classes such as Plane and LineSegment that now do this. General conversion to using double versions is a bad thing w.r.t rendering, and general performance, not from double maths, but rather memory footprint of double vector data and the inability of OpenGL drivers/hardware to handle double data without converting to floats. The thing to do is to keep all vertex data destined for OpenGL in floats, and just keep high level scene graph objects in doubles where required for precision. In the case of managing whole earth databases, almost all of the work I have done in the past year has been in this area, here I use MatrixTransform's to place geometry in a local coordinate frame into its final ECEF coordinate frame. The OSG's Camera's view matrix is all in doubles, and the cull traversal accumulates all matrices from the camera right down to the geometry leaves in doubles so keep precision for as long as possible. Only when the final matrices are passed to OpenGL does precision get lost, but generally the errors are subpixel by this stage thanks for the tiles local to the viewer having a relatively small modelview matrix translation, and far tiles which do have greater translation and hence high values and more error are further away so the errors are relatively the same - still subpixel so you don't see any jitter. You physics engine integration would be best to use the same approach, keep local origins and transforms to place this in ECEF. Robert. On Tue, Mar 11, 2008 at 11:11 AM, Anders Backman [EMAIL PROTECTED] wrote: Hi all. Im +working in a project where we are rendering objects on Center of Earth (ECC) so we have a z-coordinate of 6.7E6Meters. So obviously we need to transform objects close to origo to be able to render them. I noticed that I got quite a few anomalies in the rendering, flickering/jumping objects. This probably comes from that I do some custom OpenGL rendering in a Drawable, where I update the bounding box of the drawable. In this update of the bounding box, I have the large translation built in, so the BoundingBox will contain the 6.7E6 coordinates and this obvious affects the resolution of the float used everywhere in BoundingBox calculations... So I wanted to use double for this, but this caused quite a lot of problems during build because its more or less hardcoded that Vec3f is default: To avoid this, I would have to apply this translation above the Drawable, instead of sending the matrix to my custom drawable (where I do glMultMatrix()). Now as this transformation is a result of a Physical simulation (in the ECC coordinate space) its not that trivial to get to the result I want, it would more or less require me to get the transformation for each simulated object and multiply with the inverse before sending it to the rendering. This is of course possible, but I was wondering if it would be possible to switch to Vec3d implementation of Vec3 using for example a flag in CMake? I guess all the Vec3Array etc, is still depending on Vec3f for OpenGL compatibility so in theory it would be possible. But in BoundingBox for example float is used explicitly for getMin()/getMax() etc.. Here is the beginning of the list of compilation errors I got when I tried to change Vec3 to Vec3d (in the Vec3 header file
Re: [osg-users] Using VBO
Perhaps this would help? Im not sure if they come to any conclusion, its not clear, however in the end of the thread there is code for setting up the use of VBO: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg06796.html /Anders :-) On Thu, Feb 21, 2008 at 3:42 PM, Hristo Hristov [EMAIL PROTECTED] wrote: Hi, i'm having problems with using VBO in osg. I need a simple way to setup indices, vertices, normals and texcoords and than a way to update their values. It cases cable simulation. Hristo. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] a ; too many
When I build osg from svn today I got the warning: .\ParticleSystem.cpp(187) : warning C4390: ';' : empty controlled statement found; is this the intent? Looks like a feature to me. if (currentParticle-getShape() != startParticle-getShape()); { startParticle-endRender(); currentParticle-beginRender(); startParticle = currentParticle; } /Anders -- Anders Backman Email:[EMAIL PROTECTED] HPC2N/VRlab Phone:+46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PRoblem with osgdb_freetype
() : USING C:\projects\algoryx\svn\dependencies\agx_dependencies_071106_Windows_32_VISTA_VS2008\OpenSceneGraph\bin\osgPlugins- 2.3.4\osgdb_freetype.dll DynamicLibrary::failed loading osgPlugins-2.3.4/osgdb_freetype.dll No valid object found for C:\Windows\Fonts\arial.ttf /Anders -- Anders Backman Email:[EMAIL PROTECTED] HPC2N/VRlab Phone:+46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgshadowd.exe = black
Hi all. I just did a svn checkout of osg and build it with VS2008 in windows Vista (and xp). On both of my machines (one vista 64bit but built in 32bit, and one xp 32bit) the shadowed scene in osgshadowd.exe is completely black. osgshadowd --sv works but none of the --ssm or --sm ANyone seen this? -- Anders Backman Email:[EMAIL PROTECTED] HPC2N/VRlab Phone:+46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org