Instanced Cubes
Example Cube
Hundreds of squares are drawn at once with a geometry, each of which only remembers its own location and colour, so many are not allowed to fit.
Interactive demo: open this page in a JavaScript-enabled browser to drag the parameters and watch the live readouts.