OpenGL Texture Management

I am launching my first game engine: D. Now I am working on a texture resource manager and I want to do it right.

Is it really bad to just populate all the ActiveTexture blocks that the driver supports? An alternative would be to save these slots and only set the textures when they are really needed, due to more calls to glBindTexture.

+3
source share
2 answers

As you asked your question, I think that you are suffering from a misunderstanding between texture objects , that is, a texture repository, and texture units , that is, a multitexturing machine.

OpenGL . , , .

, . , , .

+5

, , , GPU VRAM. , , , , - stb_dxt, DXT1/DXT5, ansi C. CompressedTexture2D, , , GPU, 1/8- .

- , DDS, nvidia-texture / .

+2

Source: https://habr.com/ru/post/1796172/


All Articles