Re: [osg-users] Feedback/guidance sought on move of osgQt out into it's own project/repository

2016-09-19 Thread Mathieu MARACHE
Hi Robert, On Mon, Sep 19, 2016 at 9:46 AM Robert Osfield wrote: > Hi Mathieu, > > One of the items that could complicate things is the qfont plugin as this > would normally be placed in the lib/osgPlugins-version directory. This > coupling to a specific OSG version

Re: [osg-users] different materials for a geometry and highlight

2016-09-19 Thread Gianni Ambrosio
Trajce Nikolov NICK wrote: > Maybe you dirty your color array too? > Thanks Nikolov, in my code the color array don't change. Anyway I tried as you suggested and I can confirm that's not the point. Regards, Gianni -- Read this topic online here:

Re: [osg-users] Attaching children to the prerender camera

2016-09-19 Thread Trajce Nikolov NICK
Hi Mary-Ann, I have recently worked on similar issue and the way how I debug the depth RTT was by rendering the Depth image on a quad (the shader for displaying the Depth image is here: http://markmail.org/message/ ccscbkzyxsgmb5vl#query:+page:1+mid:c542rbpj3jdw3v5d+state:results ) or simply

[osg-users] Attaching children to the prerender camera

2016-09-19 Thread Mary-Ann Zorra
Hi, I am pretty new in OSG, so sorry if I am asking a bit noob question. But I am stuck on this problem, and have no idea how I could solve it. So I would like to prerender my scene into a framebuffer to have a depth map. I tested everything, my shader seems to work if I am using it in my main

Re: [osg-users] different materials for a geometry and highlight

2016-09-19 Thread Gianni Ambrosio
OK, I found a way to move a triangle from a primitive set to another. Debugging the code primitive sets are updated correctly but the color remains the same. I call sourcePrimitiveSet->dirty(); destinationPrimitiveSet->dirty(); geometry->dirtyBound(); What's wrong with it? Isn't enough?

Re: [osg-users] different materials for a geometry and highlight

2016-09-19 Thread Gianni Ambrosio
Hi Sebastian, SMesserschmidt wrote: > I might be wrong, but I think the intersector.primitiveIndex might yield > the number you are looking for > thanks for the reply but unfortunately it seems to return a number from 0 to 7 that is the number of triangles in my example geometry. While the

Re: [osg-users] different materials for a geometry and highlight

2016-09-19 Thread Sebastian Messerschmidt
Hi Gianni, I browsed the LineSegmentIntersector code and it seems, the intersector is using a triangleFunctor to traverse your primitive sets as triangles anyways. So the Ifnromation So basically you cannot find out which primitive set was affected without reverse-engineering which primitive

Re: [osg-users] different materials for a geometry and highlight

2016-09-19 Thread Sebastian Messerschmidt
Hi Gianni, Code: osg::Geometry* buildGeometry() { osg::Geometry* geometry = new osg::Geometry; geometry->setVertexArray(buildVertices()); geometry->setColorArray(buildColors(), osg::Array::BIND_PER_PRIMITIVE_SET); std::vector elements =

Re: [osg-users] different materials for a geometry and highlight

2016-09-19 Thread Gianni Ambrosio
Hi All, I've attached an example. Hope this helps to have a reply from somebody (Robert?). Part of that example is from the OSG 3 Cookbook. Suppose I have geometry build of triangles. I would like to understand which is the better way to change the color of a selected triangle. And if there is

Re: [osg-users] Feedback/guidance sought on move of osgQt out into it's own project/repository

2016-09-19 Thread Robert Osfield
Hi Mathieu, One of the items that could complicate things is the qfont plugin as this would normally be placed in the lib/osgPlugins-version directory. This coupling to a specific OSG version is not helpful for the osgQt build or maintainers. I think the solution is to simply place the