[osg-users] OpenGL warning

2017-05-24 Thread Qiaokun Lefei
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.


Thank you!

Cheers,
Qiaokun

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70977#70977





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


Re: [osg-users] Dimension Mask in PolytopeIntersector still working?

2017-05-24 Thread Jordi Torres
Hi Robert,

I'm ok to change the name. My concern was more about losing functionality.

Thank you!

2017-05-24 17:12 GMT+02:00 Robert Osfield :

> Hi Jordi,
>
> On 24 May 2017 at 11:50, Jordi Torres  wrote:
> > It used to work meaning that one could target only lines, or points, or
> > triangles or a combination of them. Now that seems not possible.
> >
> > Also I'm getting repeated intersection points for some intersections,
> but I
> > need to test it further.
>
> I have just checked in support for PolytopeIntersect::DimensionMask.
> I haven't change the name but I think it really should be called
> PrimitiveMask as this would be more appropriate.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


[osg-users] draw primitive sets and geometry shader in opengl 3

2017-05-24 Thread Werner Modenbach

I have a simple question but couldn't find an answer.

My geode is assigned a geometry shader that starts with

layout(lines_adjacency)in;
 


For drawing geometry 1 I use
geometry1->addPrimitiveSet(newosg::DrawArrays(osg::PrimitiveSet::LINE_STRIP_ADJACENCY,0,count)); 



That works absolutely fine.

For drawing geometry 2 in the same geode I use
geometry2->addPrimitiveSet(newosg::DrawArrays(osg::PrimitiveSet::TRIANGLE_FAN,0,count)); 



Is the geometry shader just skipped for the second geometry? Or must I 
assign an individual shader for each geometry?

This might be a big slowdown because I have really many of those geodes.
Is it possible to define 2 geometry shaders with different layouts in 
one shader program?


Thanks for any hints.

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


Re: [osg-users] Dimension Mask in PolytopeIntersector still working?

2017-05-24 Thread Robert Osfield
Hi Jordi,

On 24 May 2017 at 11:50, Jordi Torres  wrote:
> It used to work meaning that one could target only lines, or points, or
> triangles or a combination of them. Now that seems not possible.
>
> Also I'm getting repeated intersection points for some intersections, but I
> need to test it further.

I have just checked in support for PolytopeIntersect::DimensionMask.
I haven't change the name but I think it really should be called
PrimitiveMask as this would be more appropriate.

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


Re: [osg-users] Dimension Mask in PolytopeIntersector still working?

2017-05-24 Thread Jordi Torres
Hi Robert,


> I vaguely recall seeing the dimensionMask  code in the original
> PolytopeIntersector and it struck me as a bit hacky, perhaps I didn't
> get round to implementing in the new code.
>
> Robert.
>

It used to work meaning that one could target only lines, or points, or
triangles or a combination of them. Now that seems not possible.

Also I'm getting repeated intersection points for some intersections, but I
need to test it further.

I'll keep you posted.





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


Re: [osg-users] Dimension Mask in PolytopeIntersector still working?

2017-05-24 Thread Robert Osfield
On 24 May 2017 at 11:14, Jordi Torres  wrote:
> With your last changes about Polytope Intersection I'm not sure wether
> dimensionmask is still used. A quick grep does not reveal any use of
> _dimensionMask in the intersection proccess or getDimensionMask method in
> PolytopeIntersector.
>
> Am I missing something?

I vaguely recall seeing the dimensionMask  code in the original
PolytopeIntersector and it struck me as a bit hacky, perhaps I didn't
get round to implementing in the new code.

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


Re: [osg-users] Get RenderBinDetails

2017-05-24 Thread Robert Osfield
Hi Bruno,

>From the include/osg/StateSet header:

/** Set the render bin details.*/
void setRenderBinDetails(int binNum,const std::string&
binName,RenderBinMode mode=USE_RENDERBIN_DETAILS);

...

/** Set the render bin number.*/
inline void setBinNumber(int num) { _binNum=num; }

/** Get the render bin number.*/
inline int getBinNumber() const { return _binNum; }

Robert.

On 24 May 2017 at 10:44, Bruno Oliveira  wrote:
> Hello,
>
> in order to sort my nodes by depth, I use the following code to a node's
> stateset
>
> nodeStateSet->setRenderBinDetails(order, "DepthSortedBin");
>
> where "order" is an int. Now, how do I get that value when I'm iterating
> over my nodes?
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Dimension Mask in PolytopeIntersector still working?

2017-05-24 Thread Jordi Torres
Hi Robert,

With your last changes about Polytope Intersection I'm not sure wether
dimensionmask is still used. A quick grep does not reveal any use of
_dimensionMask in the intersection proccess or getDimensionMask method in
PolytopeIntersector.

Am I missing something?


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


[osg-users] Get RenderBinDetails

2017-05-24 Thread Bruno Oliveira
Hello,

in order to sort my nodes by depth, I use the following code to a node's
stateset

nodeStateSet->setRenderBinDetails(order, "DepthSortedBin");

where "order" is an int. Now, how do I get that value when I'm iterating
over my nodes?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org