Hi,
Here's a simple use-case to set the stage for my question.
I'm making a top-down view game. I'm rendering a table top, with a plate on the table, and an apple on the plate. I want to draw this with a single VertexArray (using a texture atlas) for performance / batch count reasons. The table, plate, and apple are
separate images within the atlas (and must be so, so different tables can have different items on top).
So I make a VertexArray of Quads primitive type. The VertexArray has 3 quads (12 verticies).
- The first quad is the table texture
- The second quad is the plate texture
- The third quad is the apple texture
Question: Am I guaranteed that the apple will always be drawn overtop on the plate, and the plate overtop the table? Or is there no guarantee of which order the quads within a VertexArray will be drawn?
Thanks for the help.