Jump to content
  • Advertisement


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

Alan Kemp

Creating an LPD3DXMESH

This topic is 5551 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 create an LPD3DXMESH, but every time I call D3DXCreateMesh I just get D3DERR_INVALIDCALL. This is what I am doing:


	HRESULT res = D3DXCreateMesh(NumTriangles, NumVertex, D3DXMESH_MANAGED | D3DXMESH_DYNAMIC, &fvf, g_Renderware.m_lpDevice, &Mesh);
	if (FAILED(res))
		char buf[512];
		memset(buf, 0, 512);
		D3DXGetErrorString(res, buf, 512);

		MessageBox(NULL, buf, "", MB_OK);
		return NULL;

NumTriangles and NumVertex are 1102 and 942 respectivly. Any ideas? Alan

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
also, i think you might have a problem trying to use MANAGED and DYNAMIC together. i seem to remember running into that problem. and here''s a quote from the DX docs on buffer creation:

In fact, index buffers and vertex buffers cannot be created using D3DPOOL_MANAGED together with D3DUSAGE_DYNAMIC.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!