Original Post
Hi all,
Running into a funny problem on my machine.
I''m generating multiple vertex buffers each time I load a level... and I''m releasing them when I unload the level.
After about four levels, I get "out of video memory" erros when trying to make a new vertex buffer.
After some checking, I find that I *am* releasing all the vertex buffers that I make... but in looking in the DirectX SDK for SetStreamSource, I see a suspicious little note that says:
This method increments the reference count of the vertex buffer being assigned and decrements the reference count of the previously assigned vertex buffer. When the vertex buffer is no longer needed, set it to NULL. If you fail to do this, the vertex buffer is not released, resulting in a memory leak.
Well, at the end of my render loop, I so a SetStreamSource(NULL), just to clean things up... but I still get a leak. Can anyone shed more light on the situation for me?