'How to render more than 2 million objects in an OpenGL 2D engine?
There is this 2D OpenGL engine in which I'm working, and there is a problem in it when there are too many primitives to be rendered. More precisely, near and far are defined as 1.0 and -1.0, and the first object's primitive is set to be -1.0 (as far as possible). Each subsequent object's z coordinate is set to be the previous one + 0.000001. The problem I'm facing is that when there are too many objects (e.g. 2 million +), z coordinates start to be greater or equal 1.0 (which is the near value), and they're "rendered off-screen" (not shown). How can I solve such a problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
