   GlDrawElements without a Vertex Buffer
  I am coding a terrain which doesn't even have an heightmap. It's basically just a grid of quads + an 2dTextureArray which holds the N possible textures for each quad + a 2dTexture which is nothing but an array which stores, for each quad, whose texture should be used from the texture array.Now, when I think about this in term of vertex shader, I should be able to calculate everything without having to pass real vertex data. Actually, all I'd have to pass is an array of indices to which quads I should render (ex. [1,2,3,5,9,23,40]), because from that single index I am able to derive pretty much everything.I've tried looking for primitive id in glsl but looks like it's something which is used in geometry shaders only, so I wonder if what I am saying makes sense at all and there's some way to implement it. Any suggestion?Thanks a._________________________   
  Personally I would just create a grid of vertices for your tiles, and then generate the indices for the tiles you want to draw through glDrawElements.I don't know much about the geometry shader, although I think it can't create vertices from nothing. At the very least you might be able to send it a single quad that covers your whole terrain, and then emit the quads from that that you want based on a uniform array or something. Just sending the vert indices you want through glDrawElements seems like the simplest way to go, or if you're really opposed to it you can try the geo shader, although keep in mind that it's pretty new and you'll be cutting off a lot of older hardware if you do.   