• Advertisement

Archived

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

GetVertexBuffer - Access Violation!

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

Hi, I''m trying to create a mesh from a vertex buffer with pMesh->GetVertexBuffer(&mVB); The code can be compiled without any problems, but I get an error when I execute the program. The debugger says that it is the GetVertexBuffer line that causes the problem. Do you know a solution for this problem?

Share this post


Link to post
Share on other sites
Advertisement
is pmesh null?

Raymond Jacobs,
Profesional Web Applications Developer,
Weekend Game Developer,
www.EtherealDarkness.com

Share this post


Link to post
Share on other sites
No, pMesh is initialized via D3DXCreateMesh just before the call to GetVertexBuffer...

Share this post


Link to post
Share on other sites
One of three things are wrong if what you say is true.

pMesh == NULL or an invalind pointer such as 0xffffff or commonly 0x000005

-or-

a pointer in the instance variable mVB is not good, and DirectX happens to try to access it.

-or-

There is something else completely crazy going on that is not your/nor DirectX fault, such as something ran out of memory, or some bug in your OS. (unlikely)

-------
Homepage: http://students.washington.edu/andrey

Share this post


Link to post
Share on other sites

  • Advertisement