Texture/Geometry Memory Availability
Suppose a discrete video card has N megabytes of gpu ram. Typically how much of that is usable as texture/geometr开发者_运维知识库y memory?
A difficult question. You have to substract frame buffer size, vram used by the operative system and vram used by the other running software. But some videocards also use RAM to store graphics. It is meaningful that OpenGL doesn't provide any function to examine available vram.
1/2 the VRAM is a safe estimate for use by an application texture and buffer object resources.
On OS X, you can call CGLDescribeRenderer() with kCGLRPTextureMemory to determine how much texture memory is available to your application. The implementation doesn't distinguish vertex from texture memory - all graphics resources are effectively "textures" internally so you can use this number as your free VRAM calculation for all of your graphics resources.
精彩评论