Archived

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

DrawPrimitiveVB fails in DX7

This topic is 5892 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

At certain times calling DrawPrimitiveVB fails, returning 0x8007000E (Not enough storage is available to complete this operation). I would guess that this means that I have run out of video memory, but how can rendering a vertex buffer change the amount of video memory ? Since I have allready successfully created my display surfaces and vertex buffers I don''t see why the call can fail. Can any of you enlighten me ?

Share this post


Link to post
Share on other sites
How are you locking/unlocking your vertex buffer ? If you''re abusing the DISCARDCONTENTS and NOOVERWRITE flags you could be asking D3D to create loads of internal buffers.

You aren''t creating and releasing the vertex buffers every frame are you ? - that would be _bad_, partiularly if you didn''t release the implicit references.

A failure in DrawPrimitive hints at some failure further up the pipeline. The advice as usual is to make sure you have the debug version of the DirectX runtimes installed (you get the option when installing the SDK), bump up the DirectDraw and Direct3D debug levels in the control panel and run your application in the debugger. More insightful information from exactly why D3D is unhappy with you will be spewed out to your debug output window.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Im locking the vertex buffers by using only the flag DDLOCK_WRITEONLY, and I unlock the buffers as soon as I am done manipulating them.

I''m not releasing and creating the vertex buffers for each frame, only when data inside them needs to be changed (Which only happens at the time of their creation).

I tried installing the debug version of DirectX8 (From the DX8 SDK) to acquire debug info from the drivers, but they seem to refuse to overwrite the existing release version drivers giving me only debug version of DirectSound and DirectPlay.

To find out whether I was out of video memory, I called pDirectDraw->GetAvailableVidMem() which reported 8MB''s of free video memory. This tells me that something else has to be wrong, but I can''t seem to figure out what it is.

This problem occured when I tried stressing my graphics engine by creating 15 vertex buffers each with more than 1000 vertices. I am also experiencing some strange effects where polygons seem to be displaced after moving through the 3D object or rotating the camera so that the 3D object would move to the border of the viewport.

I have ofcourse checked all the places in my code where I could immagine that problems could occur (Memory buffers, matrixes, etc), but have found nothing out of the ordinary.

Share this post


Link to post
Share on other sites
I managed to install a newer version of the DX8 debug files, so I now have debug information on my error.

When calling DrawPrimitiveVB the DirectX drivers returns the following error:
Direct3D7: (ERROR) :Driver could not parse this batch!
Direct3D7: (ERROR) :Error trying to render batched commands in CDirect3DDeviceIDP2::TLVbuf_Grow
Direct3D7: (ERROR) :Could not grow TL vertex buffer

I still see no reason as why the vertex buffer needs to grow or why it isn''t able to grow (I have 8MB of free video memory available, but the vertex buffer is located in system memory and I have more than 800MB free system memory).

Share this post


Link to post
Share on other sites