Attribute attribute without instancing?

I know that glVertexAttribDivisor can be used to change the speed at which universal vertex attributes advance during instance rendering, but I was wondering if there is a way to advance attributes at a certain speed WITHOUT instancing.

Here is an example of what I mean:

Let's say you define a list of vertex positions that make up a series of lines, and with each line that you want to associate with an identifier. So, you create two vbos, each of which contains data related to one of these attributes (either all vertex positions, or all vertex identifiers). Traditionally, this means that each vbo should be the size (in elements) of the number of lines X 2 (since each point contains two lines). This, of course, means that I duplicate one identifier value for each point in the row.

Instead, I would like to point out that identifiers advance 1 element for every 2 elements, delaying the vertex position buffer. I know that this requires that the first vertex position buffer be declared first (so that I can reference it to tell OpenGL how often to promote the ID buffer), but it still seems possible. However, I cannot find any features in the OpenGL specification that allow such a maneuver.

+6
source share
1 answer

What you want is not possible at all in OpenGL. This is an efficiently low-key form of multi-indexed rendering , so you will have to use one of these methods to get it.

+2
source

All Articles