GL_LINE_STRIP primitive mode

Hi cesium-dev,

I’m probably doing something wrong here, but when I use GL_LINE_STRIP I get a lot of extra lines drawn (see the attached graphic.)
In the top example, I’m storing 4 vertices with GL_LINES in order to draw 2 lines at one position of the grid. And this is drawing correctly.

When I use the GL_LINE_STRIP primitive mode, I think I have to store only 3 vertices (in this example) to draw the same 2 lines at one position of the grid.
However the bottom graphic shows a lot of extra lines drawn.

I have the same issue when trying to use the GL_TRIANGLE_FAN.

btw, in this example I’m reading CEIL (ceiling weather data) from a netcdf file to generate the binary glTF.

Thanks for your help.

I believe the problem is because of wrapping around to the next row when going from vertex 7 to 8. Primitive Restart is supported in WebGL 2 and will solve this problem, but this feature isn’t in Cesium yet.

Peter - cool app, I think folks in the Cesium community would be interested in your work with netcdf. Let me know if you are up for us showcasing your project on the Cesium website when it’s ready:



Great! I’ll let you know. Thanks Patrick.