Sign in to follow this  
bobthebobert

D3DXMesh and Access Violation

Recommended Posts

I am trying to duplicate the way meshes are loaded in the Mesh tutorial included with the DX SDK, but for some reason I am getting an "Access violation" error at this line in my code, where the .X file is loaded up:
D3DXMATERIAL* d3dxMaterials = (D3DXMATERIAL*)pD3DXMtrlBuffer->GetBufferPointer();
pD3DXMtrlBuffer is a LPD3DXBUFFER. Is there something obvious that comes to someones mind or should I post more code?

Share this post


Link to post
Share on other sites
Figured out the problem. I had been trying to ficx another problem, and by debugging it I changed around the file name for the LoadMesh function, and never changed it back. So yea, that would be why it's pointing to garbage :p

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this