# Tag Info

2

One possibility would be to create a bit array with 1 bit per half-edge. When you start iterating, initialize them all to 1, then clear the bits of each half-edge and its partner as you iterate. The iteration can be done using __builtin_clz (GCC, clang) or _BitScanReverse (MSVC) [edit: or std::countl_zero in C++20!] to efficiently extract the next 1-bit ...

1

This more or less a long comment than an answer. Some other options that come to mind are the following: A little old school, but you can create an interface with one of the texture objects. You can query different mipmap levels for your needs inside the shader. Textures are one of the better cached objects in OpenGL. You can defer the lightening process ...

1

If anyone ever runs into this. There is a mathematical property of the half edge, that makes it such that any proper half edge can be expressed as an even permutation of vertices. This sounds abstract but the gist of it is very simple. Since there is an even number of HE by definition, you can store your half edges such that if $n$ is even then $n + 1$ is ...

Only top voted, non community-wiki answers of a minimum length are eligible