Hi all.

I thought it would be nice to let the engine keep track of the ammount of videomemory used.
Now i do it like this (i add all these numbers):

Displaymode:
>>width * height * bitdepth (can be 2 or 4 bytes)

VertexBuffers
>>VertexCount * SizeOf(VertexRecord)

IndexBuffers
>>IndiceCount * 2 (i use D3DFMT_INDEX16)

Textures
>>Width * Height * BitDepth (Bitdepth depending on the display mode)

I just calculate the ammount of bytes taken by the display and add the sum of the memory-usage of all vertexbuffers, indexbuffers and textures.

Is the above way accurate?? Are there better ways?? How do you guys do this

Thnx in advance.