Odd error with vertex buffers
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?
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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement