[osg-users] PolytopeIntersection with LINE_STRIP_ADJACENCY

Robert Osfield robert.osfield at gmail.com
Thu Jun 2 23:50:39 PDT 2016


Hi Jethro,

If you have a fix could you please post whole modified files to the
osg-submissions list, along with a link to a github commit if you have
one.

Thanks,
Robert.

On 3 June 2016 at 07:14, Jethro Leevers <j.leevers at aamgroup.com> wrote:
> Hi,
>
> I seem to have it working...
>
> I modified a few functions in osg/TemplatePromativeFunctor
>
>
> Code:
>
> virtual void drawArrays(GLenum mode,GLint first,GLsizei count)
> ...
> case(GL_LINE_STRIP_ADJACENCY_EXT): {
> const Vec3* vlast = &_vertexArrayPtr[first+count-2];
> const Vec3* vptr=&_vertexArrayPtr[first];
> vptr+=1;
> for(;vptr<vlast;vptr+=1)
> this->operator()(*(vptr),*(vptr+1),_treatVertexDataAsTemporary);
> break;
> }
>
>
>
>
>
> Code:
>
> template<class IndexType>
> void drawElementsTemplate(GLenum mode,GLsizei count,const IndexType* indices)
> ...
> case(GL_LINE_STRIP_ADJACENCY_EXT): {
> IndexPointer ilast = &indices[count-2];
> IndexPointer iptr=indices;
> iptr+=1;
> for(;iptr < ilast;iptr+=1)
> {
> this->operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
> }
> break;
> }
>
>
>
>
> Thank you!
>
> Cheers,
> Jethro
>
> PS. Code formatting is terrible[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67370#67370
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list