I’m trying to render a load of squares on rods (top image):
I’m doing this by with
drawInstanced() for two
gl::Batchs, one for the rods (a
geom::Cube) and one the squares (a manually constructed square
gl::VboMesh). The rods is slightly offset from the squares, but there’s a rendering issue, which I don’t understand. I’m calling
I tried not drawing the rod and calling
gl::enableFaceCulling() to hide the squares facing away, which gives much better results in terms of rendering (middle image).
But I don’t want to see through the rods! It looks like the issue is the proximity of the rods to the squares. If I reduce the size of the rods (and draw them in red for visibility) the the squares look better but still some aren’t drawn properly when they’re far away (lower image
Is there anything I can do to improve the quality of the rendering of the squares?