Re: [osg-users] Signal 11 after calling setPostDrawCallback(NULL)

2023-03-06 Thread Alberto Luaces
I would first begin by using inspection tools as valgrind or the
gcc/clang sanitizers, because this looks like a thread synchronization
problem.

"Broi, Franco" writes:

> Hi,
>
> I have an application that takes a snapshot of the scene using 
> setPostDrawCallback(capture), which gets the image and
> writes it to a file but on completion setting setPostDrawCallback(NULL) 
> crashes on the next expose.
>
> #4  0x7f681bf08520 in  () at 
> /lib/x86_64-linux-gnu/libc.so.6
> #5  0x7f681db87260 in osgUtil::RenderStage::draw(osg::RenderInfo&, 
> osgUtil::RenderLeaf*&) () at /usr/local/lib/libosgUtil.so.161
> #6  0x7f681db92f2c in osgUtil::SceneView::draw() () at 
> /usr/local/lib/libosgUtil.so.161
> #7  0x7f681d69b6b6 in osgViewer::Renderer::cull_draw() () at 
> /usr/local/lib/libosgViewer.so.161
> #8  0x7f681edaa479 in osg::GraphicsContext::runOperations() () at 
> /usr/local/lib/libosg.so.161
> #9  0x7f681d6d5bfd in osgViewer::ViewerBase::renderingTraversals() () at 
> /usr/local/lib/libosgViewer.so.161
> #10 0x7f6835a03b37 in OSGGTKDrawingArea::_expose_event(_GtkGLArea*, 
> _GdkGLContext*) (this=0x5575767c6450, area=0x557576c4c2e0, 
> context=0x557576c50580) at osggtkdrawingarea.cpp:83
>
> Even if I do nothing in the capture callback it still crashes.
>
> I've looked through the OSG examples but nothing sets the postdraw or 
> finaldraw callbacks to NULL, both produce the same
> crash.
>
> This code has remained unchanged for 10 years but wasn't being used so the 
> crash only came to light recently.
>
> I'm using OSG I built from source but I also tried it with 
> libopenscenegraph161/jammy on Ubuntu and it still crashes -
> but strangely doesn't render an image but that's a problem for another day.
>
> ldd ./qd3d/nyb/.libs/nyb-2108.1.1 | grep osg
>   libosg.so.161 => /usr/local/lib/libosg.so.161 (0x7faab920)
>   libosgDB.so.161 => /usr/local/lib/libosgDB.so.161 (0x7faab8e0)
>   libosgGA.so.161 => /usr/local/lib/libosgGA.so.161 (0x7faab8a0)
>   libosgText.so.161 => /usr/local/lib/libosgText.so.161 
> (0x7faab860)
>   libosgUtil.so.161 => /usr/local/lib/libosgUtil.so.161 
> (0x7faab800)
>   libosgViewer.so.161 => /usr/local/lib/libosgViewer.so.161 
> (0x7faab7c0)
>
> Any ideas?
>
> Cheers,
>

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to install libraries into lib64 instead of lib?

2021-09-30 Thread Alberto Luaces
It's the parameter LIB_POSTFIX, so you could call

cmake -DLIB_POSTFIX=64

although it is the default, I wonder why it's not the case for you.

Eric Sokolowsky writes:

> I'm building OpenSceneGraph 3.6.5 for Fedora 34. The cmake build
> system installs libraries into lib though I want it to install them
> into lib64 (this is under the base installation
> directory). I'm not familiar enough with cmake to fix this, though I
> have poked around in the cmake files to try to do this. Can anyone
> give me some pointers or help? 64-bit libraries
> should go in lib64 for Linux, generally.
>

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-22 Thread Alberto Luaces
Hi Paul,

I guess you might have to viewer.realize() before the first call to
.frame().  If that is not the case, please inspect inside the .run()
method that does basically the same in just one call.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG installation in windows 10

2021-02-22 Thread Alberto Luaces
Hi, in this day and age I would recommend using a package manager as
vcpkg (https://github.com/microsoft/vcpkg), so you are released from
having also to fetch the external dependencies OSG requires.

For your case, installing OSG and its dependencies is a matter of
issuing

vcpkg.exe install osg:x64-windows

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] What numerical parameters are passed when osgUtil::PolytopeIntersector is set MODEL?

2021-01-25 Thread Alberto Luaces
The corners of your polytope in MODEL coordinates.
-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is there any way to scale the X axis of the model as well as the XY axis?

2021-01-11 Thread Alberto Luaces
Hi, you use a osg::MatrixTransform over the node with the scaling you
require.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How do I flip the texture coordinates of an Image object?

2021-01-11 Thread Alberto Luaces
Hi, I think you can transform the coordinates with osg::TexMat.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How do I set NodeTrackerManipulator to rotate with the nodes?

2021-01-05 Thread Alberto Luaces
Did you try NODE_CENTER_AND_ROTATION ?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test OpenScenGraph-3.6 branch in prep for the up commign 3.6.5 maintainance release

2019-12-18 Thread Alberto Luaces
Nathan Mielcarek writes:

> Since the 43b274f commit (Mar 21, 2019) OSG has been installing 64-bit
> libraries in /usr/local/lib instead of /usr/local/lib64 due to the
> condition of LIB_POSTFIX not being defined when using cmake > 2.8.5.

Strange; it has created lib64/ for me, using cmake 3.15.4.
Nevertheless, I am not installing to the default /usr/local, but
elsewhere.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.4 release candidate 5 tagged

2019-07-16 Thread Alberto Luaces
Hi, I have opened a PR (#791) fixing mingw cross-compilation.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Huge perfomance issues

2019-05-31 Thread Alberto Luaces
"Achilleas Margaritis" writes:

> The problem is I need to destroy my house every frame. 
>
> There is no standard number of objects received; any object, with any 
> configuration, can be received at any time.
>
> My only choice is to destroy everything and repaint everything.

You can also modify the primitives and statesets instead of creating/destroying.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Keeping camera fixed

2019-05-31 Thread Alberto Luaces
"Renzo Scaletta" writes:

> What I see is that the camera "follows" in some way the bodies movements 
> without having done anything in the code to trigger that behavior explicitly.

Hi, Renzo, certainly it shouldn't be happening by default.  I am
thinking about some possible causes (they could be more, of course):

a) You are using some sort of NodeTrackerManipulator attached to the
viewer, otherwise its matrix shouldn't change.

b) You are repeatedly calling the home() method, or just pressing SPACE,
so the view is enlarged or shrunk in order to fit the whole scene.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Building with MinGW on Windows 10

2019-05-20 Thread Alberto Luaces
"Stefan Waldegger" writes:

> I did not work with OSG for a while, but today I decided to continue
> on my project and downloaded the lates OSG 3.6.3. The configuration of
> the make files worked very well, but then when I write mingw32-make
> following error occurs at 15%.

git's HEAD is working for me when cross-compiling with mingw (gcc 7.3.0)
Maybe it is worth a try to get OSG's latest version to check if that
problem has been solved since then; from a cursory look, it seems that
the file that you are having problems might be a little different now. 

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Retrieve the triangles indices array from a geometry.

2019-05-13 Thread Alberto Luaces
"Dario Minieri" writes:

> Hello,
>
> I need to retrieve the triangles indices from a geometry. 
>
> I'm able to get all the verticies via getVertexArray() and then build an 
> array that contains the getVertexArray() datas as list of scalars: [v1.x v1.y 
> v1.z v2.x v2.y v2.z ... ]

Hi, Dario.  The geometry holds one or more primitivesets, and each one
holds a pointer to the index list that you are looking for.

You can save your model into an .osg or .osgt file in order to inspect
the layout of the data and to better understand what is happening.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Dragging individual model nodes

2019-04-29 Thread Alberto Luaces
"Maxim Senin" writes:

> I want  to completely detach the door!!!

