Domanda

I can't find much info on this function regarding setup. I have 2 VBO's. The first containing position, normal, and color info bound to GL_ARRAY_BUFFER. The second is the index buffer bound to GL_ELEMENT_ARRAY_BUFFER. On a non-instanced draw call I am getting the correct models drawn to the screen, but when I do the same call with instanced rendering I get half of the primitives in each instance missing. I am doing a uniform array filled with translate data indexed by gl_InstanceID. The translations are working, but half of the primitives are not showing up. I have ruled out culling as the issue. I figured that since number of indices passed is required that the draw call would look up the GL_ELEMENT_ARRAY_BUFFER and stride based on the passed in count value. Could somebody explain to me what is going on behind the scenes?

È stato utile?

Soluzione

because glDrawArraysInstanced doesn't use the element buffer but glDrawElementsInstanced does

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top