This topic is now archived and is closed to further replies.

Vertex Buffer Release problem

This topic is 4984 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m getting a strange problem with a program of mine. My video card is a Radeon 9600 XT 256 mb and I''m using the 3.10 drivers for WinMe. My program (a simple terrain engine) is creating 1024 small vertex buffers, just 64K in size each, so it''s using 64 Mb of video memory altogether. I''m creating the VBs using D3DPOOL_DEFAULT since I want them in vram. The program runs fine and seems to terminate fine as well. However I''m finding after running it I can''t do another build in VC++ 6 which is complaining of a shortage of memory, which must be down to my program. I really have checked and double checked everything. Apart from the VBs the program uses very little memory, so I can''t see how it would be anything other than the VBs not releasing their memory when I call Release. Actually come to think of it, if the VBs are in vram, why would that affect VC++? I am using memcpy to fill the VBs from a small global array. I''m definitely unlocking the buffers after the copy. The code is D3D8 btw. Any ideas, or has anyone experienced any similar VB problems? TIA, Simon.

Share this post

Link to post
Share on other sites
Just thinking on it some more - could calling release on 1024 VBs one after the other mean they aren't getting to release before the next release call comes? (altough of course each call to release is on a seperate VB) In other words the video card can't keep up? I'm basically just releasing the VBs like this at the moment-

// Release Vertex Buffer
for ( int n = 0; n < BUFFERS; n++ )
pVB[n] = NULL;

where pVB is an array of VB pointers.

[edited by - simon_brown75 on April 20, 2004 11:32:38 AM]

Share this post

Link to post
Share on other sites