Nice to know!!!  Then what you want is to use
osg::Transform::setReferenceFrame() on the node holding the position of
the door, switching from RELATIVE_RF to ABSOLUTE_RF so its coordinates
are in the global system and not in the coordinate system of the whole
car.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Dragging individual model nodes

2019-04-24 Thread Alberto Luaces
"Maxim Senin" writes:

> Yes, I found the necessary node, what should I do next?

It depends: do you want to completely detach the door, or just rotate it
around its hinges?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Image capture in memory

2019-04-24 Thread Alberto Luaces
"Catalin Flower" writes:

> 2) It creates windows, I don't want to see windows flashing on the screen 
> while the capture happens

If I recall correctly, this is what the pbuffer option does, setting

renderImplementation = osg::Camera::PIXEL_BUFFER;

You can try the others to see the effect, though.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Image capture in memory

2019-04-16 Thread Alberto Luaces
"Catalin Flower" writes:

> Hi,
>
> What is the canonical way to capture an image of a view to memory with 
> different resolutions?

Hi, I think that examples/osgposter/osgposter.cpp might be what you are
looking for.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim::DOFTransform pivot point

2019-04-11 Thread Alberto Luaces
"Bruce Clay" writes:

> When I walk through the nodes in the
> DOFTransform list I can see that each node has an osg::Transform but
> calling asPositionAttitudeTransform returns NULL as do many of the
> other possible converters.

That is right, because they are not PositionAttitudeTransforms, but
DOFTransform nodes.  Those as*() methods do not convert any node into
any other type; instead they are akin to a dynamic_cast.

You have to replace those specific nodes with new —created by you—
PositionAttitudeTransform nodes.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim::DOFTransform pivot point

2019-04-10 Thread Alberto Luaces
"Bruce Clay" writes:

> I am working on a model viewer that has portions based on the
> osgsidebyside example.  I can load a tank model that has both
> DOFTransforms and Multiswitches then rotate the turret and elevate the
> gun and everything works correctly.
>
> I loaded an aircraft model with 15 DOFTransforms and no switches.  The
> transforms are for the individual control surfaces of the aircraft.
> When I try to rotate the control surfaces they seem to rotate about
> the center of the model body rather than about the "hinged" point.
> When I looked at the the translate values for all of the surfaces they
> are 0.0 so there is no information available to do the translate,
> rotate, translate sequence.  There was a mention of a pivot point in a
> previous message on this forum.  The PositionAttitudeTransform has a
> setPivot method but not the DOFTransform.
>
> Both models are osgb format.
>
> How can the pivot point be set so the control surfaces pivot about their hing?

Hi, Bruce.  A somewhat primitive technique would be to convert the file
to osgt format, and then replace your DOFTransform nodes with
PositionAttitudeTransform nodes with a text editor.  You could even set
the pivot points there as well.  You can take the osgt of the correct
model as a reference.

That should be faster than doing the same thing programmatically.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Clip planes and instanced rendering

2019-04-09 Thread Alberto Luaces
Wojciech Lewandowski writes:

> Hi Alberto,
>
> You may need to add support for clip planes via gl_ClipVertex or 
> gl_ClipDistance to your shaders (which one depends on GLSL version used -see
> https://stackoverflow.com/questions/19125628/how-does-gl-clipvertex-work-relative-to-gl-clipdistance).
>  My experience with these vars was not always positive, though. I remember 
> times when I was unable to use
> them and once had to do my own cliping in vertex shader (=major PITA). But 
> maybe these days newer drivers or OSG version make it easier.

Hi, Wojciech, many thanks!  Following your pointer about gl_ClipDistance
I made this work.  Nevertheless I take your advice on not relying too
much in this feature for compatibility reasons :-)

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Clip planes and instanced rendering

2019-04-09 Thread Alberto Luaces
Hi,

I want to set a clipping plane for my scene, but it is not working for
instanced geometries.  I have not found any resource telling that
clipping planes are ignored by GLSL.

Simple test: if I make the following modifications to osgforest,

diff --git a/examples/osgforest/osgforest.cpp b/examples/osgforest/osgforest.cpp
index 5f569de66..d5eb2c0a6 100644
--- a/examples/osgforest/osgforest.cpp
+++ b/examples/osgforest/osgforest.cpp
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1487,7 +1488,11 @@ int main( int argc, char **argv )
 viewer.addEventHandler(new 
osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()));
 
 // add model to viewer.
-viewer.setSceneData( ttm->createScene(numTreesToCreate, 
maxNumTreesPerCell) );
+   osg::Node *ttmnode = ttm->createScene(numTreesToCreate, 
maxNumTreesPerCell);
+   osg::ClipNode *cn = new osg::ClipNode;
+   cn->addClipPlane(new osg::ClipPlane(0, osg::Vec4d(1, 0, 0, -500)));
+   cn->addChild(ttmnode);
+viewer.setSceneData( cn );
 
 
 return viewer.run();

...the terrain and the trees are split by my additional clipping plane,
except when the trees are instances; in that case they are drawn as
normal.

How can I make clipping planes work for  instanced rendering?

Thanks!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Change color of node read from dxf file

2018-11-21 Thread Alberto Luaces
Chris Hanson writes:

> I dunno man, your code is making my head explode. I don't think Geode HAS an 
> addChild method, so I don't even know why what you're doing would compile.
>
> I don't think I can help any further. I'm missing something or you are.
>

Hi, Chris, Geode was subclassed from Group some time ago, see

https://github.com/openscenegraph/OpenSceneGraph/commit/3dde165f140ab5f973e50709235cf40c4862bc17

I don't remember exactly the rationale, but it was about making the code
more straightforward.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] reflection on mesh texture

2018-11-09 Thread Alberto Luaces
"Vinicius Nonnenmacher" writes:

> Hi,
>
> I am trying to understand what are these 'wavy' effect. It changes
> depending on the camera position. Is it my texture that is beeing
> replicated for every triangle on the terrain mesh ? or the material
> attached to it ?

Hi Vinicius, I think it is a texture repeating pattern.  If you want to
avoid this effect, look for "seamless texture patterns" and programs to
do it (for example, the "texturize" plugin for GIMP).

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Selecting a GPU to be used in a dual-GPU laptop

2018-10-19 Thread Alberto Luaces
Great!  Thanks a lot, Florent!

COUDRET Florent writes:

> Hi Alberto,
>
> for NVidia and AMD graphics cards, we declare 2 public variables at 
> global scope to force using GPU at run-time (even if there is no 
> existing application profile).
>
>
> extern "C" {
>
>      /// Declare this variable in public to enable the NVidia side of 
> Optimus - 
> http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
>      __declspec(dllexport) int NvOptimusEnablement = 1;
>
>      /// Declare this variable in public to enable the AMD side of AMD 
> Switchable Graphics (13.35 driver or newer needed) - 
> http://devgurus.amd.com/thread/169965
>      __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
>
> }
>
> Regards,
>
> Florent

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Selecting a GPU to be used in a dual-GPU laptop

2018-10-19 Thread Alberto Luaces
Trajce Nikolov NICK writes:

> I owned laptop with same configuration and obviously the Radeon driver
> software kit (or how it is called) comes with an app where you select
> the card per app. You select your app in this Radeon app and it will
> run on the selected device

That is what I tried, but it was not obvious to me.  Apparently our
client got it to work, nevertheless, so I will ask them how they did it
for reference.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Selecting a GPU to be used in a dual-GPU laptop

2018-10-19 Thread Alberto Luaces
Chris Hanson writes:

> I believe I was previously told that there are some secret C symbols wherein 
> if you create a variable of a particular name, it acts as a hint to the 
> driver to trigger particular behavior.
>
> I can't at the moment find the names of the symbols or what they do, but I'll 
> look around. Maybe you can find it before I do based on that knowledge.

That solution would be indeed nice to know, but I also had not luck
finding it.

