I have created an application with D3DX9. My application displays text on the faces on 400 cubes using Textures. The heights of the cubes are changed every 100 milliseconds (in OnTimer call). I display text using the following sequence of calls (pseudocode is below):
for (i=0 to 399)
if(texture[i] != NULL)
texture[i] = NULL
CreateMeshObject(cube[i]) //Cube height changes for every OnTimer call.
This code hangs after a few calls to OnTimer. My VRAM seems to be hogging up. Calling the Release for texture does not seem to be really releasing the memory in VRAM. Am I doing anything wrong here? Is there a better way to display text on the cube's face? Does D3DX11 have a better way of doing this? Any suggestion is welcome.