Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread Eran Cohen
Good to hear! As an aside, if you find yourself dealing with clipping issues when zooming in closely to models, take a look at osgEarth::Util::LogarithmicDepthBuffer. Cheers, Eran -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75943#75943

Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread Eran Cohen
Hi David, It would help if you post the code that doesn't work for you so that we can see whats wrong with it. Have you set its location using a GeoPoint? Code: auto model = osgDB::readNodeFile("path-to-model"); auto geoTransform = new osgEarth::GeoTransform; geoTransform->addChild(model);

Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread Eran Cohen
Hi David, If you're adding a model from code, you can simple load it normally using osgDB::readNodeFile and place it under an osgEarth::GeoTransform to transform to the correct location: Code: auto model = osgDB::readNodeFile("path-to-model"); auto geoTransform = new osgEarth::GeoTransform;

Re: [osg-users] [3rdparty] class osgEarth::Map has no member named 'addImageLayer'

2019-01-03 Thread Eran Cohen
first error. I'm not sure why the program hangs when you use the addLayer() method, but you may have better luck asking in the osgEarth forum. Good luck, Eran Cohen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75377#75377 _

Re: [osg-users] Selecting a mesh of 3d model (say 3ds model)

2019-01-03 Thread Eran Cohen
> If I'm not mistaken the layer API changed in 2.9 to be more generic, and you > should simply use: > > Code: > map->addLayer() > > > > As an aside, you will probably get better help for these kind of questions in > the osgEarth forum. > Good luck! > > Er

Re: [osg-users] Selecting a mesh of 3d model (say 3ds model)

2019-01-03 Thread Eran Cohen
use: Code: map->addLayer() As an aside, you will probably get better help for these kind of questions in the osgEarth forum. Good luck! Eran Cohen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75375#75375 ___

Re: [osg-users] Update node color on demand

2018-11-24 Thread Eran Cohen
Hi Diego, You can pass user events to the viewer (and thus to its Event Handlers): Code: // This struct will be passed to the event handler with the relevant parameters (for example, the node you want to affect and the color to change it to) struct ChangeColorEvent : public osg::Referenced {

Re: [osg-users] Update node color on demand

2018-11-24 Thread Eran Cohen
Hi, To respond to user events you can either inherit from osg::Callback and install it on your node as an EventCallback: Code: class ColorCallback : public osg::Callback { public: virtual bool run(osg::Object* object, osg::Object* data) override { auto nv =

Re: [osg-users] OpenSceneGraph 3.0 for beginners book Quality

2018-10-13 Thread Eran Cohen
Johny suggested. Good luck, Eran Cohen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75074#75074 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.c

Re: [osg-users] Model flickering on osgViewer

2018-06-21 Thread Eran Cohen
_MESH > > > > osgviewer cow.osg > > > > > > Laurens. > > > > > > On Thu, Jun 21, 2018 at 12:02 PM Eran Cohen < ()> wrote: > > > > > > > Hi, > > > > > > I compiled OpenSceneGraph 3.6.1 on a recently formatted W

Re: [osg-users] Model flickering on osgViewer

2018-06-21 Thread Eran Cohen
epthclamp, but the display lists might be a > problem here. > can you try: > set OSG_OPTIMIZER=INDEX_MESH > > osgviewer cow.osg > > > Laurens. > > > On Thu, Jun 21, 2018 at 12:02 PM Eran Cohen < ()> wrote: > > > > Hi, > > > > I

[osg-users] Model flickering on osgViewer

2018-06-21 Thread Eran Cohen
Hi, I compiled OpenSceneGraph 3.6.1 on a recently formatted Windows 10 laptop with up-to-date drivers. When I tried to run osgViewer with cow.osg, the model and screen started to 'flicker': [Image: https://preview.ibb.co/dbVWFT/photo.jpg ] (https://ibb.co/jeAnpo) but interestingly, when I

[osg-users] Shader Program stops working after Changing Viewer GraphcsContext or Viewer

2018-05-21 Thread Eran Cohen
Hi, I implemented a 'PausableViewer', to enable dynamically 'hiding' and 'showing' the window. I did it in the following way: On pause, I set done to true, create a new GraphicsContext with the same traits of the previous GraphicsContext, stop the viewer threading and switch them - Code:

Re: [osg-users] [build] "INSTALL.vcxproj" -- FAILED

2018-05-11 Thread Eran Cohen
This problem seems to have been fixed in the new 3.6.0 release Cheers, Eran -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73614#73614 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Conflict between osg-3.0.1 and UI

2018-03-28 Thread Eran Cohen
Hi, We have a program with a UI that is built in WPF and WinForms and runs on Windows 7. We have another library that uses OSG-3.0.1 that we are trying to integrate into our program. This library uses OSG to render a picture to the screen (using osgViewer). Our program can run either from

[osg-users] Opening .ico image files with osgDB::readImageFile

2018-03-06 Thread Eran Cohen
Hi, I was wondering if there is a way to read an .ico file, preferably using osgDB. When I try to use it in the following way: Code: osg::Image* icoImage = osgDB::readImageFile("delete.ico") icoImage is null. Thank you! Cheers, Eran -- Read this topic online here:

Re: [osg-users] [build] "INSTALL.vcxproj" -- FAILED

2017-12-19 Thread Eran Cohen
Hi Robert, I have no Cmake knowledge, so I didn't change the Cmake script, but rather manually changed the project configurations for all of the examples in visual studio. Right click on the project, select properties. Go to Linker -> Debugging and change the Generate Program Database File to

Re: [osg-users] [build] "INSTALL.vcxproj" -- FAILED

2017-12-18 Thread Eran Cohen
For anyone interested, the build failed because of the place that the Cmake install script looked for the .pdb files of the examples. Cmake looked for them in build/examples/example_name, but all the examples built them to build/bin. I manually changed the build location for the .pdb file for

[osg-users] [build] "INSTALL.vcxproj" -- FAILED

2017-12-18 Thread Eran Cohen
Hi, I succeeded in building the OpenScenegraph solution on VS2017 64-bit with the small 3rdParty dependencies, but when I try to build the INSTALL project, it fails with this message: > > 1>C:\Program Files (x86)\Microsoft Visual >