Nevertheless, apparently our client got it to work tinkering with the
driver settings, so I will resume this search at a later date.

Thank you for the insight!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Selecting a GPU to be used in a dual-GPU laptop

2018-10-18 Thread Alberto Luaces
Hi,

some client owns a laptop with a dual GPU system —the typical integrated
Intel card plus an additional Radeon 530 one into a windows10 system.

It seems that the driver selects automatically the Radeon when using
some CAD applications, but only the integrated Intel when running our
OSG program (checked from the Program Manager window).

I heard that in some analogous nVidia systems one can set manually a
given program to run with the powerful GPU in the Control Panel, but at
least, if it were possible in the AMD drivers, it is not immediately
apparent (we didn't find how).

Does anybody have experience in this kind of Radeon systems?

Thank you!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Thoughts on Gitter, or other forums as alternative to our current forum/ML?

2018-09-15 Thread Alberto Luaces
Robert Osfield writes:

> I don't
> have any significant experience with Gitter but have just started
> looking into it - I see that osgjs has a presence.

But it is like a chat room, right?  Without individual topics, just a
single room for conversation...

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgQt + OSG 3.6.2 Status

2018-09-11 Thread Alberto Luaces
Mathieu MARACHE writes:

> Back from holidays...
>
> Community support is thin when considering OpenSceneGraph with Qt. I
> am currenlty the only maintainer of osgQt because I have a software
> using it and I didn't want the project to be tossed out.
>
> The Qt4 way of doing things with legacy osgQt (that was droped from
> OpenSceneGraph) doesn't fit well with the Qt5 way of doing
> things. Since Qt5.7 there are even incompatibilities (black screens,
> etc.).
>
> Qt4 support is getting difficult, even debian is dropping Qt4
> (https://wiki.debian.org/Qt4Removal).
>
> In anticipation I have proposed to drop Qt4 and concentrate only on
> Qt5. Robert only asked to keep the Qt4 version around and make it
> clear which version of osg compiles with which version/branch of
> osgQt.
>

Dropping Qt4 seems sensible, as almost nobody is going to start learning
Qt from version 4 (Qt downloads point directly to version 5 since long
time ago).  Experienced developers can easily find a tag/branch pointing
to whichever older version they want.

>
> There is a feature branch (since Feb '18) of the Qt5 way of doing
> things awaiting testing and validation from the community. This is the
> code I use in my application which was crafted by paid support from
> KDab's Mike Krus (from which I had authorization to open source).
>
> https://github.com/openscenegraph/osgQt/tree/feature/osgQOpenGL
>

Thanks a lot for this!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-11 Thread Alberto Luaces
Robert Osfield writes:

> I would suggest that OpenSceneGraph-3.x series remain compilable
> without needing C++11.  So 3.6.x for instance we'll make bug fixes etc
> but never change the compiler requirements.

Having that fallback (3.x) for the tiny amount of systems that don't
support C++11 is a sensible approach, and I would even dare to say
extra-conservative, given the support of C+11 among current compilers.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] how can i static link to OSG

2018-06-11 Thread Alberto Luaces
"lee xingshun" writes:

> Hi,
>
> while i using staic link libarary to write a demo,i found many error link 2019
> this is my code ,have anybody know? do i need link the lib file or not ?

Hi, so link 2019 means "unresolved external symbol - function".  Can you
please copy the names of the unresolved symbols the linker is missing?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Export the cropped model

2018-06-11 Thread Alberto Luaces
"Bingqian Wang" writes:

> Hi,
>
> I want to export the model to a file,the model was cliped by clipNode,how can 
> i do that?
> Thank you!
>

Hi, I'm afraid that it is not possible to do it in an automatic way,
since the clipped model is computed by the GPU on the fly, not by OSG,
so it is not recoverable, as far as I know.

You could search for a library featuring boolean operations to get the
clipped model.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.1 release candidate 2 tagged

2018-05-11 Thread Alberto Luaces
Sebastian Messerschmidt writes:

> Hi,
>
> I've been testing the current build and just discovered, that there
> are some things that are different.
>
> To point out one specifically:
> I'm using calls to
> osgDB::Registry::addEntryToObjectCache(file_name, result_node)
> ommitting the options parameter which defaults to nullptr.
> This gives me a lot of warnings from this line (~336 in osg/Object)
>
> OSG_WARN<<"Warning: osg::clone(const T*, osg::CopyOp&) passed
> null object to clone, returning NULL."<
> Basically the "addEntryToObjectCache" explicitely clones the options:
> 
>   _objectCache[FileNameOptionsPair(filename, osg::clone(options))] =
> ObjectTimeStampPair(object,timestamp);)
> 
> leading to the above warning.
>
> Any hints? If I'm supposed to pass options, it should not default to a
> nullptr. In case the nullptr is ok, the clone shouldn't be issued
> IMHO.

Hi Sebastian,

maybe your problem is fixed/modified by the commit from this morning

https://github.com/openscenegraph/OpenSceneGraph/commit/fcde92ad89af44a9724a5ebf9fbfdf59b6e41d68

?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged

2018-05-11 Thread Alberto Luaces
Robert Osfield writes:

> Hi Alberto,
>
> Thanks for the minimal crashing program.  The crash wasn't straight
> forward to pinpoint the cause but eventually I traced it back to the
> the ObjectCache taking a ref_ptr when search for entries in
> the ObjectCache.  To avoid this I wrote a ObjectCache::find(..) method
> that doesn't create a temporary ref_ptr<> to the Options being passed
> in.  This fix is checked in the OpenSceneGaprh-3.6 branch and master.
>
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/fcde92ad89af44a9724a5ebf9fbfdf59b6e41d68
>

Thank you very much, Robert!  I confirm it is also working for here.

>
> As a general comment use of C++11's auto is something you should be
> careful about using, easy to hide the face that you just have C
> pointers and associated memory leaks.

Oh, yes, thanks as well for the advice.  Nowadays I even don't trust
myself anymore, so I just rely on what Valgrind is saying to me  :-)

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged

2018-05-10 Thread Alberto Luaces
Hi, I think this issue was commented somewhere else, but I couldn't find
it again: there is something broken with the cloning of osgDB::Options.
This minimal working example works fine with 3.4.x, but SIGSEVs with
3.6.1-rc3 and current master:

#include 

int main(){
auto globalopts = new osgDB::Options;
globalopts->setObjectCacheHint(osgDB::Options::CACHE_NODES);

// any.obj is not needed to get the crash.
auto *node = osgDB::readNodeFile("any.obj", globalopts);
}

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] Cross-platform examples for Linux, macOS, Windows, Android, iOS, and Web

2018-04-17 Thread Alberto Luaces
michael kapelko writes:

> Hi.
>
> All hail the second cross-platform example on how to use PNG images
> (embedded into application) with PNG/ImageIO plugins:
> https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/02.TextureImage

Thanks, nice resource!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6 branch made, please test in prep for stable 3.6.0 release

2018-03-20 Thread Alberto Luaces
Hi, it cross-compiles and runs the viewer (loading some obj and ive
files) just fine with mingw-64 on linux.

By the way, is the CDash system still working?  I was unable to find it,
and maybe it is of use for this task.  The CI available at github seems
to be choking on the fact that OSG takes more than 50 minutes to build
on the systems they are using, so the process is interrupted before
it finishes.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Overriding the mouse pan up/down

2018-02-27 Thread Alberto Luaces
"Adrian Jelffs" writes:

> Hi,
>
> When I pan left and right with my mouse the scene moves left and
> right. However, when I try to pan up and down the scene zooms in and
> out. How can I change this so that the using the mouse to in an
> up/down direction causes a pan in the up/down direction?

Hi Adrian, it all comes down to inherit from your keyboard/mouse
controller (Graphics Adapter, GA in OSG) and overwrite the parts you
want to change.

