[LWJGL] Conditional rendering?

I have six sets of verts (hexagon,triangle, quad, pentagon, right triangle, diamond-ish , null). For testing purposes whose algorithm i will use in my main project, I pass a random number between 0 and 6 which determines the shape and loops and this loops on for 100 times, adding transform mats to them. Now, how do I render them conditionally the most efficiently (since my main project requires hundereds of instances PER RENDER AREA (chunk))?

For such small pieces of geometry, hardware instancing is said to be fairly inefficient. Since your geometry seems to essentially be <6 vertices each, you’re probably better off packing all your vertex data of a chunk in a single buffer, using an index buffer to construct polygons out of triangles. If your per-object matrices are static, then manually premultiplying them into the vertex data is a good idea. Otherwise, you can add a manual instance ID variable to each vertex (just 4 bytes per vertex), which you can use to in turn look up a per-object matrix from a texture buffer. Then you can reduce each chunk to a single draw call, and you can then adjust the CPU/GPU tradeoff by modifying the chunk size.