GlGenTextures memory and memory issues

I am learning OpenGL and recently discovered glGenTextures. Although some sites explain what he does, I feel that it makes me think about how he behaves in terms of speed and, especially, memory.

What exactly should be considered when calling glGenTextures? Should I consider unloading and reloading textures for better speed? How many textures does a standard game need? What workarounds exist to circumvent all memory limitations and speed can bring?

+3
source share
1 answer

According to manual, glGenTextures selects only texture "names" (for example, ids) without a "dimension". Thus, you do not actually allocate texture memory as such, and the overhead here is negligible compared to the actual texture memory allocation.

glTexImage will actually control the amount of texture memory used for each texture. The best use of your texture memory for your application will depend on many factors: including the maximum working texture set used for each frame, the available dedicated memory texture memory, and the texture memory bandwidth.

- ? blu-ray ( PS3, blu-ray). - . , - .

, : 1. , . 2. , .

, .

, : http://number-none.com/blow/papers/implementing_a_texture_caching_system.pdf

+4

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


All Articles