In your case, your GA is likely inheriting from OrbitManipulator, see

src/osgGA/OrbitManipulator::handleMouseWheel

Please have also a look to the osghangglide example, which has another
custom manipulator use case.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Free camera manipulator

2018-01-09 Thread Alberto Luaces
"Kazim Kamilov" writes:

> Hi, OSG community!
>
> In OSG is not have free camera manipulator. Need to fix it!
> Robert, can you add this in the osgGA?
> Sources in attachment.
>
> Thank you!
>

Dear Kazim,

by just attaching your files in a post in the general channel you risk
that your submission goes unnoticed.  Please submit a "pull request"
from github, which is one of the official ways.

Thanks!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg installation error

2018-01-08 Thread Alberto Luaces
The image shows an error about a "-loptimized" library not found.

This is likely because of some incorrect configuration settings.  Please
show the configuration steps you issued.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Specifying indices of triangle vertices when creating osg::geometry

2017-12-21 Thread Alberto Luaces
"antiro black" writes:

> I also looked at the primitive sets to see if I could specify indices
> there but I couldn't figure it out.

the example you are looking for is osggeometry:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osggeometry/osggeometry.cpp#L685

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] compile osg on Debian Jessie, after build there are inclue files missing

2017-12-18 Thread Alberto Luaces
"Bernd Hahnebach" writes:

> Hi,
>  
> I have been trying to compile OSG on Debian Jessie
>
> here is what I did.
>
> Code:
> git clone https://github.com/openscenegraph/OpenSceneGraph -b 
> OpenSceneGraph-3.4   osg34
> mkdir build
> cd build 
> cmake -DCMAKE_BUILD_TYPE=Debug  ../osg34
>
>
>
>
>  I had no errors but in build/include there are nearly no includes. On
> my system in /usr/include (installed by packagemanager) I have lots of
> osg includes like osgDB, osgFX, osgGA, osgManipulator, osgText,
> osgUtil ...  but in my build/include they are all misssing !
>
> Has anyone an idea what did I miss? 

Nothing :-)

Those files are not generated, but copied straight from the source to
your installation location when performing the install.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Slow optimization and OpenFlight

2017-11-27 Thread Alberto Luaces
Robert Osfield writes:

> I gave up the valgrind tool=callgrind because it was taking too long
> to complete.  What I did gleen from it was that the run confirms that
> removeChildren() is a bottleneck.

For these matters the "perf" utility in the linux-perf package reaches
near-uninstrumented performance:

$ perf record  # Gather results

$ perf report # Inspect results

Depending on the system configuration, running previously a

$ echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid

might be required.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Problem With Osg Texture Colors!

2017-10-10 Thread Alberto Luaces
"Bobak Hossainkhani" writes:

> Hi,
> I Have Some Problems With .Obj Model's That Load With OSGViewer
> I Dont Know Why When Load A Colorfully Obj With Jpeg Texture , Colors On Obj 
> Was Mixed And Dont Show True Colors.If Anybody Have The Solution Please Help 
> Me.
> In Attachment I Send A 3d Model Show In Marvelous Design And OSGViewer and 
> Flower Color was Different.
> ... 

Hi, Bobak.  Could it be that the OBJ export function of your software
(I assume "Maverlous Design") simplifies the model?

Since you cannot attach shaders or normal maps in OBJ (yes, you could in
theory, but the receiving software should know how to use them), maybe
your software is trying to approximate the appearance.  Can you try any
other model format?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [EXTERNAL] Re: Is there a binary distribution available for version 3.4.0?

2017-10-10 Thread Alberto Luaces
Chris Hanson writes:

> I think I've since come up with an idea to work around their weird
> demands, but I wasted a bunch of time and hair on it. All of us who
> build and distribute OSG binaries really should cooperate and work
> together, but I'm not sure how to go about doing that.

Maybe for windows users https://conan.io could be of use.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGaph-3.5.7 developer release tagged

2017-10-10 Thread Alberto Luaces
Cross-compiling with mingw (gcc 6.3.0) — no problems when running
osgversion or osgviewer.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Obj model visualization using osg

2017-10-10 Thread Alberto Luaces
"Jai Singla" writes:

> Hi,
>
> But, now a days many sw are available like unity, worldviz vizard which are 
> built on OSG ? Is not any plug-in developed for OSG directly?
>

Hi Jai,

Certainly, Unity is not built on OSG.  I do not know about Vizard, but
I think you are right about the point that OSG is more low-level than
the products you mentioned.

I do not know any plug-in that fits the tasks that you are mentioning,
but maybe others in the list can say if they recall something similar.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] memory issue about x-windows in Linux

2017-08-03 Thread Alberto Luaces
"Lv Qing" writes:

> Hi,
>I know it is not be an osg problem. Just want to know anyone here may met 
> the same problem.
>We use reahat linux 6.5 to run our osg app .The desktop is kde4.3.4. .
> After 7 to 20 days,we found the X-windows Process (X) suddenly took all 
> of system's memory ,and force linux to kill the process itself ,which result 
> to force the redhat back to it's login windows.
> I have observe both the osg and X problem every single day,it seems every 
> stable ,not any trace of memory leak problem.Then just one short moment,the X 
> process suddenly eats up all system memory .
> My question is what the link with osg and  x-windows?Is it  because our 
> app has some memory  leak problem to make the X process eat up too many 
> memory  ?
>Or just the X process cause the problem only due to itself?

Hi, Lv:

many parts of the system could be to blame, but I think that you can
start with some easy tests:

