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

Werner Modenbach Werner.Modenbach at texion.eu
Wed May 24 08:16:07 PDT 2017


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 -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170524/e7c75db0/attachment-0002.htm>


More information about the osg-users mailing list