Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert multiple quad strips into single quad strip

Tags:

mesh

opengl

I want to convert the five quad strips in the figure below (which are specified be the black indices below) into a single quad strip by adding appropriate degenerate quads. The added gray indices seem to do the trick, but I am wondering if there is a more compact way. enter image description here

like image 607
wcochran Avatar asked Oct 14 '12 22:10

wcochran


1 Answers

Instead of using degenerate triangles, you should be using primitive restart. With this, you simply specify that a particular index restarts a primitive. The core OpenGL 3.1 version is several years old, and the NV_primitive_restart extension is widely supported by NVIDIA (since the GeForce 6xxx days) and ATI (all HD-class hardware).

like image 88
Nicol Bolas Avatar answered Sep 22 '22 02:09

Nicol Bolas