- Use valgrind's massif tool to or the new heaptrack
  (https://github.com/KDE/heaptrack).  Since yours is a long-running
  process, I would recommend the later, as it is lighter and faster.

- Try to run the program with a different GPU brand to rule out driver
  issues.

Hope that helps,

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Delaunay and alternatives

2017-07-28 Thread Alberto Luaces
Trajce Nikolov NICK writes:

> Hi Community,
>
> I am using the Delaunay triangulator from OSG. For simple cases it works 
> fine, but not enough for real world ones. Any suggestion for constrained 
> Delaunay triangulation library?
>
> Thanks a bunch as always!

Hi, Nick, Triangle (https://www.cs.cmu.edu/~quake/triangle.html) is the
one that usually comes to mind for that task.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL

2017-07-05 Thread Alberto Luaces
"Mottaghi, Arman" writes:

> Hi all,
>
> I have a general question. I’ve googled this before, but I haven’t had
> any luck. I am new to programming world, so I decided to give it a
> shot on this forum/mailing list.
>
> I have a program written in C++ and it uses OSG and OpenGL for its
> visual graphics. I have a simple GUI code in Python that says “Hello
> my friend” on the left side and I’d like to have my OSG program on the
> right side.
>
> Is this possible? The thing I am confused about is whether Python is
> capable of displaying my C++/OSG program or not. Basically, imagine my
> main program has some buttons, texts, menus, and a graphic OSG part
> inside it—let’s say as a small window.  The best outcome would only
> display that OSG window. I am not interested in displaying the entire
> program in my python GUI window. Would that be possible? I don’t care
> if I have to run the program alongside my python program or if I can
> embed my main program or at least part of it in my python. Again, I’ve
> never done programming before, so sorry for my bad description.
>

Hi Arman,

indeed is a very open question: both Python and C++ —actually almost any
general purpose languages— are able to open console (text), graphics or
GUI windows on their own.

The lowest effort path could be letting each part of the program open
their own window and then use the window manager to arrange them in a
tiling fashion, side by side.

Other more complex solution would be to open a 3D context in the Python
GUI, and call the C++ routines from Python in other to update it.  In
the examples section of OSG you can find programs that embed 3D windows
inside GUIs, but as far as I recall, none of them with a mixed language
strategy.  Nevertheless, that is not the difficult part, since there are
many projects that can help you with the task of interfacing Python and
C++: SWIG, Boost.Python, pybind11, Python ctypes...

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Failed to build openscenegraph on Alpine

2017-06-27 Thread Alberto Luaces
Roberto Oliveira writes:

> Alberto,
>
> I was able to build it using Qt4, to do so I added
> -DDESIRED_QT_VERSION=4 flag to cmake command and it worked.

Nice to know, thanks for posting!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Failed to build openscenegraph on Alpine

2017-06-27 Thread Alberto Luaces
Roberto Oliveira writes:

> Alberto,
>
> The build worked fine in Alpine Linux x86_64, but when I tried to buid
> in Alpine Linux ppc64le, I got the following error:
>
> /home/alpine/aports/testing/openscenegraph/src/OpenSceneGraph-3.4.0/include/osgQt/Version:8:2:
> error: #error "Qt version mismatch detected! Make sure to compile
> applications using osgQt with the same major Qt version that osgQt has
> been compiled against."
>
> In both Alpine x86_64 and ppc64le qt 4.8.7 is the available version.
>
> Any clue why it is failing?
>

Hi Roberto,

Looking at that file,

#define OSGQT_QT_VERSION 5

#include 
#if (QT_VERSION < QT_VERSION_CHECK(OSGQT_QT_VERSION,0,0))
#error "Qt version mismatch detected! Make sure to compile applications using 
osgQt with the same major Qt version that osgQt has been compiled against."
#endif

...it seems that despite the message, it is only going to work if Qt≥5.
Your best bet is to try to disable osgQt altogether.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Failed to build openscenegraph on Alpine

2017-06-26 Thread Alberto Luaces
Alberto Luaces writes:

> Roberto Oliveira writes:
>
>> The openscenegraph needs a specific version of ffmpeg to compile or am
>> I missing something?
>
> Yes, that issue seems to be currently fixed in master.

...and maybe this patch is useful for you if you want to stick with 3.4:

https://anonscm.debian.org/cgit/pkg-osg/openscenegraph-3.4.git/tree/debian/patches/ffmpeg_2.9.patch

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Failed to build openscenegraph on Alpine

2017-06-26 Thread Alberto Luaces
Roberto Oliveira writes:

> The openscenegraph needs a specific version of ffmpeg to compile or am
> I missing something?

Yes, that issue seems to be currently fixed in master.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL warning

2017-05-25 Thread Alberto Luaces
"Qiaokun Lefei" writes:

> Hi,
>
> I always come across this warning "Warning: detected OpenGL error
> 'invalid operation' after RenderBin::draw(..)" in my osg project. Mybe
> it's just the problem of the driver. I want to know how to make this
> warning disappear or just shield it.

Hi Qiaokun, as you say it can be your program or the driver's fault.
You can check what it happening through the use of an OpenGL debugger.

You can also mute that warning by setting OSG_NOTIFY_LEVEL not to
display WARN-level messages.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Related to memcpy

2017-04-17 Thread Alberto Luaces
"Rambabu Repaka" writes:

> Hi, Iam getting the below error in the memcpy(dst,src,count) in osg.
>
> Unhandled exception at 0x0f75ee38 (msvcr90d.dll) in Partice.exe: 0xC005: 
> Access violation reading location 0x.
>
> How to eliminate this error ?
> ... 
>

Hi Rambabu, mind you that this is not an OSG issue.  You are likely to
be reading uninitialized memory:

https://stackoverflow.com/questions/17498923/access-violation-writing-location-0x

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to get the orientation of 3d object?

2017-04-12 Thread Alberto Luaces
"Jiechang Guo" writes:

> Hi,
>
> I am dealing with a task of orienting and positioning one object
> relative to another(the same object as the manipulated one,but has
> different position and orientation). And when the task is finished, I
> wanna compute the deviation(both position and orienting). For the
> orientation, I want to get the angle and axis.
>
> I'm so confused with the Local coordinate and World coordinate in OSG. 
>
> I know maybe I should define a vector under the object local
> coordinate and rotate translate the vector as well as the object is
> being manipulated.And do some math with the vector under the world
> coordinate to get the angle and axis.
>
> Can someone give me some advice?
>

Hi Jiechang, if you want to place an object relative to other, just make
it as its child.  The positioning matrix of the second one will be the
information you are looking for.

After that, you can convert that matrix to a quaternion or whatever
representation you prefer.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::Timer

2017-04-12 Thread Alberto Luaces
"Latha Rani Baddala" writes:

> Hi,
>
> Can any  one explain about osg::timer

Hi Latha, it is a clock class that you can use as a stopwatch.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get pixels 3D coordinates and RGB values from a geode ?

2017-04-12 Thread Alberto Luaces
"Yrieix Leprince" writes:

> Hi,
>
> I am working on a osg::Geode (constructed from .osgb files), and I
> would like to have all the 3D coordinates of each pixels (x,y,z), and
> also the Red Green Blue values. At the end I need to have a 3D point
> cloud with RGB values as properties.
>
> I have tried many ways to answer this need, but no one is working... Does 
> anyone have encountered the same issue ?

Hi Yrieix, a good start would be the osgpick example, since it teaches
you how to use the intersection system.  You would have to sample your
object and cast one intersection per pixel.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Having an issue with OSG plugins error.

2017-04-12 Thread Alberto Luaces
"Brigham Keys, Esq."  writes:

> Hello all,
>
> I have OpenSceneGraph set up in my project, however when I try to load
> any files I always get this error
>
> Error reading file build/untitled.osgt: read error (Could not find
> plugin to read objects from file "build/untitled.osgt".)
>
> Which I did not think I needed a plugin set up for the native format,
> it does this on .obj and on .dae parsing as well and the 3D model
> never gets loaded into the scene. I tried doing this with files that
> could not possibly be real and it gives me the exact same error (and
> not an error relating to the file not existing). Has anyone else
> experienced this issue?

Hi Brigham, this error could be caused by your system not finding the
plugin directory, or when it holds a different version of the plugins
(debug/release, any other version...)

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] Cross-platform guide for Linux, macOS, and Windows

2017-04-05 Thread Alberto Luaces
michael kapelko writes:

> Hi, Alberto.
>
> This seems like a valid path, but I'm not yet sure how to insert it into 
> do-it-yourself series. I'll give it a thought.

Aaaah, ok.  I thought it was more of a "I'm a newbie, how do I compile
this whole thing myself" :)

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] Cross-platform guide for Linux, macOS, and Windows

2017-04-04 Thread Alberto Luaces
michael kapelko writes:

> 1.2. Install OpenSceneGraph under Linux and display the cube with osgviewer

Hi Michael, good work.

Maybe it is a philosophical issue, but instead of installing the
dependencies one by one I would just issue a

sudo apt-get build-dep openscenegraph

which, as the man page reads,

"causes apt-get to install/remove packages in an attempt to satisfy the
build dependencies for a source package."

so you would not be required to install g++, cmake, opengl,
etc. yourself.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fwd: Slow down with shared nodes

2017-03-08 Thread Alberto Luaces
Andre Normann writes:

> Hi Alberto,
>
> I did it. The two files differ only in format style but not the syntax. I 
> would say the two files are identical. With the provided example every one 
> can reproduce the slow down effect.

Sorry, I was confused by the fact that only one file was sent.

I still get 60fps with 3.4.0, but my system is quite different than
yours.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fwd: Slow down with shared nodes

2017-03-08 Thread Alberto Luaces
Andre Normann writes:

> Hi Robert,
>
> I used 3.2.3 to load the obj files and converted it into ive format. In 3.2.3 
> I load the ive file, build my scenegraph and I get 60 fps. When I now load 
> the same ive file into 3.4.0, build my scenegraph, I get the slow down. 

Hi Andre, I guess the point was to convert to .osgt since it is a text
format and therefore you can compare both easily with a diff tool or an
editor.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Up to date tutorials for linux

2017-03-02 Thread Alberto Luaces
"Rodrigo Dias" writes:

