Jump to content
  • Advertisement
Sign in to follow this  

[SlimDX] Failed to lock driver vertex buffer when loading models

This topic is 2589 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 can't figure out why the app is having trouble locking the vertexbuffer. Here is my code snippet.

// is this necessary?
if (vertexBuffer != null)
if (!vertexBuffer.Disposed)
{ vertexBuffer.Dispose(); }

vertexBuffer = new VertexBuffer(Device, VertexPositionNormalTextureColorTangent.SizeInBytes * vertexCount, Usage.WriteOnly, SlimDX.Direct3D9.VertexFormat.None, Pool.Default);

[color="#FF0000"] DataStream dataStream = vertexBuffer.Lock(0, 0, LockFlags.None); // exception is raised while attempting to lock vertexbuffer
foreach (List<VertexPositionNormalTextureColor> vlist in verticesNmTxCollst)
foreach (VertexPositionNormalTextureColor vertex in vlist)


I have plenty of system memory available, this happens randomly when loading models. there are no d3d leaks or warnings showing.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!