Re: [osg-users] Visualizing triangle data

2018-06-14 Thread Sam Brkopac
Hi Robert, It seems to work okay. I wasn't sure how to do it in my original post and that is what I came up with. I haven't tried this on a large scale map consisting of around ~1700 of the nodes. I'll post back if there are any performance issues. Thanks, Sam -- Read this topi

Re: [osg-users] VBO Bug with 3.6.1 and Normal Arrays

2018-06-14 Thread Daniel Emminizer, Code 5773
Hi Robert, I agree that your solution here seems to cover the common failure case (assigning by-vertex too late). I think given the system constraints and time constraints, that is the best solution. Your solution does work in all my testing. Regarding a 3.6.2 release, that sounds great. At

Re: [osg-users] Visualizing triangle data

2018-06-14 Thread Robert Osfield
Hi Sam, On a quick read of your code I can't see a problem. Does this work OK? It's perfectly find to just use DrawArrays without indices like you have done. You can mix both DrawArrays and DrawElementsUShort in a single osg::Geometry as well. I'm not clear on what issue you are having. Cheers

Re: [osg-users] VBO Bug with 3.6.1 and Normal Arrays

2018-06-14 Thread Robert Osfield
H Dan et. al, On Thu, 14 Jun 2018 at 08:25, Robert Osfield wrote: > Perhaps another approach would be to just warn the user that the > Binding hasn't been set prior to the Geometry::set*Array() call, or do > a belt and braces of treat an BIND_UNDEFINED binding as a > BIND_PER_VERTEX to force a Ve

Re: [osg-users] Visualizing triangle data

2018-06-14 Thread Sam Brkopac
Hi Robert, I have the mesh setup correctly using the DrawElementsUShort. My question was regarding drawing the walkable triangles that are attached to the mesh. These don't have indices and just consist of the vertex information. Here was my approach to draw them. Code: for (size_t index = 0

Re: [osg-users] VBO Bug with 3.6.1 and Normal Arrays

2018-06-14 Thread Robert Osfield
Hi Daniel, On Wed, 13 Jun 2018 at 23:29, Daniel Emminizer, Code 5773 wrote: > I don't know enough about the inner workings to know if this is a dumb idea > -- but could you perhaps detect the problem during cull (VBO attachment is > NULL but array exists and is non-empty), then call > addVerte

Re: [osg-users] Visualizing triangle data

2018-06-14 Thread Robert Osfield
HI Sam, Have a look at the osggeometry example as this illustrates how to set up geometry data, which includes triangles. For the traingle mesh what you'll likely want to do is use an osg::DrawElementUShort(GL_TRIANGLES) and then add you triangle indices to this. Robert. On Wed, 13 Jun 2018 at