> Hi Robert,
>
>> Building under linux/unix is explained in the OpenSceneGraph/README 
>
> Right. But you also has a link at Documentation | Platform Specific |
> Linux. I thought everything platform specific would be there, but it
> wasn't, so I went to other sources (before remembering the README),
> and did the apt-get install, which scrambled my installation. Maybe
> you could add that part to that menu?
>

1. It should not be possible to "scramble" an installation by installing
packages with apt.  I usually compile the latest version having
simultaneously installed Debian's 3.4.

2. I think you have followed incorrectly the instructions: it says run

apt-get build-dep openscenegraph

and not 

apt-get install openscenegraph

the point is to have all the dependencies that OSG relies on installed
on your system instead of having to compile or install them manually
yourself, with I see it is giving you additional problems.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Heap Corruption

2017-01-10 Thread Alberto Luaces
Ok, the next I would do is to see what is OSG trying to print in this
stack frame (the ninth from the beginning):

 osg130-osgUtild.dll!std::operator<<(std::basic_ostream & _Ostr, const char * _Val) 
Line 806C++

maybe that could serve as a hint...

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Heap Corruption

2017-01-10 Thread Alberto Luaces
"Théo Nassour" writes:

>>SICLAV.OsgRendering.dll!SICLAV::nodes::Tree3D::accept(osg::NodeVisitor & 
>> nv) Line 31C++

Hi Théo, is that library in its "Debug" configuration?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to draw 3D cylinder and 3D band?

2017-01-04 Thread Alberto Luaces
Hi Daven,

no screenshot came through, but I think I understand what you want to
do.  You will have to construct the geometry yourself.  Please have a
look at the osggeometry example.

Actually you can deform the cylinder with scaling operations, but that
is not possible for the band, so you will have to generate the vertices
and then join them with triangles or quads.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Check if sampler2D is valid in fragment shader

2017-01-03 Thread Alberto Luaces
"Rômulo Cerqueira" writes:

> Hi Sebastian,
>
> I have used the last openscenegraph stable package in ubuntu (version
> 3.2.3 - https://launchpad.net/ubuntu/+source/openscenegraph), and
> there is no setDefine() method in osg::StateSet (only for 2.4 and
> newer). There is a different way?
>

Hi Rômulo, you also have OSG 3.4 available in Yakkety (current stable)
under a slightly different name:

https://launchpad.net/ubuntu/+source/openscenegraph-3.4

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texturing with GLBeginEndAdapter

2016-12-29 Thread Alberto Luaces
Aaron Andersen writes:

> I've created a subclass to the Drawable class called "MyDrawable". In
> the drawImplementation function I'm have a couple
> gl.Begin(GL_QUADS)/gl.End() calls to draw 3 simple rectangles. I'm
> unsure of how to apply 3 separate textures to these 3 rectangles. From
> reading the ShapeDrawable class it looks like the state of the
> Drawable applies the texture to everything you draw.

Hi Aaron, if I am not mistaken, it is unlikely that the original code
did that (without any multi-texturing tricks, I think).

Probably it had a glBegin/glEnd block, a texture binding change, and
then the next glBegin/glEnd block.

That translates in OSG as —as you figured out— several Drawables with
their own StateSet each one (at least one StateSet per different
texture).  You can try to group into the same Drawable all the
primitives sharing the same texture.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] System requirements for OpenSceneGraph

2016-12-28 Thread Alberto Luaces
"Nikita Petrov" writes:

> I've googled a lot and I can't find any info about OpenGL or graphic card 
> requirements for OSG.
>

Yes, because it pretty much depends on what your code is doing and in
which hardware it is executing.  I would dare to say that there are not
any minimum requirements for OSG as long as your platform has any kind
of OpenGL implementation available.

>
> The question is - is it possible to run OSG and osgEarth on GeForce
> MX440 (OpenGL 1.5)? Or I shouldn't spend time on debugging this
> problem?

As you found, if your driver/hardware does not support any specific
OpenGL feature, a warning is issued for each error, but the program
continues as it is not usually fatal.  Most of the time failing commands
do not make anything.

If what you see on the screen satisfies you, I would not try to debug
that problem in more depth.  If not, you can use a GL debugger/tracer
and catch the exact point in the code that triggers the warning in the
hope that you can change it to have it working.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Upon Clicking the mouse left button the model should appear there

2016-12-05 Thread Alberto Luaces
"Rambabu Repaka" writes:

> Hi,Model is Loading but requirement is where the mouse button clicks it 
> should display there.

Ok, then as Robert suggested, further inspect your event class.  Place a
breakpoint at ModelController::handle() to see if it is being called at
all.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Upon Clicking the mouse left button the model should appear there

2016-12-05 Thread Alberto Luaces
"Rambabu Repaka" writes:

>   osg::ref_ptr model = 
> osgDB::readNodeFile("D:/RamFolder/OSG/OSG_Binary/OpenSceneGraph-3.0.1-VS9.0.30729-x86-debug-12741/data/cessna.osg");

Are you sure the model is loading correctly?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2016-11-22 Thread Alberto Luaces
"Rambabu Repaka" writes:

> Hi,Can anyone have the source code of latest version of osg ocean (except osg 
> ocean 1.0).

Hi Rambabu, inspecting the available forks in github, there is one that
seems to be updated at least to OSG 3.4.0, though I have not personally
tried it:

https://github.com/repagh/osgocean

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disabling plugins via CMake

2016-11-08 Thread Alberto Luaces
Yes, there is no "high-level" way.  I hope it works for you.

sam writes:

> Hi Alberto,
>
> No. I was hoping to avoid hacking the CMakeFiles up. I will give this a try.
>
> Thanks!
>
> On Tue, Nov 8, 2016 at 5:07 AM, Alberto Luaces <alua...@udc.es> wrote:
>
>  sam writes:
>
>  > Hi All,
>  >
>  > Is there a simple way to disable the plugin project files from being 
> generated via CMake?
>  >
>
>  Hi, Sam. Did you try to comment or delete the 31st line of 
> src/CMakeLists.txt?
>
>  
> https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/CMakeLists.txt#L31

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disabling plugins via CMake

2016-11-08 Thread Alberto Luaces
sam writes:

> Hi All,
>
> Is there a simple way to disable the plugin project files from being 
> generated via CMake?
>

Hi, Sam.  Did you try to comment or delete the 31st line of src/CMakeLists.txt?

https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/CMakeLists.txt#L31

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Issue in Rendering Obj model using c++ code .

2016-10-14 Thread Alberto Luaces
"Uma Devi Selvaraj" writes:

> But in Release Mode I am facing error.

Hi, Uma.

Yes, in the screenshot it is shown that you are still linking with the
Debug libraries.  Please link with the proper ones.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgversion command fails with symbol lookup error on new clone of OpenSceneGraph 3.5.5 on Linux

2016-10-13 Thread Alberto Luaces
Robert,

by the way, due to those recent changes in the OT API, I think it would
be a good move to bump the soname to 21.

Thanks!

Alberto

Robert Osfield writes:

