• Advertisement

Archived

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

Odd error with vertex buffers

This topic is 5556 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 am trying to make a wrapper class for a directX vertex buffer, but i had a bit of trouble. Assuming correct parameters and that buf is IDirect3DVertexBuffer8*: buf->Lock(); memcpy(); buf->Unlock(); the memcpy() works, but the Unlock() causes a runtime access violation. Anyone got an idea?

Share this post


Link to post
Share on other sites
Advertisement
Are you sure it's croaking on the Unlock() call? I've had problems before with access violations during the copy cycle, but it has almost always been a result of the memcpy() call.

Usually what has happened is that I've accidentally copied data past the allocated range of the vertex buffer.

--Hoozit.

----------------------
Check out my game demo and resume at
www.fivestory.com/projects/game.

[edited by - HoozitWhatzit on December 2, 2002 4:35:45 PM]

Share this post


Link to post
Share on other sites
Thanks, but i found the problem shortly after i made the post. It was just the way I had set up my encapsulation and i made some stupid mistakes. I guess it happens to the best of us.

Share this post


Link to post
Share on other sites

  • Advertisement