So I was playing around with opengl and ran into a bit of a problem. I want to be able to use a very large amount (upwards of 15k) of small (128x128) 2D textures at once (during a single draw call). Problem is I can't figure out how to do it efficiently. Here are the approaches and their problems I have found so far:
- As far as I understand the standard solution to multiple textures is a GL_TEXTURE_2D_ARRAY but that usually doesn't have a max size anywhere near big enough
- As an alternative I could use GL_TEXTURE_3D which, usually, has a much greater allowed depth, but, as I understand, I would have to generate mipmaps manually (or maybe even not use them at all?) and could have color bleed between the layers due to floating point errors if there are thousands of layers
- I could try using a GL_TEXTURE_2D_ARRAY of texture atlases, but then I would also have to think of how to solve mipmapping or wrapping problems as well as color bleed Can someone please recommend a better way if there is one, or say which is better of the ones I have outlined and if I am overlooking anything?