> Hi Curtis,
>
> Curious, what Linux variant are you using?
>
> FYI, I develop under Kubuntu 16.04 at present, so all the new Affinity
> work written in Linux and I've run osgversion a number of times and
> not seen any issues with missing linkage.  For dev work I don't
> usually install the OSG though, instead setting my LD_LIBRARY_PATH to
> pick up the OSG libs where they were built.  This means I don't have
> to do a make install each time I modify the OSG codebase, I wouldn't
> expect it to change behaviour w.r.t linkgage, but perhaps there is
> some relationship.
>
> I just checked the applications/osgversion/CMakeLists.txt and it
> includes OpenThreads on the link line so it should work.
>
> Is there any chance you've only install the updated OSG but not the
> updated OpenThreads?
>
> Robert.
>
>
> On 11 October 2016 at 18:31, Curtis Rubel  wrote:
>> Hi,
>>
>> After cloning out a copy of OpenSceneGraph 3.5.5 from GitHub,
>> and running cmake with default options, then enabled building
>> of examples and documentation on Linux only.
>>
>> After clean build with no errors, running make install;sudo ldconfig
>>
>> osgversion command fails with the following results:
>>
>> osgversion
>> osgversion: symbol lookup error: /usr/local/lib64/libosgDB.so.145: undefined 
>> symbol: _ZN11OpenThreads6Thread20setProcessorAffinityERKNS_8AffinityE
>>
>> Actually seems all the default built binaries fail with the same error.
>>
>> Are there some other cmake flags, defines or compile options that need to be 
>> specified before compiling 3.5.5 and have it run properly on 64bit Linux?
>>
>> If more data is needed, just let me know what/how to get it for you
>> and I will do my best to get it.
>>
>> Cheers,
>> Curtis
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=68963#68963
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-29 Thread Alberto Luaces
Robert Osfield writes:

> On 29 September 2016 at 10:32, Alberto Luaces wrote:
>> I was precisely searching yesterday in the OSG examples directory to seee
>> if there were any program printing the detected GL characteristics
>> (similar to what glxinfo does on linux), but found none so far.
>
> If you set the OSG_NOTIFY_LEVEL to DEBUG then run an OSG example that
> opens up a graphics context and starts rendering it'll output all the
> extensions/GL versions etc to the console.

Great!  Thanks for the pointer, Robert!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-29 Thread Alberto Luaces
Alistair Baxter writes:

> I’ve just discovered that my Windows 10 (Version 1511, last year’s
> November Update) desktop machine now supports OpenGL 4.5 over RDP!
>
> Apparently this has been in the pipeline for some time, but the only
> official word about it has been this post on an MS sysadmin blog with
> regard to a preview version of Windows Server:
>
> https://blogs.technet.microsoft.com/enterprisemobility/2016/01/11/remote-desktop-protocol-rdp-10-avch-264-improvements-in-windows-10-and-windows-server-2016-technical-preview/
>
> But it’s certainly working for me, using both the built-in Windows
> desktop RDP client, and the UWP store app. Anything that supports
> RemoteFX should work, I expect.
>
> Perhaps somebody else ought to confirm that this isn’t just me.
>
>

Thanks for the heads up, Alistair.  It is certainly interesting.

I wonder how did you check that.  Is it just the absence of the usual
notice output to the console saying that only OpenGL 1.x was found?

I was precisely searching yesterday in the OSG examples directory to seee
if there were any program printing the detected GL characteristics
(similar to what glxinfo does on linux), but found none so far.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Where to obtain dependencies for Ubuntu

2016-09-05 Thread Alberto Luaces
"Kaku Ro" writes:

> From the wiki it said just running apt-get build-dep openscenegraph
> command to download. But it does not work. Is there any tutorial about
> it?

That command is correct.  Please show us the exact error message you are
getting.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Where to obtain dependencies for Ubuntu

2016-09-01 Thread Alberto Luaces
"Kaku Ro" writes:

> Hi,
>
> I'm newbie for OSG and is going to build OSG 3.4.0 on Ubuntu 16.
> But I can't find the dependencies from the official Wiki.
> Does anyone know where can I get it?
>

Hi, you can read the following page referring to linux:

http://trac.openscenegraph.org/projects/osg//wiki/Downloads/Dependencies

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Linux packaging: Qt 4 vs 5

2016-07-15 Thread Alberto Luaces
Hi Stuart,

Stuart Mentzer writes:

> Hello,
>
> The OpenSceneGraph-qt/-devel (OSG 3.4.0) packages on Fedora 24 are
> built against Qt 4. I'm wondering if that is suggested by OSG (maybe
> due to the single thread restriction on Qt 5) or is the choice of the
> Fedora packager. 
>

I think the main reason is to support existing code using OSG and Qt4 on
their repositories.  However, I expect all distributions to begin
shipping OSG and Qt5 since Qt4 is fading away.

>
> I am able to run our OSG applications with Qt 5 on Windows and I'd
> like to try it on Linux to see if we can transition off Qt 4. Would it
> make sense to request OpenSceneGraph-qt5 packages be added by the main
> distros? (I am assuming those are the only OSG packages with Qt
> dependencies.) If so, how best to do that?

Personally I think that it would make sense.  You would usually file a
bug report against the OSG package.  For example, Debian has a
"wish-list" category for that kind of petitions.  You could also address
the maintainer personally.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Infinite loop loading OBJ with a new osgDB::Options

2016-07-11 Thread Alberto Luaces
"Julien Valentin" writes:

> Hi,
> I don't understand:
> when i open wavefront obj with osgviewer all is right but in my application i 
> get stuck in an infinite loop.
> I set a new osgDB::Options to readrefnodefile, could it come from that?
> Here's the stacktrace when i break the inf loop.
> Any help is welcome

Hi Julien,

that sometimes happens if your locale does not interpret dots as the
decimal separator.  Therefore, all the vertices are read as integers
having almost the same value, so the tri-stripper creates a lot of
common edges.

Try setting LANG=C as a environment variable, or just before reading the
file: I have issues because Qt was changing the locale for me.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why ref_ptr node can not release memory immediatelly?

2016-07-08 Thread Alberto Luaces
Hi John,

there was a recent discussion on the topic that may be interesting to
you:

http://forum.openscenegraph.org/viewtopic.php?t=15809

"John Lee" <357059...@qq.com> writes:

> Hi,
>
> In my appllication, there are many child nodes in my root node. When i
> dynamically remove its child node, i find the memory will not free
> immediatelly, it will free sometimes, maybe it will free when i keep
> removing a few child nodes, or it will free when i remove all child
> nodes? Why this happens? And can anyone tell me how to free the scene
> memory immediatelly?
>
> Thank you!

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Creating a annex/attic repository for old and no longer used parts of the OSG

2016-06-20 Thread Alberto Luaces
Robert Osfield writes:

> Thoughts?

In my opinion, a new repo implies extra maintenance duties (even they
are likely low), but cannot guarantee that it is synced or working with
the latest OSG version, so it has a little added value.

Removing things at the point they were working is a good aid for
interested people to see what changed in OSG since that date when trying
to port again those features into a recent branch.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLOD and page in/out detection

2016-06-03 Thread Alberto Luaces
Trajce Nikolov NICK writes:

> Now it doesn't .. Any clue or hint how to detect such changes?

git bisect?  It is very useful for that kind of "it does work / now it
doesn't"...

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Submission/Pull Request problems on github

2016-05-20 Thread Alberto Luaces
"Jannik Heller" writes:

> Hi Robert,
>
> by fixing the author names you have essentially re-written the
> repository history. This means that everyone who submitted
> pull-requests in the past will have to manually rebase their changes
> on top of the new history. But it's not so difficult to do that if you
> know how to use the git rebase tool.
>
> The github document "Changing author info" (which I assume you were looking 
> at?) does state this caveat:
>
> "Note: Running this script rewrites history for all repository
> collaborators. After completing these steps, any person with forks or
> clones must fetch the rewritten history and rebase any local changes
> into the rewritten history."
>
> In the future you may want to avoid rewriting history (i.e. anything
> that requires a force-push) since it does cause disruption for people
> that have already sent in changes. But it's not a big deal now since
> github is not even the official submission route yet.

In addition to that, one may still recover the past state through the
reflog, and apply the recent changes on top of it.

Whether you stay with the old history or the new one is a matter of
taste, since as Jannik says, in the latter case, others can
exceptionally rebase their repositories to be synchronized again with
the official repository.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Remove all LOD children

2016-05-13 Thread Alberto Luaces
I think some facts must be made clear:

* You cannot control when the OpenGL driver releases the memory it
  claimed in a previous instant.
  
