out of texture memory question

Started by
2 comments, last by streamer 14 years, 4 months ago
Hello all, Say I have 300MB of texture loaded, and binded properly, so I have id for all textures. But my system have VRAM of 32MB, and I'm using 300MB textures. The quetsion is, what is happening in this scenario? Does OpenGL API constantly destroying old textures and moving new textures from system ram to VRAM as soon as new texture doesn't fit in VRAM? How does this affect system performance? And what if I use 1GB of textures on system that have only 768MB of system RAM? I didn't find any texture destroy functions in OpenGL [smile] is there any similar function? thanks in advance
Advertisement
There is glDeleteTextures. The driver will move textures in and out of VRAM as needed, if you have too many. If you use 10x your memory that could result in very bad performance, but for just a little bit too many textures it probably won't matter. For example not all MIP-levels are used every frame, and the driver should be smart enough to only move the pixels needed to VRAM, to limit the performance impact.
Quote:Original post by streamer
Say I have 300MB of texture loaded, and binded properly, so I have id for all textures. But my system have VRAM of 32MB, and I'm using 300MB textures. The quetsion is, what is happening in this scenario? Does OpenGL API constantly destroying old textures and moving new textures from system ram to VRAM as soon as new texture doesn't fit in VRAM?
How does this affect system performance? And what if I use 1GB of textures on system that have only 768MB of system RAM?
OpenGL will handle moving textures back and forth to VRAM as needed. However, since a 32MB card is elderly, and probably going to be on an AGP bus, don't expect transfers to be fast - there will be a significant performance hit if you are actually using more textures than will fit in memory.

Keep in mind that only the textures you are actually rendering with need to be in video memory. Also keep in mind that the framebuffer takes up video memory as well (a significant chunk of it, at high resolutions).
Quote:I didn't find any texture destroy functions in OpenGL [smile] is there any similar function?
glDeleteTextures()?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Thank you for reply [smile]

This topic is closed to new replies.

Advertisement