Textures and vertex arrays with OpenGL?

Basically what I would like to do is make textured NGONS. I also want to use a tessellator (GLU) to create concave and multi-contour objects.

I was wondering how texture comes into play. I think the tessellator will return the vertices, so I will add them to my array, that’s fine. But my vertex array will contain more than one polygon object, and then, how can I tell when to snap a texture, as in immediate mode? Right now I feel stuck with one call to associate.

How can I do that? Thanks

+3
source share
1 answer

glDrawArrays glDrawElements, , . . ( glBegin glEnd, glBegin... glEnd.)

glBegin glEnd glArrayElement , .

+2

Source: https://habr.com/ru/post/1746767/


All Articles