* You cannot control when the operating system claims back the memory
  pages that a process requested, and in addition, many times it is
  simply not possible to do it due to memory fragmentation.
  
* At most, what you can do is to check that your program is not leaking
  memory with a special tool, as the one I recommended (valgrind for
  CPUs, other tools for GPUs).

System memory tools are completely unreliable for this specific purpose.

Bruno Oliveira writes:

> I tried removing the children with m_rootNode->removeChildren(0,
> m_rootNode->getNumChildren());
> but this results in some memory being still allocated.
>
> After that, I move the mouse around a bit in the clean scene, and the
> memory starts being freed. However, It never gets to the initial
> value, there is always some memory floating around.
>
> 2016-05-13 15:16 GMT+01:00 Alberto Luaces
> <alua...@udc.es>:
>
> Bruno,
> 
> if you read the source code, you will see that the LOD uses the
> same
> scheme for storing nodes as a Group: just a vector of ref_ptr that
> will
> be unallocated when destroyed.
> 
> Maybe you can place some breakpoints at the destructors on the
> debugger
> and see what is happening.
> 
> Bruno Oliveira writes:
> 
> > Thank you for your answer. However, since I'm using a LOD, I
> think it
> > is not properly removing my data. At least the memory is still
> > allocated.
> > If I manually iterate over all nodes and delete them by myself,
> some
> > memory is freed, but not all!
> >
> > 2016-05-13 14:58 GMT+01:00 Alberto Luaces
> >
> >
> 
> 
> > Bruno Oliveira writes:
> >
> > > At some point I want to completely wipe out my scene. How can
> I
> > delete
> > > all nodes?
> >
> > If you want to wipe a node and all its descendants, just delete
> > the
> > parent node. That is what reference counting is all about.
> 
> --
> Alberto
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> 
>
>

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Remove all LOD children

2016-05-13 Thread Alberto Luaces
Bruno,

if you read the source code, you will see that the LOD uses the same
scheme for storing nodes as a Group: just a vector of ref_ptr that will
be unallocated when destroyed.

Maybe you can place some breakpoints at the destructors on the debugger
and see what is happening.

Bruno Oliveira writes:

> Thank you for your answer. However, since I'm using a LOD, I think it
> is not properly removing my data. At least the memory is still
> allocated. 
> If I manually iterate over all nodes and delete them by myself, some
> memory is freed, but not all!
>
> 2016-05-13 14:58 GMT+01:00 Alberto Luaces
> 
>
> Bruno Oliveira writes:
> 
> > At some point I want to completely wipe out my scene. How can I
> delete
> > all nodes?
> 
> If you want to wipe a node and all its descendants, just delete
> the
> parent node. That is what reference counting is all about.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Remove all LOD children

2016-05-13 Thread Alberto Luaces
Bruno Oliveira writes:

> At some point I want to completely wipe out my scene. How can I delete
> all nodes?

If you want to wipe a node and all its descendants, just delete the
parent node.  That is what reference counting is all about.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Clear scene data and underlying memory structures

2016-05-13 Thread Alberto Luaces
Bruno Oliveira writes:

> I am using Ubuntu's System monitor.
> How can I measure it more accurately?

A good tool is valgrind's massif
(http://valgrind.org/docs/manual/ms-manual.html)

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Clear scene data and underlying memory structures

2016-05-13 Thread Alberto Luaces
Bruno Oliveira writes:

> Hello,
>
> thank you for your answaer. However, that does not have any effect :(

One thing you are not stating is how are you measuring your memory
consumption.  Relaying on OS stats may not be precise enough since when
one frees some memory block, OSes tend to not returning it back
immediately to the general memory pool.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Can't build documentation

2016-04-29 Thread Alberto Luaces
Hi Goj,

I think you are almost there: you don't use BUILD_DOCUMENTATION as a
make target, but you have to set it in CMake instead.

You can either activate the BUILD_DOCUMENTATION variable inside CMake
(using ccmake or cmake-gui), or just in the command line with

cmake -DBUILD_DOCUMENTATION=ON

After that, the target doc_openscenegraph should be available.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ShaderComposer::releaseGLObjects warning

2016-04-25 Thread Alberto Luaces
Robert Osfield writes:

> On 18 April 2016 at 20:30, Robert Osfield  wrote:
>
>> Hi Jannik and Ulrich,
>>
>> You are right it's a bug, the missing const is an error, rather than the
>> missing virtual.  I've fixed this and rewritten the implementation of
>> ShaderCompose::releaseGLObjects() const.
>>
>> I need to do a build and test before checking it in.
>>
>
> Now checked into OpenSceneGraph-3.4 and master.
>
> I am bit concerned that this fix breaks the ABI of 3.4 though...  Would
> changing const affect the ABI?  I'm thinking yes, but it's too late in the
> evening for me to go and search for an answer...

Indeed it does, for example on my system the signature of the method
changes from

_ZN3osg14ShaderComposer16releaseGLObjectsEPNS_5StateE

to

_ZNK3osg14ShaderComposer16releaseGLObjectsEPNS_5StateE

therefore old programs will not run with this change.  I suggest to
additionally keep also the old, non-const method, since they can
co-exist.  Old binaries will expose the bug, but at least they will
be able to execute.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Can't build documentation

2016-04-25 Thread Alberto Luaces
"Goj Ames" writes:

> Hi,
> I'm also not able to build the docs, but with different failure:
> osg 3.5.2 sync'd from github a few days ago.  
> Doxygen version 1.8.8
> The core_Doxyfile has:
> EXTENSION_MAPPING  = no_extension=C++
> Debian
>
> pwd
>   /home/gjames/OpenSceneGraph
> echo $OSGHOME 
>   /home/gjames/OpenSceneGraph
> echo $OpenSceneGraph_SOURCE_DIR 
>   /home/gjames/OpenSceneGraph
> doxygen doc/Doxyfiles/core_Doxyfile 
> Warning: Tag `XML_SCHEMA' at line 195 of file `doc/Doxyfiles/core_Doxyfile' 
> has become obsolete.
>  To avoid this warning please remove this line from your 
> configuration file or upgrade it using "doxygen -u"
> Warning: Tag `XML_DTD' at line 196 of file `doc/Doxyfiles/core_Doxyfile' has 
> become obsolete.
>  To avoid this warning please remove this line from your 
> configuration file or upgrade it using "doxygen -u"
> Warning: argument `${SEARCHENGINE}' for option SEARCHENGINE is not a valid 
> boolean value
> Using the default: YES!
> Error: tag HTML_FOOTER: footer file 
> `${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html' does not exist
>
> ls -l ${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html
> -rw-r--r-- 1 gjames gjames 408 Apr 12 16:28 
> /home/gjames/OpenSceneGraph/doc/Doxyfiles/custom_Footer.html
>

Hi Goj, did you try to use "make doc_openscenegraph" instead?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] osgjs failing to build in osg 3.5.1

2016-04-25 Thread Alberto Luaces
Hi Ben,

can you confirm that
/wrkdirs/usr/ports/graphics/osg-devel/work/OpenSceneGraph-3.5.1/include/osg/Image
exists?

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disabling plugins via CMake

2016-04-25 Thread Alberto Luaces
sam writes:

> Hi All,
>
> Is there a simple way to disable the plugins from building in OSG? I'd
> like to be able to just build the OSGCore without having to uncheck
> the boxes in visual studio.
>

Hi Sam, I usually open src/osgPlugins/CMakeLists.txt and comment or
remove all the ADD_SUBDIRECTORY instances in which I am not interested.
In your case I suppose that you could almost remove the whole file.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] gstreamer plugin failing to build in osg 3.4.0

2016-04-25 Thread Alberto Luaces
Hi Ben,

can you post the value of all the GSTREAMER_* cmake variables?  Maybe
that could be used as a clue.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  1   2   3   4   5   6   >