Advertisement Jump to content
Sign in to follow this  
eviltwigflipper

X Mesh Resizing Problem

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

When ever I use CloneMeshFVF on a X mesh the Model renders black. Heres how im doing it.

	m_pTempMesh = thisMesh->m_pMesh;
	hr = m_pTempMesh->CloneMeshFVF(D3DXMESH_MANAGED, D3DFVF_CUSTOMVERTEX,sys_data.g_pd3dDevice,&thisMesh->m_pMesh);

	if(FAILED(hr))
		common->Error(ERR_FATAL,"R_LoadMesh %s failed to change FVF\n",modelName);

	m_pTempMesh->Release();

	D3DXComputeNormals(thisMesh->m_pMesh,NULL);

Any Ideas?

Share this post


Link to post
Share on other sites
Advertisement
Does your customvertex contain elements that are not in the original mesh e.g. texture coordinates. When you clone to a new FVF the extra elements get set to a default of 0.

Share this post


Link to post
Share on other sites
I'm guessing your custom vertex FVF has a diffuse element which, as trip said, will be initialized to 0 (black).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!